diff --git a/.env.example b/.env.example index c0fb900..5f5d0a6 100644 --- a/.env.example +++ b/.env.example @@ -2,6 +2,8 @@ NETWORK_NAME=goerli RPC_URL=https://goerli.infura.io/v3/xxx DEPLOYER_PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000042069 +GAS_LIMIT= # Optional +GAS_PRICE= # Optional VERIFIER_API_URL=https://api-goerli.etherscan.io/api VERIFIER_API_KEY=PLACEHOLDER_STRING diff --git a/README.md b/README.md index e4bb28b..2f288ac 100644 --- a/README.md +++ b/README.md @@ -122,3 +122,9 @@ The following is a list of contracts that are deployed by this script. | GuardV2 | 0x761f5e29944D79d76656323F106CF2efBF5F09e9 | | GuardV1 | 0x596aF90CecdBF9A768886E771178fd5561dD27Ab | | Orderbook | 0x2cF83ECbad9D2c43ab49C512715887Bd812896f1 | +| DeveloperMultisig | 0x007a47e6BF40C1e0ed5c01aE42fDC75879140bc4 | +| ERC20MinterFactory | 0x55ECCa57590740DF0df92CE88DBdF9E8309AE9FC | +| ERC721MinterFactory | 0x0Aab812958e7996bf84A046D07639561bF6495bA | +| ERC721SaleFactory | 0x4482E04D68E5460926F25fB270694e9F5125cb61 | +| ERC1155MinterFactory | 0x04B94e4d62cdC04a7bCc829FE3d423fa5fE1b0bc | +| ERC1155SaleFactory | 0xfBa5ACD43246fc8f7B8661aE92fC5e0317FAab20 | diff --git a/package.json b/package.json index 5f93db1..ee5744b 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ } }, "dependencies": { + "0xsequence": "^1.2.3", "@0xsequence/solidity-deployer": "^0.0.4", "@typechain/ethers-v5": "^7.0.1", "@typescript-eslint/eslint-plugin": "^4.18.0", diff --git a/scripts/deploy-contracts.ts b/scripts/deploy-contracts.ts index db45e87..22eca99 100644 --- a/scripts/deploy-contracts.ts +++ b/scripts/deploy-contracts.ts @@ -1,10 +1,16 @@ -import ora from 'ora' +import ora, { Ora } from 'ora' +import { deployers, verifiers } from '@0xsequence/solidity-deployer' import { JsonRpcProvider } from '@ethersproject/providers' import { config as dotenvConfig } from 'dotenv' -import { ethers } from 'ethers' -import fs from 'fs' -import { deployGuard } from './factories/deployers/GuardDeployer' +import { BigNumber, ethers } from 'ethers' +import { writeFile } from 'fs/promises' +import { ORDERBOOK_VERIFICATION, Orderbook } from './factories/orderbook/Orderbook' +import { ERC1155MINTERFACTORY_VERIFICATION, ERC1155MinterFactory } from './factories/token_library/ERC1155MinterFactory' +import { ERC1155SALEFACTORY_VERIFICATION, ERC1155SaleFactory } from './factories/token_library/ERC1155SaleFactory' +import { ERC20MINTERFACTORY_VERIFICATION, ERC20MinterFactory } from './factories/token_library/ERC20MinterFactory' +import { ERC721MINTERFACTORY_VERIFICATION, ERC721MinterFactory } from './factories/token_library/ERC721MinterFactory' +import { ERC721SALEFACTORY_VERIFICATION, ERC721SaleFactory } from './factories/token_library/ERC721SaleFactory' import { FactoryV1, GuestModuleV1, @@ -13,47 +19,67 @@ import { RequireFreshSignerV1, SequenceUtilsV1 } from './factories/v1' -import { FactoryV2, GuestModuleV2, MainModuleUpgradableV2, MainModuleV2, SequenceUtilsV2 } from './factories/v2' -import { deployers, verifiers } from '@0xsequence/solidity-deployer' +import { FACTORY_V1_VERIFICATION } from './factories/v1/FactoryV1' import { GUEST_MODULE_V1_VERIFICATION } from './factories/v1/GuestModuleV1' -import { MAIN_MODULE_V1_VERIFICATION } from './factories/v1/MainModuleV1' import { MAIN_MODULE_UPGRADABLE_V1_VERIFICATION } from './factories/v1/MainModuleUpgradableV1' -import { FACTORY_V1_VERIFICATION } from './factories/v1/FactoryV1' -import { SEQUENCE_UTILS_V1_VERIFICATION } from './factories/v1/SequenceUtilsV1' +import { MAIN_MODULE_V1_VERIFICATION } from './factories/v1/MainModuleV1' import { REQUIRE_FRESH_SIGNER_V1_VERIFICATION } from './factories/v1/RequireFreshSignerV1' -import { FACTORY_V2_VERIFICATION } from './factories/v2/FactoryV2' -import { MAIN_MODULE_V2_VERIFICATION } from './factories/v2/MainModuleV2' -import { MAIN_MODULE_UPGRADABLE_V2_VERIFICATION } from './factories/v2/MainModuleUpgradableV2' +import { SEQUENCE_UTILS_V1_VERIFICATION } from './factories/v1/SequenceUtilsV1' +import { FactoryV2, GuestModuleV2, MainModuleUpgradableV2, MainModuleV2, SequenceUtilsV2 } from './factories/v2' +import { FACTORY_V2_VERIFICATION, WALLET_CREATION_CODE } from './factories/v2/FactoryV2' import { GUEST_MODULE_V2_VERIFICATION } from './factories/v2/GuestModuleV2' +import { MAIN_MODULE_UPGRADABLE_V2_VERIFICATION } from './factories/v2/MainModuleUpgradableV2' +import { MAIN_MODULE_V2_VERIFICATION } from './factories/v2/MainModuleV2' import { SEQUENCE_UTILS_V2_VERIFICATION } from './factories/v2/SequenceUtilsV2' -import { ORDERBOOK_VERIFICATION, Orderbook } from './factories/orderbook/Orderbook' +import { deployDeveloperMultisig } from './wallets/DeveloperMultisig' +import { deployGuard } from './wallets/Guard' +import { + TUBPROXY_VERIFICATION, + TransparentUpgradeableBeaconProxy +} from './factories/token_library/TransparentUpgradeableBeaconProxy' +import { UPGRADEABLEBEACON_VERIFICATION, UpgradeableBeacon } from './factories/token_library/UpgradeableBeacon' dotenvConfig() -const { RPC_URL, DEPLOYER_PRIVATE_KEY, NETWORK_NAME, VERIFIER_API_URL, VERIFIER_API_KEY } = process.env +interface Logger { + log(message: string): void + error(message: string): void +} + +const { RPC_URL, DEPLOYER_PRIVATE_KEY, NETWORK_NAME, VERIFIER_API_URL, VERIFIER_API_KEY, GAS_LIMIT, GAS_PRICE } = process.env export const deployContracts = async (rpcUrl: string, deployerPK: string, networkName?: string): Promise => { - const prompt = ora() + const prompt = ora() as Ora & Logger + prompt.log = (message: string) => { + // Log a message and keep spinner running + const currentText = prompt.text + prompt.info(message) + prompt.start(currentText) + } + prompt.error = prompt.fail const provider = new JsonRpcProvider(rpcUrl) const signer = new ethers.Wallet(deployerPK, provider) provider.getSigner = () => signer as unknown as ethers.providers.JsonRpcSigner prompt.info(`Network Name: ${networkName}`) + prompt.info(`Chain Id: ${(await provider.getNetwork()).chainId}`) + prompt.info(`Gas price: ${await provider.getGasPrice()}`) prompt.info(`Local Deployer Address: ${await signer.getAddress()}`) prompt.info(`Local Deployer Balance: ${await signer.getBalance()}`) - // v1 - - prompt.start(`Deploying V1 contracts\n`) - const txParams = { - // gasLimit: BigNumber.from(7500000), - gasLimit: await provider.getBlock('latest').then(b => b.gasLimit.mul(4).div(10)) + gasPrice: GAS_PRICE ? BigNumber.from(GAS_PRICE) : undefined, // Automated gas price + // gasPrice: (await provider.getGasPrice()).mul(3).div(2), // 1.5x gas price + gasLimit: GAS_LIMIT ? BigNumber.from(GAS_LIMIT) : await provider.getBlock('latest').then(b => b.gasLimit.mul(4).div(10)) // gasPrice: BigNumber.from(10).pow(8).mul(16) } - const universalDeployer = new deployers.UniversalDeployer(signer, console) + // v1 + + prompt.start(`Deploying V1 contracts\n`) + + const universalDeployer = new deployers.UniversalDeployer(signer, prompt) const walletFactoryV1 = await universalDeployer.deploy('WalletFactory', FactoryV1, 0, txParams) const mainModuleV1 = await universalDeployer.deploy('MainModule', MainModuleV1, 0, txParams, walletFactoryV1.address) @@ -80,7 +106,8 @@ export const deployContracts = async (rpcUrl: string, deployerPK: string, networ 'Guard V1', '0x596aF90CecdBF9A768886E771178fd5561dD27Ab', mainModuleV1.address, - '0xc99c1ab359199e4dcbd4603e9b2956d5681241ceb286359cf6a647ca56e6e128' + '0xc99c1ab359199e4dcbd4603e9b2956d5681241ceb286359cf6a647ca56e6e128', + txParams ) prompt.succeed(`Deployed V1 contracts\n`) @@ -89,7 +116,7 @@ export const deployContracts = async (rpcUrl: string, deployerPK: string, networ prompt.start(`Deploying V2 contracts\n`) - const singletonDeployer = new deployers.SingletonDeployer(signer, console) //, undefined, BigNumber.from('30000000000000000')) + const singletonDeployer = new deployers.SingletonDeployer(signer, prompt) //, undefined, BigNumber.from('30000000000000000')) const walletFactoryV2 = await singletonDeployer.deploy('Factory', FactoryV2, 0, txParams) const mainModuleUpgradeableV2 = await singletonDeployer.deploy('MainModuleUpgradable', MainModuleUpgradableV2, 0, txParams) @@ -109,21 +136,78 @@ export const deployContracts = async (rpcUrl: string, deployerPK: string, networ 'Guard V2', '0x761f5e29944D79d76656323F106CF2efBF5F09e9', mainModuleV2.address, - '0x6e2f52838722eda7d569b52db277d0d87d36991a6aa9b9657ef9d8f09b0c33f4' + '0x6e2f52838722eda7d569b52db277d0d87d36991a6aa9b9657ef9d8f09b0c33f4', + txParams ) prompt.succeed(`Deployed V2 contracts\n`) + // Sequence development multisig + + prompt.start(`Deploying Sequence development multisig\n`) + + const v2WalletContext = { + version: 2, + factory: walletFactoryV2.address, + mainModule: mainModuleV2.address, + mainModuleUpgradable: mainModuleUpgradeableV2.address, + guestModule: guestModuleV2.address, + sequenceUtils: sequenceUtilsV2.address, + walletCreationCode: WALLET_CREATION_CODE + } + const developerMultisig = await deployDeveloperMultisig(signer, v2WalletContext, txParams) + prompt.succeed(`Deployed Sequence development multisig\n`) + // Marketplace contracts prompt.start(`Deploying Marketplace contracts\n`) const orderbook = await singletonDeployer.deploy('Orderbook', Orderbook, 0, txParams) prompt.succeed(`Deployed Marketplace contracts\n`) + // Contracts library + + prompt.start(`Deploying Library contracts\n`) + const erc20MinterFactory = await singletonDeployer.deploy( + 'ERC20MinterFactory', + ERC20MinterFactory, + 0, + txParams, + developerMultisig.address + ) + const erc721MinterFactory = await singletonDeployer.deploy( + 'ERC721MinterFactory', + ERC721MinterFactory, + 0, + txParams, + developerMultisig.address + ) + const erc721SaleFactory = await singletonDeployer.deploy( + 'ERC721SaleFactory', + ERC721SaleFactory, + 0, + txParams, + developerMultisig.address + ) + const erc1155MinterFactory = await singletonDeployer.deploy( + 'ERC1155MinterFactory', + ERC1155MinterFactory, + 0, + txParams, + developerMultisig.address + ) + const erc1155SaleFactory = await singletonDeployer.deploy( + 'ERC1155SaleFactory', + ERC1155SaleFactory, + 0, + txParams, + developerMultisig.address + ) + prompt.succeed(`Deployed Library contracts\n`) + // Output addresses prompt.start(`Writing deployment information to output_${networkName}.json\n`) - fs.writeFileSync( + void writeFile( `./output_${networkName}.json`, JSON.stringify( [ @@ -140,7 +224,13 @@ export const deployContracts = async (rpcUrl: string, deployerPK: string, networ { name: 'RequireFreshSignerLibV1', address: requireFreshSignerLibV1.address }, { name: 'GuardV2', address: '0x761f5e29944D79d76656323F106CF2efBF5F09e9' }, { name: 'GuardV1', address: '0x596aF90CecdBF9A768886E771178fd5561dD27Ab' }, + { name: 'DeveloperMultisig', address: developerMultisig.address }, { name: 'Orderbook', address: orderbook.address }, + { name: 'ERC20MinterFactory', address: erc20MinterFactory.address }, + { name: 'ERC721MinterFactory', address: erc721MinterFactory.address }, + { name: 'ERC721SaleFactory', address: erc721SaleFactory.address }, + { name: 'ERC1155MinterFactory', address: erc1155MinterFactory.address }, + { name: 'ERC1155SaleFactory', address: erc1155SaleFactory.address } ], null, 2 @@ -156,7 +246,7 @@ export const deployContracts = async (rpcUrl: string, deployerPK: string, networ return } - const verifier = new verifiers.EtherscanVerifier(VERIFIER_API_KEY, VERIFIER_API_URL, console) + const verifier = new verifiers.EtherscanVerifier(VERIFIER_API_KEY, VERIFIER_API_URL, prompt) const waitForSuccess = true // One at a time const { defaultAbiCoder } = ethers.utils @@ -210,6 +300,84 @@ export const deployContracts = async (rpcUrl: string, deployerPK: string, networ prompt.start('Verifying Marketplace contracts\n') await verifier.verifyContract(orderbook.address, { ...ORDERBOOK_VERIFICATION, waitForSuccess }) prompt.succeed('Verified Marketplace contracts\n') + + // Library contracts + + prompt.start(`Verifying Library contracts\n`) + // Factories + await verifier.verifyContract(erc20MinterFactory.address, { + ...ERC20MINTERFACTORY_VERIFICATION, + waitForSuccess, + constructorArgs: defaultAbiCoder.encode(['address'], [developerMultisig.address]) + }) + await verifier.verifyContract(erc721MinterFactory.address, { + ...ERC721MINTERFACTORY_VERIFICATION, + waitForSuccess, + constructorArgs: defaultAbiCoder.encode(['address'], [developerMultisig.address]) + }) + await verifier.verifyContract(erc721SaleFactory.address, { + ...ERC721SALEFACTORY_VERIFICATION, + waitForSuccess, + constructorArgs: defaultAbiCoder.encode(['address'], [developerMultisig.address]) + }) + await verifier.verifyContract(erc1155MinterFactory.address, { + ...ERC1155MINTERFACTORY_VERIFICATION, + waitForSuccess, + constructorArgs: defaultAbiCoder.encode(['address'], [developerMultisig.address]) + }) + await verifier.verifyContract(erc1155SaleFactory.address, { + ...ERC1155SALEFACTORY_VERIFICATION, + waitForSuccess, + constructorArgs: defaultAbiCoder.encode(['address'], [developerMultisig.address]) + }) + // Also deploy the TUBProxy for verification purposes + const tubProxy = await singletonDeployer.deploy( + 'TransparentUpgradeableBeaconProxy', + TransparentUpgradeableBeaconProxy, + 0, + txParams + ) + // Token contracts deployed by the factories + const beacon = new UpgradeableBeacon(signer) + await verifier.verifyContract(await beacon.attach(await erc20MinterFactory.beacon()).implementation(), { + ...ERC20MINTERFACTORY_VERIFICATION, + contractToVerify: 'src/tokens/ERC20/presets/minter/ERC20TokenMinter.sol:ERC20TokenMinter', + waitForSuccess + }) + await verifier.verifyContract(await beacon.attach(await erc721MinterFactory.beacon()).implementation(), { + ...ERC721MINTERFACTORY_VERIFICATION, + contractToVerify: 'src/tokens/ERC721/presets/minter/ERC721TokenMinter.sol:ERC721TokenMinter', + waitForSuccess + }) + await verifier.verifyContract(await beacon.attach(await erc721SaleFactory.beacon()).implementation(), { + ...ERC721SALEFACTORY_VERIFICATION, + contractToVerify: 'src/tokens/ERC721/presets/sale/ERC721Sale.sol:ERC721Sale', + waitForSuccess + }) + await verifier.verifyContract(await beacon.attach(await erc1155MinterFactory.beacon()).implementation(), { + ...ERC1155MINTERFACTORY_VERIFICATION, + contractToVerify: 'src/tokens/ERC1155/presets/minter/ERC1155TokenMinter.sol:ERC1155TokenMinter', + waitForSuccess + }) + const erc1155SaleBeacon = await erc1155SaleFactory.beacon() + const erc1155SaleImplementation = await beacon.attach(erc1155SaleBeacon).implementation() + await verifier.verifyContract(erc1155SaleImplementation, { + ...ERC1155SALEFACTORY_VERIFICATION, + contractToVerify: 'src/tokens/ERC1155/presets/sale/ERC1155Sale.sol:ERC1155Sale', + waitForSuccess + }) + // Proxies + await verifier.verifyContract(erc1155SaleBeacon, { + ...UPGRADEABLEBEACON_VERIFICATION, + waitForSuccess, + constructorArgs: defaultAbiCoder.encode(['address'], [erc1155SaleImplementation]) + }) + await verifier.verifyContract(tubProxy.address, { + ...TUBPROXY_VERIFICATION, + waitForSuccess + }) + + prompt.succeed(`Verified Library contracts\n`) } const main = async () => { diff --git a/scripts/factories/token_library/ERC1155MinterFactory.ts b/scripts/factories/token_library/ERC1155MinterFactory.ts new file mode 100644 index 0000000..8310bd8 --- /dev/null +++ b/scripts/factories/token_library/ERC1155MinterFactory.ts @@ -0,0 +1,386 @@ +import type { EtherscanVerificationRequest } from '@0xsequence/solidity-deployer' +import { ContractFactory, ethers } from 'ethers' + +// https://github.com/0xsequence/contracts-library/blob/5e0017b81cc3099e60704eaf4a50b64e79fe706c/src/tokens/ERC1155/presets/minter/ERC1155TokenMinterFactory.sol + +const abi = [ + { + inputs: [ + { + internalType: 'address', + name: 'factoryOwner', + type: 'address' + } + ], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'proxyAddr', + type: 'address' + } + ], + name: 'ERC1155TokenMinterDeployed', + 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' + }, + { + inputs: [], + name: 'beacon', + outputs: [ + { + internalType: 'contract UpgradeableBeacon', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'proxyOwner', + type: 'address' + }, + { + internalType: 'address', + name: 'tokenOwner', + type: 'address' + }, + { + internalType: 'string', + name: 'name', + type: 'string' + }, + { + internalType: 'string', + name: 'baseURI', + type: 'string' + }, + { + internalType: 'string', + name: 'contractURI', + type: 'string' + }, + { + internalType: 'address', + name: 'royaltyReceiver', + type: 'address' + }, + { + internalType: 'uint96', + name: 'royaltyFeeNumerator', + type: 'uint96' + } + ], + name: 'deploy', + outputs: [ + { + internalType: 'address', + name: 'proxyAddr', + type: 'address' + } + ], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address' + } + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'implementation', + type: 'address' + } + ], + name: 'upgradeBeacon', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + } +] + +export class ERC1155MinterFactory extends ContractFactory { + constructor(signer: ethers.Signer) { + super( + abi, + '0x608034610125576001600160401b0390601f620075fa38819003918201601f191683019291908484118385101761010f57816020928492604096875283398101031261012557516001600160a01b038082168203610125576100603361012a565b82519361513794858101958187108388111761010f57620024c3823980600096039086f0908115610105578451916105ee808401928311848410176100f1579184849260209462001ed5853916815203019085f080156100e4576100d69394501660018060a01b0319600154161760015561012a565b51611d639081620001728239f35b50505051903d90823e3d90fd5b634e487b7160e01b88526041600452602488fd5b84513d87823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b600080546001600160a01b039283166001600160a01b03198216811783559216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a356fe6080604052600436101561001257600080fd5b6000803560e01c80631bce4583146108b157806338234f4d146102d857806359659e9014610286578063715018a6146101e95780638da5cb5b146101985763f2fde38b1461005f57600080fd5b346101955760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557610096610970565b61009e610a5d565b73ffffffffffffffffffffffffffffffffffffffff80911690811561011157600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b80fd5b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101955773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557610220610a5d565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346101955760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557610310610970565b73ffffffffffffffffffffffffffffffffffffffff60243516602435036108a85760443567ffffffffffffffff8111610792576103519036906004016109e8565b9060643567ffffffffffffffff81116108ad576103729036906004016109e8565b9060843567ffffffffffffffff81116108a4576103939036906004016109e8565b73ffffffffffffffffffffffffffffffffffffffff60a4351660a435036108a8576bffffffffffffffffffffffff60c4351660c435036108a45760405160208101907fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060243560601b1682526104ac6054828851610418816034840160208d01610adc565b810188519061042e826034830160208d01610adc565b01865190610443826034830160208b01610adc565b017fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060a43560601b1660348201527fffffffffffffffffffffffff000000000000000000000000000000000000000060c43560a01b1660488201520360348101845201826109a7565b519020936040519485602081011067ffffffffffffffff60208801111761087557602086016040528686526001547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006040519160208301938452818760601b16604084015260601b1660548201526105436068828951610533818c60208686019101610adc565b81010360488101845201826109a7565b519020604051906111eb61055a60208201846109a7565b8083526020830190610b4382398251156108175773ffffffffffffffffffffffffffffffffffffffff92519089f5169485156107b957869373ffffffffffffffffffffffffffffffffffffffff6001541691873b156107b557859161061573ffffffffffffffffffffffffffffffffffffffff9260405195869485947fcf7a1d770000000000000000000000000000000000000000000000000000000086521660048501526024840152606060448401526064830190610aff565b0381838a5af19081156107aa578491610796575b5050843b15610792576106f6610696926106c660405196879586957ff895481800000000000000000000000000000000000000000000000000000000875273ffffffffffffffffffffffffffffffffffffffff60243516600488015260c0602488015260c4870190610aff565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc868303016044870152610aff565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc848303016064850152610aff565b73ffffffffffffffffffffffffffffffffffffffff60a4351660848301526bffffffffffffffffffffffff60c4351660a4830152038183865af180156107875761076f575b6020827fdb7ec174d10f8c3decb5b672973563cf443b7bc2d726cdf815cc1c34ccb5653f82604051838152a1604051908152f35b6107798391610993565b610783578161073b565b5080fd5b6040513d85823e3d90fd5b8280fd5b61079f90610993565b610792578238610629565b6040513d86823e3d90fd5b8580fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8480fd5b600080fd5b8380fd5b50346101955760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610195576108e9610970565b6108f1610a5d565b8173ffffffffffffffffffffffffffffffffffffffff806001541692833b15610792576024908360405195869485937f3659cfe60000000000000000000000000000000000000000000000000000000085521660048401525af1801561096557610959575080f35b61096290610993565b80f35b6040513d84823e3d90fd5b6004359073ffffffffffffffffffffffffffffffffffffffff821682036108a857565b67ffffffffffffffff811161087557604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761087557604052565b81601f820112156108a85780359067ffffffffffffffff82116108755760405192610a3b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601856109a7565b828452602083830101116108a857816000926020809301838601378301015290565b73ffffffffffffffffffffffffffffffffffffffff600054163303610a7e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60005b838110610aef5750506000910152565b8181015183820152602001610adf565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610b3b81518092818752878088019101610adc565b011601019056fe60808060405234610016576111cf908161001c8239f35b600080fdfe604060808152366103825773ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000917fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000843516146100c057600484517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b6100c8611192565b60049136831161037e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261037e578235916101088361067f565b602435926101158461067f565b60443567ffffffffffffffff811161037a57610135839136908801610789565b941692156103525761014791166107e3565b803b156102cf578451907f5c60da1b000000000000000000000000000000000000000000000000000000009384835260209687848381865afa9384156102a657889461019d9189916102b2575b503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab575b610242575b8361023c6107d0565b80519101f35b8592839182525afa9182156102a65761026a9392610277575b506102646109b1565b91610a21565b5038808083818080610233565b610298919250843d861161029f575b610290818361070e565b810190610902565b903861025b565b503d610286565b61091a565b508661022e565b6102c99150863d881161029f57610290818361070e565b38610194565b60848360208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b8487517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8380fd5b73ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000907fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833516146104395760046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b610441611192565b60049236841161067b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067b5783356104808161067f565b6024359161048d8361067f565b60443567ffffffffffffffff8111610677576104ad829136908901610789565b9316931561064e576104bf91166107e3565b813b156105ca576040517f5c60da1b000000000000000000000000000000000000000000000000000000009283825260209586838281855afa9283156102a65787936105149188916105b357503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905560405194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab57610242578361023c6107d0565b6102c99150853d871161029f57610290818361070e565b6084846020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b856040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8280fd5b73ffffffffffffffffffffffffffffffffffffffff81160361069d57565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff8211176106ed57604052565b6106a2565b6040810190811067ffffffffffffffff8211176106ed57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106ed57604052565b67ffffffffffffffff81116106ed57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f8201121561069d578035906107a08261074f565b926107ae604051948561070e565b8284526020838301011161069d57816000926020809301838601378301015290565b604051906107dd826106d1565b60008252565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61039081547f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f604080519373ffffffffffffffffffffffffffffffffffffffff9081851686521693846020820152a1811561087e577fffffffffffffffffffffffff000000000000000000000000000000000000000016179055565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b9081602091031261069d57516109178161067f565b90565b6040513d6000823e3d90fd5b1561092d57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201527f73206e6f74206120636f6e7472616374000000000000000000000000000000006064820152fd5b604051906060820182811067ffffffffffffffff8211176106ed57604052602782527f206661696c6564000000000000000000000000000000000000000000000000006040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6000806109179493602081519101845af43d15610a60573d91610a438361074f565b92610a51604051948561070e565b83523d6000602085013e610acd565b606091610acd565b15610a6f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b91929015610aed5750815115610ae1575090565b610917903b1515610a68565b825190915015610b005750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b848110610b7d575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201610b3c565b610bee610bd57fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b3303610d14576000357fffffffff00000000000000000000000000000000000000000000000000000000167f3659cfe6000000000000000000000000000000000000000000000000000000008103610c515750610c49610f0f565b602081519101f35b7f4f1ef286000000000000000000000000000000000000000000000000000000008103610c865750610c81611083565b610c49565b7f8f283970000000000000000000000000000000000000000000000000000000008103610cb65750610c81610ec5565b7ff851a440000000000000000000000000000000000000000000000000000000008103610ce65750610c81610dfd565b7f5c60da1b0000000000000000000000000000000000000000000000000000000003610d1457610c81610e53565b610d1c610d3b565b6000808092368280378136915af43d82803e15610d37573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541680610df8575060206004917fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505416604051928380927f5c60da1b0000000000000000000000000000000000000000000000000000000082525afa9081156102a657600091610de0575090565b610917915060203d811161029f57610290818361070e565b905090565b610e05611192565b73ffffffffffffffffffffffffffffffffffffffff7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103541660405190602082015260208152610917816106f2565b610e5b611192565b610e63610d3b565b73ffffffffffffffffffffffffffffffffffffffff6040519116602082015260208152610917816106f2565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc602091011261069d576004356109178161067f565b610ecd611192565b3660041161069d57610efc73ffffffffffffffffffffffffffffffffffffffff610ef636610e8f565b166107e3565b604051610f08816106d1565b6000815290565b610f17611192565b3660041161069d5773ffffffffffffffffffffffffffffffffffffffff610f3d36610e8f565b1660405190610f4b826106d1565b60008252803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2815115801590610ff7575b610fe3575b5050604051610f08816106d1565b610fef916102646109b1565b503880610fd5565b506000610fd0565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152fd5b3660041161069d5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261069d576004356110c18161067f565b60243567ffffffffffffffff811161069d576110f673ffffffffffffffffffffffffffffffffffffffff913690600401610789565b9116803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061118a57610fe3575050604051610f08816106d1565b506001610fd0565b3461069d5756fea264697066735822122019f840d2ec21d6e6c6d650eef546ce8fd590e6d8042a04516b47dd55a17345c664736f6c63430008130033a2646970667358221220693b2adbe2e09914ca7081781d80b545e18cd39a9af8eb13aba74876de2d7c0e64736f6c6343000813003360803461011a57601f6105ee38819003918201601f19168301916001600160401b0383118484101761011f5780849260209460405283398101031261011a57516001600160a01b03808216919082820361011a576000549160018060a01b0319923384821617600055604051923391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a33b156100b2575060015416176001556040516104b890816101368239f35b62461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b6000803560e01c80633659cfe6146102ce5780635c60da1b1461027c578063715018a6146101e05780638da5cb5b1461018f5763f2fde38b1461005457600080fd5b3461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610188576100ad610403565b8115610104578254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b80fd5b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57610217610403565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff81169081810361018857610328610403565b3b1561037f57807fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8280a280f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff60005416330361042457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea2646970667358221220dc365b16a2b6643d361d2ca2ef711f783ae4b4503a5f52631ea9ce48e88aa6da64736f6c6343000813003360a06040523462000302576200001462000307565b6200001e62000307565b815190916001600160401b0390818311620002ec576004938454916001948584811c9416918215620002e1575b60209283861014620002cc578190601f9586811162000276575b5083908683116001146200020e5760009262000202575b5050600019600383901b1c191690861b1786555b8151938411620001ed576003958654908682811c92168015620001e2575b83831014620001cd575083811162000182575b50809284116001146200011857509282939183926000946200010c575b50501b9160001990841b1c19161790555b33608052604051614e0b90816200032c8239608051816148e70152f35b015192503880620000de565b919083601f1981168760005284600020946000905b888383106200016757505050106200014e575b505050811b019055620000ef565b015160001983861b60f8161c1916905538808062000140565b8587015188559096019594850194879350908101906200012d565b86600052816000208480870160051c820192848810620001c3575b0160051c019086905b828110620001b6575050620000c1565b60008155018690620001a6565b925081926200019d565b602290634e487b7160e01b6000525260246000fd5b91607f1691620000ae565b604186634e487b7160e01b6000525260246000fd5b0151905038806200007c565b90889350601f198316918a600052856000209260005b878282106200025f575050841162000245575b505050811b01865562000090565b015160001960f88460031b161c1916905538808062000237565b8385015186558c9790950194938401930162000224565b90915088600052836000208680850160051c820192868610620002c2575b918a91869594930160051c01915b828110620002b257505062000065565b600081558594508a9101620002a2565b9250819262000294565b602288634e487b7160e01b6000525260246000fd5b93607f16936200004b565b634e487b7160e01b600052604160045260246000fd5b600080fd5b60405190602082016001600160401b03811183821017620002ec576040526000825256fe6080604052600436101561001257600080fd5b60003560e01c8062fdd58e1461020657806301ffc9a71461020157806304634d8d146101fc57806306fdde03146101f75780630b5ee006146101f25780630e89341c146101ed578063248a9ca3146101e85780632a55205a146101e35780632d0335ab146101de5780632eb2c2d6146101d95780632f2ff15d146101d457806336568abe146101cf5780634e1273f4146101ca5780635944c753146101c55780636c0360eb146101c0578063731133e9146101bb5780637e518ec8146101b657806391d14854146101b1578063938e3d7b146101ac578063a217fddf146101a7578063a22cb465146101a2578063a3d4926e1461019d578063b48ab8b614610198578063ce0b514b14610193578063d547741f1461018e578063e8a3d48514610189578063e985e9c514610184578063f242432a1461017f578063f5d4c8201461017a578063f8954818146101755763fa4e12d71461017057600080fd5b611e95565b611e07565b611c44565b611af9565b611a81565b6119da565b611998565b6117bc565b6115fc565b611569565b61148d565b611467565b611368565b611304565b611205565b611123565b61107c565b610f2b565b610e6f565b610d7a565b610c5c565b610ae4565b610a23565b610959565b61092a565b6107fc565b6106fd565b61055d565b6103b8565b6102b1565b61022e565b73ffffffffffffffffffffffffffffffffffffffff81160361022957565b600080fd5b346102295760406003193601126102295773ffffffffffffffffffffffffffffffffffffffff6004356102608161020b565b16600052600060205260406000206024356000526020526020604060002054604051908152f35b7fffffffff0000000000000000000000000000000000000000000000000000000081160361022957565b346102295760206003193601126102295760206004356102d081610287565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fc79b8b5f0000000000000000000000000000000000000000000000000000000014908115610328575b506040519015158152f35b905061033381614bda565b908115610371575b8115610360575b8115610350575b503861031d565b61035a9150614ca0565b38610349565b905061036b81614ca0565b90610342565b905061037c81614c4e565b9061033b565b604435906bffffffffffffffffffffffff8216820361022957565b60a435906bffffffffffffffffffffffff8216820361022957565b34610229576040600319360112610229576004356103d58161020b565b6024356bffffffffffffffffffffffff81168103610229576103fe916103f9613c94565b614b1c565b005b600091031261022957565b90600182811c92168015610454575b602083101461042557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f169161041a565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6080810190811067ffffffffffffffff8211176104a957604052565b61045e565b67ffffffffffffffff81116104a957604052565b6040810190811067ffffffffffffffff8211176104a957604052565b90601f601f19910116810190811067ffffffffffffffff8211176104a957604052565b60005b8381106105145750506000910152565b8181015183820152602001610504565b90601f19601f60209361054281518092818752878088019101610501565b0116010190565b90602061055a928181520190610524565b90565b346102295760008060031936011261065d5760405190806004546105808161040b565b8085529160019180831690811561061557506001146105ba575b6105b6856105aa818703826104de565b60405191829182610549565b0390f35b9250600483527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106105fd5750505081016020016105aa826105b661059a565b805460208587018101919091529093019281016105e2565b8695506105b6969350602092506105aa9491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101929361059a565b80fd5b6040519061066d826104c2565b565b67ffffffffffffffff81116104a957601f01601f191660200190565b81601f82011215610229578035906106a28261066f565b926106b060405194856104de565b8284526020838301011161022957816000926020809301838601378301015290565b6020600319820112610229576004359067ffffffffffffffff82116102295761055a9160040161068b565b346102295761070b366106d2565b610713613d70565b805167ffffffffffffffff81116104a9576107388161073360045461040b565b6145b0565b602080601f83116001146107755750819260009261076a575b50506000198260011b9260031b1c191617600455600080f35b015190503880610751565b90601f198316936107a860046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90565b926000905b8682106107e457505083600195106107cb575b505050811b01600455005b015160001960f88460031b161c191690553880806107c0565b806001859682949686015181550195019301906107ad565b34610229576020806003193601126102295761081960043561336b565b6040519060009260035461082c8161040b565b906001908181169081156108ed575060011461088f575b6105b6856105aa816108816108588b8a612cb0565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b03601f1981018352826104de565b9091945060036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b906000915b8383106108da5750505082019092019181610881610858610843565b80548684018801529186019181016108be565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686850152505080151502830101925081610881610858610843565b346102295760206003193601126102295760043560005260076020526020600160406000200154604051908152f35b34610229576040600319360112610229576004356000526006602052604060002060405190610987826104c2565b549073ffffffffffffffffffffffffffffffffffffffff908183169283825260a01c60208201529115610a13575b6109de6109d66bffffffffffffffffffffffff602085015116602435613309565b612710900490565b9151166105b6604051928392836020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b9050610a1d6142b1565b906109b5565b346102295760206003193601126102295773ffffffffffffffffffffffffffffffffffffffff600435610a558161020b565b1660005260026020526020604060002054604051908152f35b67ffffffffffffffff81116104a95760051b60200190565b81601f8201121561022957803591610a9d83610a6e565b92610aab60405194856104de565b808452602092838086019260051b820101928311610229578301905b828210610ad5575050505090565b81358152908301908301610ac7565b346102295760a060031936011261022957600435610b018161020b565b60243590610b0e8261020b565b67ffffffffffffffff9060443582811161022957610b30903690600401610a86565b9160643581811161022957610b49903690600401610a86565b9060843590811161022957610b6290369060040161068b565b9273ffffffffffffffffffffffffffffffffffffffff94858416803314908115610c1a575b5015610bb057610b9d6103fe9682161515611f77565b610ba9838383876123f7565b5a936126d6565b608460405162461bcd60e51b815260206004820152602f60248201527f45524331313535237361666542617463685472616e7366657246726f6d3a204960448201527f4e56414c49445f4f50455241544f5200000000000000000000000000000000006064820152fd5b9050600052600160205260ff610c543360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541638610b87565b3461022957604060031936011261022957600435602435610c7c8161020b565b6000918083526007602052610c976001604085200154613e1a565b808352600760205260ff610cce83604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541615610cd9578280f35b8083526007602052610d0e82604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b3461022957604060031936011261022957602435610d978161020b565b3373ffffffffffffffffffffffffffffffffffffffff821603610dc0576103fe906004356141d3565b608460405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b90815180825260208080930193019160005b828110610e4a575050505090565b835185529381019392810192600101610e3c565b90602061055a928181520190610e2a565b346102295760406003193601126102295760043567ffffffffffffffff8082116102295736602383011215610229578160040135610eac81610a6e565b92610eba60405194856104de565b81845260209160248386019160051b8301019136831161022957602401905b828210610f125785602435868111610229576105b691610f00610f06923690600401610a86565b906127d3565b60405191829182610e5e565b8380918335610f208161020b565b815201910190610ed9565b3461022957606060031936011261022957602435610f488161020b565b610f50610382565b90610f59613c94565b610f756127106bffffffffffffffffffffffff84161115614aab565b73ffffffffffffffffffffffffffffffffffffffff81161561103857610fd46103fe92610fbf610fa3610660565b73ffffffffffffffffffffffffffffffffffffffff9094168452565b6bffffffffffffffffffffffff166020830152565b610fea6004356000526006602052604060002090565b815160209092015160a01b7fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606460405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152fd5b346102295760008060031936011261065d57604051908060035461109f8161040b565b8085529160019180831690811561061557506001146110c8576105b6856105aa818703826104de565b9250600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061110b5750505081016020016105aa826105b661059a565b805460208587018101919091529093019281016110f0565b34610229576080600319360112610229576004356111408161020b565b602435906044359060643567ffffffffffffffff81116102295761116890369060040161068b565b90611171613dc5565b73ffffffffffffffffffffffffffffffffffffffff811692600094848652856020526040862081875260205260408620948554838101809111611200576111fd9655866040517fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f623391806111f388888360209093929193604081019481520152565b0390a45a92612194565b80f35b611fe8565b3461022957611213366106d2565b61121b613d70565b805167ffffffffffffffff81116104a9576112408161123b60035461040b565b614621565b602080601f831160011461127d57508192600092611272575b50506000198260011b9260031b1c191617600355600080f35b015190503880611259565b90601f198316936112b060036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90565b926000905b8682106112ec57505083600195106112d3575b505050811b01600355005b015160001960f88460031b161c191690553880806112c8565b806001859682949686015181550195019301906112b5565b3461022957604060031936011261022957602060ff61135c6024356113288161020b565b6004356000526007845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166040519015158152f35b3461022957611376366106d2565b61137e613d70565b805167ffffffffffffffff81116104a9576113a38161139e60085461040b565b614692565b602080601f83116001146113e0575081926000926113d5575b50506000198260011b9260031b1c191617600855600080f35b0151905038806113bc565b90601f1983169361141360086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390565b926000905b86821061144f5750508360019510611436575b505050811b01600855005b015160001960f88460031b161c1916905538808061142b565b80600185968294968601518155019501930190611418565b3461022957600060031936011261022957602060405160008152f35b8015150361022957565b34610229576040600319360112610229576004356114aa8161020b565b73ffffffffffffffffffffffffffffffffffffffff602435916114cc83611483565b336000526001602052611537836115078360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b604051921515835216907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b346102295760c0600319360112610229576004356115868161020b565b602435906115938261020b565b67ffffffffffffffff91604435838111610229576115b5903690600401610a86565b606435848111610229576115cd903690600401610a86565b90608435926115db84611483565b60a435958611610229576115f66103fe96369060040161068b565b94612a8c565b34610229576080600319360112610229576004356116198161020b565b67ffffffffffffffff6024358181116102295761163a903690600401610a86565b9160443582811161022957611653903690600401610a86565b916064359081116102295761166c90369060040161068b565b91611675613dc5565b835181510361175257835160005b8181106116e65750506103fe93604051600073ffffffffffffffffffffffffffffffffffffffff8516917f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb3391806116dc8888836123d2565b0390a45a926125cd565b806116f461174d92856123b9565b5161174661173e6117258873ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b61172f858c6123b9565b51600052602052604060002090565b91825461204f565b905561237b565b611683565b608460405162461bcd60e51b815260206004820152603060248201527f455243313135354d696e744275726e2362617463684d696e743a20494e56414c60448201527f49445f4152524159535f4c454e475448000000000000000000000000000000006064820152fd5b346102295760c0600319360112610229576004356117d98161020b565b602435906117e68261020b565b604435906064356084356117f981611483565b60a43567ffffffffffffffff81116102295761181990369060040161068b565b73ffffffffffffffffffffffffffffffffffffffff86161561192e576118c46118d8916118446128de565b506000841561192557506118d260015b604051938491888b8d8c6020870191959493909260a09360c08401977fce0b514b3931bdbe4d5d44e4f035afe7113767b7db71949271f6a62d9c60f558855273ffffffffffffffffffffffffffffffffffffffff8092166020860152166040840152606083015260808201520152565b03601f1981018452836104de565b85612d8d565b906118e58386888761205c565b1561191957906103fe9461190583602080611914965183010191016129aa565b929095602087015192866122a0565b61307d565b926103fe945a936122a0565b6118d290611854565b608460405162461bcd60e51b815260206004820152603360248201527f455243313135354d657461236d657461536166655472616e7366657246726f6d60448201527f3a20494e56414c49445f524543495049454e54000000000000000000000000006064820152fd5b34610229576040600319360112610229576103fe6024356004356119bb8261020b565b8060005260076020526119d5600160406000200154613e1a565b6141d3565b346102295760008060031936011261065d5760405190806008546119fd8161040b565b808552916001918083169081156106155750600114611a26576105b6856105aa818703826104de565b9250600883527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee35b828410611a695750505081016020016105aa826105b661059a565b80546020858701810191909152909301928101611a4e565b3461022957604060031936011261022957602060ff61135c600435611aa58161020b565b73ffffffffffffffffffffffffffffffffffffffff60243591611ac78361020b565b166000526001845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b346102295760a060031936011261022957600435611b168161020b565b60243590611b238261020b565b6044359060643560843567ffffffffffffffff811161022957611b4a90369060040161068b565b9273ffffffffffffffffffffffffffffffffffffffff94858416803314908115611c02575b5015611b9857611b856103fe9682161515611f06565b611b918383838761205c565b5a936122a0565b608460405162461bcd60e51b815260206004820152602a60248201527f4552433131353523736166655472616e7366657246726f6d3a20494e56414c4960448201527f445f4f50455241544f52000000000000000000000000000000000000000000006064820152fd5b9050600052600160205260ff611c3c3360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541638611b6f565b346102295760a060031936011261022957600435611c618161020b565b60243590611c6e8261020b565b60443591611c7b83611483565b60643590611c8882611483565b60843567ffffffffffffffff811161022957611cab611d3391369060040161068b565b60008615611e0157506001905b60008515611df757506118d26001925b6118c4604051948592888b60208601909260809295949360a08301967ff5d4c820494c8595de274c7ff619bead38aac4fbc3d143b5bf956aa4b84fa524845273ffffffffffffffffffffffffffffffffffffffff809216602085015216604083015260608201520152565b93611d8b8161150784611d668873ffffffffffffffffffffffffffffffffffffffff166000526001602052604060002090565b9073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b604051901515815273ffffffffffffffffffffffffffffffffffffffff918216918416907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3611ddb57005b611df1826020806103fe95518301019101612bec565b9061307d565b6118d29092611cc8565b90611cb8565b346102295760c060031936011261022957600435611e248161020b565b67ffffffffffffffff9060243582811161022957611e4690369060040161068b565b60443583811161022957611e5e90369060040161068b565b60643593841161022957611e796103fe94369060040161068b565b9060843592611e878461020b565b611e8f61039d565b946148cb565b3461022957608060031936011261022957600435611eb28161020b565b67ffffffffffffffff60443581811161022957611ed390369060040161068b565b9160643591821161022957602092611ef2611efc93369060040161068b565b91602435906138fc565b6040519015158152f35b15611f0d57565b608460405162461bcd60e51b815260206004820152602b60248201527f4552433131353523736166655472616e7366657246726f6d3a20494e56414c4960448201527f445f524543495049454e540000000000000000000000000000000000000000006064820152fd5b15611f7e57565b608460405162461bcd60e51b815260206004820152603060248201527f45524331313535237361666542617463685472616e7366657246726f6d3a204960448201527f4e56414c49445f524543495049454e54000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b90600019820191821161120057565b9190820391821161120057565b906064820180921161120057565b906001820180921161120057565b9190820180921161120057565b9291909173ffffffffffffffffffffffffffffffffffffffff809416926000948486528560205260408620848752602052604086209182548481039081116112005760409355169485815280602052818120848252602052208054918083018093116112005791905560408051928352602083019190915233917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6291819081015b0390a4565b90816020910312610229575161055a81610287565b6040513d6000823e3d90fd5b1561212a57565b608460405162461bcd60e51b815260206004820152603a60248201527f45524331313535235f63616c6c6f6e4552433131353552656365697665643a2060448201527f494e56414c49445f4f4e5f524543454956455f4d4553534147450000000000006064820152fd5b93909291936121a281613477565b6121ae575b5050505050565b61222194600060209473ffffffffffffffffffffffffffffffffffffffff6040518099819782967ff23a6e61000000000000000000000000000000000000000000000000000000009b8c85523360048601528760248601526044850152606484015260a0608484015260a4830190610524565b03941690f191821561229b57612263927fffffffff000000000000000000000000000000000000000000000000000000009160009161226d575b501614612123565b38808080806121a7565b61228e915060203d8111612294575b61228681836104de565b810190612102565b3861225b565b503d61227c565b612117565b949193926122ad82613477565b6122ba575b505050505050565b600060209461232f976040518099819782967ff23a6e61000000000000000000000000000000000000000000000000000000009b8c855233600486015273ffffffffffffffffffffffffffffffffffffffff80961660248601526044850152606484015260a0608484015260a4830190610524565b03941690f191821561229b57612370927fffffffff000000000000000000000000000000000000000000000000000000009160009161226d57501614612123565b3880808080806122b2565b60001981146112005760010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80518210156123cd5760209160051b010190565b61238a565b90916123e961055a93604084526040840190610e2a565b916020818403910152610e2a565b92919081518351036124f257815160005b81811061245f5750506120fd7f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb9160405191829173ffffffffffffffffffffffffffffffffffffffff8091169716953395836123d2565b8061246d6124ed92876123b9565b516124b06124a861249e8a73ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b61172f858a6123b9565b918254612026565b90556124bc81876123b9565b5161174661173e61249e8773ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b612408565b608460405162461bcd60e51b815260206004820152603560248201527f45524331313535235f7361666542617463685472616e7366657246726f6d3a2060448201527f494e56414c49445f4152524159535f4c454e47544800000000000000000000006064820152fd5b1561256357565b608460405162461bcd60e51b815260206004820152603f60248201527f45524331313535235f63616c6c6f6e455243313135354261746368526563656960448201527f7665643a20494e56414c49445f4f4e5f524543454956455f4d455353414745006064820152fd5b929190926125da81613477565b6125e5575050505050565b61267694600060209473ffffffffffffffffffffffffffffffffffffffff6040518099819782966126676126547fbc197c81000000000000000000000000000000000000000000000000000000009d8e875233600488015289602488015260a0604488015260a4870190610e2a565b6003199384878303016064880152610e2a565b91848303016084850152610524565b03941690f191821561229b57612263927fffffffff00000000000000000000000000000000000000000000000000000000916000916126b8575b50161461255c565b6126d0915060203d81116122945761228681836104de565b386126b0565b94939291936126e482613477565b6126f057505050505050565b6000602094612761976040518099819782966126676126547fbc197c81000000000000000000000000000000000000000000000000000000009d8e875233600488015273ffffffffffffffffffffffffffffffffffffffff809816602488015260a0604488015260a4870190610e2a565b03941690f191821561229b57612370927fffffffff00000000000000000000000000000000000000000000000000000000916000916126b85750161461255c565b906127ac82610a6e565b6127b960405191826104de565b828152601f196127c98294610a6e565b0190602036910137565b9190918051835103612874576127e981516127a2565b9060005b815181101561286d578061285761284d61282761280d61286895876123b9565b5173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b61172f83896123b9565b5461286282866123b9565b5261237b565b6127ed565b5090925050565b608460405162461bcd60e51b815260206004820152602c60248201527f455243313135352362616c616e63654f6642617463683a20494e56414c49445f60448201527f41525241595f4c454e47544800000000000000000000000000000000000000006064820152fd5b604051906128eb8261048d565b606080836000815260006020820152600060408201520152565b81601f8201121561022957805161291b8161066f565b9261292960405194856104de565b818452602082840101116102295761055a9160208085019101610501565b919060808382031261022957604051906129608261048d565b81938051835260208101516020840152604081015161297e8161020b565b604084015260608101519167ffffffffffffffff8311610229576060926129a59201612905565b910152565b9190916040818403126102295780519267ffffffffffffffff9384811161022957816129d7918401612947565b9360208301519081116102295761055a9201612905565b156129f557565b608460405162461bcd60e51b815260206004820152603860248201527f455243313135354d657461236d6574615361666542617463685472616e73666560448201527f7246726f6d3a20494e56414c49445f524543495049454e5400000000000000006064820152fd5b805160208092019160005b828110612a78575050505090565b835185529381019392810192600101612a6a565b92909493612ab173ffffffffffffffffffffffffffffffffffffffff871615156129ee565b612ab96128de565b50612b9e8460405196612b9860209889612b8c8c8a84612adc8582018093612a5f565b0394612af0601f19968781018352826104de565b5190208a604051612b1481612b088882018095612a5f565b038881018352826104de565b5190209060008b15612be657506001925b604080517fa3d4926e8cf8fe8e020cd29f514c256bc2eec62aa2337e415f1a33a4828af5a097810197885273ffffffffffffffffffffffffffffffffffffffff9b8c1660208901529a909116908601526060850152608084015260a0830152859160c00190565b039081018452836104de565b86612d8d565b90612bab838589886123f7565b15612bd857946119149291612bcb87878061066d9a5183010191016129aa565b93909687015192866126d6565b93509061066d945a936126d6565b92612b25565b9060208282031261022957815167ffffffffffffffff81116102295761055a9201612947565b9190916040818403126102295780519267ffffffffffffffff9384811161022957816129d7918401612905565b15612c4657565b608460405162461bcd60e51b815260206004820152602f60248201527f455243313135354d657461235f7369676e617475726556616c69646174696f6e60448201527f3a20494e56414c49445f4e4f4e434500000000000000000000000000000000006064820152fd5b90612cc360209282815194859201610501565b0190565b602090612cdd6040959382815194859201610501565b0191825260208201520190565b602093929190612d01859282815194859201610501565b01908152612d1782518093858085019101610501565b010190565b15612d2357565b608460405162461bcd60e51b815260206004820152603360248201527f455243313135354d657461235f7369676e617475726556616c69646174696f6e60448201527f3a20494e56414c49445f5349474e4154555245000000000000000000000000006064820152fd5b91612ed990612da861055a9360208082518301019101612c12565b949091612dd58273ffffffffffffffffffffffffffffffffffffffff166000526002602052604060002090565b5491612df5612de385613565565b93808510159081612ede575b50612c3f565b612e9083612e57895160208b0120612e376040519182612e1b6020820192878b85612cc7565b0392612e2f601f19948581018352826104de565b5190206135ff565b95612e4b8c604051998a9360208501612cea565b039081018752866104de565b612e6081612041565b612e8a8473ffffffffffffffffffffffffffffffffffffffff166000526002602052604060002090565b55612041565b60405190815273ffffffffffffffffffffffffffffffffffffffff8216907fb861b7bdbe611a846ab271b8d2810391bc8b5a968f390c322438ecab66bccf5990602090a26138fc565b612d1c565b612ee89150612033565b841038612def565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60031115612f2957565b612ef0565b15612f3557565b608460405162461bcd60e51b815260206004820152602e60248201527f455243313135354d657461235f7472616e736665724761734665653a20554e5360448201527f5550504f525445445f544f4b454e0000000000000000000000000000000000006064820152fd5b90816020910312610229575161055a8161020b565b90816020910312610229575161055a81611483565b15612fd057565b608460405162461bcd60e51b815260206004820152603260248201527f455243313135354d657461235f7472616e736665724761734665653a2045524360448201527f32305f5452414e534645525f4641494c454400000000000000000000000000006064820152fd5b919082604091031261022957602082516130538161020b565b92015190565b604051906020820182811067ffffffffffffffff8211176104a95760405260008252565b606082019160ff61309761309185516134ad565b60f81c90565b166130a460028210612f2e565b6130ad81612f1f565b6130d06040835193015173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff94908581166132d2575033915b6130fb81612f1f565b6131e65761311390516020808251830101910161303a565b94169330850361313e5761066d945061312e8382848761205c565b5a91613138613059565b946122a0565b919390813b1561022957600080946131c2604051978896879586947ff242432a00000000000000000000000000000000000000000000000000000000865260048601929060c0949273ffffffffffffffffffffffffffffffffffffffff80921685521660208401526040830152606082015260a06080820152600060a08201520190565b03925af1801561229b576131d35750565b806131e061066d926104ae565b80610400565b613288945090600061322661320d61320d61320d6020989651898082518301019101612f9f565b73ffffffffffffffffffffffffffffffffffffffff1690565b92604051968795869485937f23b872dd0000000000000000000000000000000000000000000000000000000085526004850160409194939294606082019573ffffffffffffffffffffffffffffffffffffffff80921683521660208201520152565b03925af1801561229b5761066d916000916132a4575b50612fc9565b6132c5915060203d81116132cb575b6132bd81836104de565b810190612fb4565b3861329e565b503d6132b3565b916130f2565b604051906132e58261048d565b604282526060366020840137565b90600a820291808304600a149015171561120057565b8181029291811591840414171561120057565b60ff166030019060ff821161120057565b8051604010156123cd5760600190565b8051156123cd5760200190565b8051600110156123cd5760210190565b9081518110156123cd570160200190565b801561343d578060008281935b6134295750816133878461066f565b9361339560405195866104de565b808552601f196133a48261066f565b01366020870137905b6133b75750505090565b6133c090612017565b91826134216134186133f06133eb6133e5600a8704966133df886132f3565b90612026565b60ff1690565b61331c565b60f81b7fff000000000000000000000000000000000000000000000000000000000000001690565b841a918661335a565b5391826133ad565b92613435600a9161237b565b930480613378565b5060405161344a816104c2565b600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b3f8015159081613485575090565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709150141590565b8051156134fb5780519060001991828101908111611200576134f07fff00000000000000000000000000000000000000000000000000000000000000918361335a565b511691815101905290565b608460405162461bcd60e51b815260206004820152603760248201527f4c6962427974657323706f704c617374427974653a20475245415445525f544860448201527f414e5f5a45524f5f4c454e4754485f52455155495245440000000000000000006064820152fd5b6061815110613575576061015190565b608460405162461bcd60e51b815260206004820152603c60248201527f4c696242797465732372656164427974657333323a20475245415445525f4f5260448201527f5f455155414c5f544f5f33325f4c454e4754485f5245515549524544000000006064820152fd5b6020815110613575576020015190565b6040815110613575576040015190565b60409081519061360e826104c2565b6002825260208201927f1901000000000000000000000000000000000000000000000000000000000000845280519060208201917f035aff83d86937d35b32e04f0ddc6ff469290eef2f1b692d8a815c89404d474983523082820152818152606081019481861067ffffffffffffffff8711176104a9576136c19460609487855283519020916136a760808501998a9251928391610501565b830191608083015260a082015203908101845201826104de565b51902090565b156136ce57565b60a460405162461bcd60e51b815260206004820152604360248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a204c454e4754485f475245415445525f5448414e5f305f524551554960648201527f52454400000000000000000000000000000000000000000000000000000000006084820152fd5b1561376557565b608460405162461bcd60e51b815260206004820152603360248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a20494e56414c49445f5349474e4552000000000000000000000000006064820152fd5b60061115612f2957565b156137e057565b60405162461bcd60e51b815260206004820152603a60248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a20554e535550504f525445445f5349474e41545552450000000000006064820152608490fd5b0390fd5b60409061055a939281528160208201520190610524565b909161387d61055a93604084526040840190610524565b916020818403910152610524565b1561389257565b608460405162461bcd60e51b815260206004820152603760248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a204c454e4754485f39375f52455155495245440000000000000000006064820152fd5b919060009161390d855115156136c7565b73ffffffffffffffffffffffffffffffffffffffff8094169461393186151561375e565b60ff61393f613091836134ad565b169161394d600584106137d9565b613956836137cf565b61395f836137cf565b826139cf5760405162461bcd60e51b815260206004820152603660248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a20494c4c4547414c5f5349474e4154555245000000000000000000006064820152608490fd5b826139da86946137cf565b60018103613a7a5750506020926139f4606183511461388b565b613a66613a00836135df565b92613a3f613091613a19613a13846135ef565b9361332d565b517fff000000000000000000000000000000000000000000000000000000000000001690565b93604051948594859094939260ff6060936080840197845216602083015260408201520152565b838052039060015afa1561229b5751161490565b90919250613a87816137cf565b60028103613b2b57505060209181613aa360618694511461388b565b613a66613aaf826135df565b91613ac2613091613a19613a13846135ef565b93604051613b01816108818a82019485603c917f19457468657265756d205369676e6564204d6573736167653a0a3332000000008252601c8201520190565b51902092604051948594859094939260ff6060936080840197845216602083015260408201520152565b90959291939450613b3b816137cf565b60038103613bd9575050613b829160209160405180809581947f20c13b0b00000000000000000000000000000000000000000000000000000000998a845260048401613866565b03915afa90811561229b577fffffffff000000000000000000000000000000000000000000000000000000009291613bbb575b50161490565b613bd3915060203d81116122945761228681836104de565b38613bb5565b6004919550613be7816137cf565b14613c575760405162461bcd60e51b815260206004820152603a60248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a20554e535550504f525445445f5349474e41545552450000000000006064820152608490fd5b613b829160209160405180809581947f1626ba7e00000000000000000000000000000000000000000000000000000000998a84526004840161384f565b3360009081527fd838e0c4bf6fbf1b92284c80395eaed7cb9e717c948275160db5e385e7ed0c8f602052604090205460ff1615613ccd57565b61384b6048613d58613cde3361433c565b610881613ce96143d9565b6040519485937f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006020860152613d29815180926020603789019101610501565b84017f206973206d697373696e6720726f6c652000000000000000000000000000000060378201520190612cb0565b60405191829162461bcd60e51b835260048301610549565b3360009081527ff1ea39e85fdf1b91eed6f63005412888c26eb79f5123dd508f2e1d38c8ded730602052604090205460ff1615613da957565b61384b6048613d58613dba3361433c565b610881613ce9614476565b3360009081527fa4bfd7afe708e2e87e7f0e2ad9b4d545417e0f795f57b5c5ab5d799c565a04f4602052604090205460ff1615613dfe57565b61384b6048613d58613e0f3361433c565b610881613ce9614513565b80600052600760205260ff613e533360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541615613e5d5750565b613e663361433c565b613e6e6132d8565b916030613e7a8461333d565b536078613e868461334a565b5360415b60018111613ea95761384b6048613d588561088188613ce988156142f1565b90600f81169060108210156123cd577f3031323334353637383961626364656600000000000000000000000000000000613ef2921a613ee8848761335a565b5360041c916142e4565b613e8a565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df602052604081205460ff1615613f48575050565b8080526007602052613f7d82604083209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fd838e0c4bf6fbf1b92284c80395eaed7cb9e717c948275160db5e385e7ed0c8f602052604081207f6db4061a20ca83a3be756ee172bd37a029093ac5afe4ce968c6d5435b43cb0119060ff905b54161561405b57505050565b808252600760205261409083604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527ff1ea39e85fdf1b91eed6f63005412888c26eb79f5123dd508f2e1d38c8ded730602052604081207fe02a0315b383857ac496e9d2b2546a699afaeb4e5e83a1fdef64376d0b74e5a59060ff9061404f565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fa4bfd7afe708e2e87e7f0e2ad9b4d545417e0f795f57b5c5ab5d799c565a04f4602052604081207f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a69060ff9061404f565b600090808252600760205260ff61420d84604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541661421857505050565b808252600760205261424d83604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b604051906142be826104c2565b60055473ffffffffffffffffffffffffffffffffffffffff8116835260a01c6020830152565b8015611200576000190190565b156142f857565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906060820182811067ffffffffffffffff8211176104a957604052602a8252604036602084013760306143718361333d565b53607861437d8361334a565b536029905b600182116143955761055a9150156142f1565b600f81169060108210156123cd577f30313233343536373839616263646566000000000000000000000000000000006143d3921a613ee8848661335a565b90614382565b7f6db4061a20ca83a3be756ee172bd37a029093ac5afe4ce968c6d5435b43cb0116144026132d8565b90603061440e8361333d565b53607861441a8361334a565b536041905b600182116144325761055a9150156142f1565b600f81169060108210156123cd577f3031323334353637383961626364656600000000000000000000000000000000614470921a613ee8848661335a565b9061441f565b7fe02a0315b383857ac496e9d2b2546a699afaeb4e5e83a1fdef64376d0b74e5a561449f6132d8565b9060306144ab8361333d565b5360786144b78361334a565b536041905b600182116144cf5761055a9150156142f1565b600f81169060108210156123cd577f303132333435363738396162636465660000000000000000000000000000000061450d921a613ee8848661335a565b906144bc565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661453c6132d8565b9060306145488361333d565b5360786145548361334a565b536041905b6001821161456c5761055a9150156142f1565b600f81169060108210156123cd577f30313233343536373839616263646566000000000000000000000000000000006145aa921a613ee8848661335a565b90614559565b601f81116145bc575050565b600090600482527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b906020601f850160051c83019410614617575b601f0160051c01915b82811061460c57505050565b818155600101614600565b90925082906145f7565b601f811161462d575050565b600090600382527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b906020601f850160051c83019410614688575b601f0160051c01915b82811061467d57505050565b818155600101614671565b9092508290614668565b601f811161469e575050565b600090600882527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3906020601f850160051c830194106146f9575b601f0160051c01915b8281106146ee57505050565b8181556001016146e2565b90925082906146d9565b90815167ffffffffffffffff81116104a9576147248161123b60035461040b565b602080601f831160011461475f5750819293600092614754575b50506000198260011b9260031b1c191617600355565b01519050388061473e565b90601f1983169461479260036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90565b926000905b8782106147cf5750508360019596106147b6575b505050811b01600355565b015160001960f88460031b161c191690553880806147ab565b80600185968294968601518155019501930190614797565b90815167ffffffffffffffff81116104a9576148088161139e60085461040b565b602080601f83116001146148435750819293600092614838575b50506000198260011b9260031b1c191617600855565b015190503880614822565b90601f1983169461487660086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390565b926000905b8782106148b357505083600195961061489a575b505050811b01600855565b015160001960f88460031b161c1916905538808061488f565b8060018596829496860151815501950193019061487b565b949392919073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163314801590614a9f575b614a755780519067ffffffffffffffff82116104a9576149368261073360045461040b565b60209081601f84116001146149dc575061499c959383614981946149a19a99979461497c946000926149d1575b50506000198260011b9260031b1c191617600455614703565b6147e7565b61498a84613ef7565b61499384613fe5565b6103f9846140f7565b614165565b61066d60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006009541617600955565b015190503880614963565b60046000529190601f1984167f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b936000905b828210614a5d575050846149a19a99979461497c9461499c9a98946149819860019510614a44575b505050811b01600455614703565b015160001960f88460031b161c19169055388080614a36565b80600186978294978701518155019601940190614a0e565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b5060ff60095416614911565b15614ab257565b608460405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff831691614b4f612710841115614aab565b16918215614b96577fffffffffffffffffffffffff0000000000000000000000000000000000000000916020604051614b87816104c2565b858152015260a01b1617600555565b606460405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167fd9b67a26000000000000000000000000000000000000000000000000000000008114614c48577f01ffc9a7000000000000000000000000000000000000000000000000000000001490565b50600190565b7f0e89341c000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821614614c485761055a90614bda565b614ca981614d5e565b908115614cf7575b8115614ccc575b8115614cc2575090565b61055a9150614d08565b7fffffffff000000000000000000000000000000000000000000000000000000008116159150614cb8565b9050614d0281614d08565b90614cb1565b7f7965db0b000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821614908115614d58575090565b61055a91505b7fffffffff00000000000000000000000000000000000000000000000000000000167f2a55205a000000000000000000000000000000000000000000000000000000008114908115614dae575090565b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150149056fea2646970667358221220da7edc53bd70faf3ce7922a90648e3c6835ecb5f5afd2e357d8417db93d85b3b64736f6c63430008130033', + signer + ) + } +} + +export const ERC1155MINTERFACTORY_VERIFICATION: Omit = { + contractToVerify: 'src/tokens/ERC1155/presets/minter/ERC1155TokenMinterFactory.sol:ERC1155TokenMinterFactory', + version: 'v0.8.19+commit.7dd6d404', + compilerInput: { + language: 'Solidity', + sources: { + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC1155.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\nimport \'./IERC165.sol\';\n\n\ninterface IERC1155 is IERC165 {\n\n /****************************************|\n | Events |\n |_______________________________________*/\n\n /**\n * @dev Either TransferSingle or TransferBatch MUST emit when tokens are transferred, including zero amount transfers as well as minting or burning\n * Operator MUST be msg.sender\n * When minting/creating tokens, the `_from` field MUST be set to `0x0`\n * When burning/destroying tokens, the `_to` field MUST be set to `0x0`\n * The total amount transferred from address 0x0 minus the total amount transferred to 0x0 may be used by clients and exchanges to be added to the "circulating supply" for a given token ID\n * To broadcast the existence of a token ID with no initial balance, the contract SHOULD emit the TransferSingle event from `0x0` to `0x0`, with the token creator as `_operator`, and a `_amount` of 0\n */\n event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _amount);\n\n /**\n * @dev Either TransferSingle or TransferBatch MUST emit when tokens are transferred, including zero amount transfers as well as minting or burning\n * Operator MUST be msg.sender\n * When minting/creating tokens, the `_from` field MUST be set to `0x0`\n * When burning/destroying tokens, the `_to` field MUST be set to `0x0`\n * The total amount transferred from address 0x0 minus the total amount transferred to 0x0 may be used by clients and exchanges to be added to the "circulating supply" for a given token ID\n * To broadcast the existence of multiple token IDs with no initial balance, this SHOULD emit the TransferBatch event from `0x0` to `0x0`, with the token creator as `_operator`, and a `_amount` of 0\n */\n event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _amounts);\n\n /**\n * @dev MUST emit when an approval is updated\n */\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n\n /****************************************|\n | Functions |\n |_______________________________________*/\n\n /**\n * @notice Transfers amount of an _id from the _from address to the _to address specified\n * @dev MUST emit TransferSingle event on success\n * Caller must be approved to manage the _from account\'s tokens (see isApprovedForAll)\n * MUST throw if `_to` is the zero address\n * MUST throw if balance of sender for token `_id` is lower than the `_amount` sent\n * MUST throw on any other error\n * When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0). If so, it MUST call `onERC1155Received` on `_to` and revert if the return amount is not `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`\n * @param _from Source address\n * @param _to Target address\n * @param _id ID of the token type\n * @param _amount Transfered amount\n * @param _data Additional data with no specified format, sent in call to `_to`\n */\n function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount, bytes calldata _data) external;\n\n /**\n * @notice Send multiple types of Tokens from the _from address to the _to address (with safety call)\n * @dev MUST emit TransferBatch event on success\n * Caller must be approved to manage the _from account\'s tokens (see isApprovedForAll)\n * MUST throw if `_to` is the zero address\n * MUST throw if length of `_ids` is not the same as length of `_amounts`\n * MUST throw if any of the balance of sender for token `_ids` is lower than the respective `_amounts` sent\n * MUST throw on any other error\n * When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0). If so, it MUST call `onERC1155BatchReceived` on `_to` and revert if the return amount is not `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`\n * Transfers and events MUST occur in the array order they were submitted (_ids[0] before _ids[1], etc)\n * @param _from Source addresses\n * @param _to Target addresses\n * @param _ids IDs of each token type\n * @param _amounts Transfer amounts per token type\n * @param _data Additional data with no specified format, sent in call to `_to`\n */\n function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _amounts, bytes calldata _data) external;\n\n /**\n * @notice Get the balance of an account\'s Tokens\n * @param _owner The address of the token holder\n * @param _id ID of the Token\n * @return The _owner\'s balance of the Token type requested\n */\n function balanceOf(address _owner, uint256 _id) external view returns (uint256);\n\n /**\n * @notice Get the balance of multiple account/token pairs\n * @param _owners The addresses of the token holders\n * @param _ids ID of the Tokens\n * @return The _owner\'s balance of the Token types requested (i.e. balance for each (owner, id) pair)\n */\n function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);\n\n /**\n * @notice Enable or disable approval for a third party ("operator") to manage all of caller\'s tokens\n * @dev MUST emit the ApprovalForAll event on success\n * @param _operator Address to add to the set of authorized operators\n * @param _approved True if the operator is approved, false to revoke approval\n */\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /**\n * @notice Queries the approval status of an operator for a given owner\n * @param _owner The owner of the Tokens\n * @param _operator Address of authorized operator\n * @return isOperator True if the operator is approved, false if not\n */\n function isApprovedForAll(address _owner, address _operator) external view returns (bool isOperator);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC1155Metadata.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n\ninterface IERC1155Metadata {\n\n event URI(string _uri, uint256 indexed _id);\n\n /****************************************|\n | Functions |\n |_______________________________________*/\n\n /**\n * @notice A distinct Uniform Resource Identifier (URI) for a given token.\n * @dev URIs are defined in RFC 3986.\n * URIs are assumed to be deterministically generated based on token ID\n * Token IDs are assumed to be represented in their hex format in URIs\n * @return URI string\n */\n function uri(uint256 _id) external view returns (string memory);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC1155TokenReceiver.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1155 interface for accepting safe transfers.\n */\ninterface IERC1155TokenReceiver {\n\n /**\n * @notice Handle the receipt of a single ERC1155 token type\n * @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated\n * This function MAY throw to revert and reject the transfer\n * Return of other amount than the magic value MUST result in the transaction being reverted\n * Note: The token contract address is always the message sender\n * @param _operator The address which called the `safeTransferFrom` function\n * @param _from The address which previously owned the token\n * @param _id The id of the token being transferred\n * @param _amount The amount of tokens being transferred\n * @param _data Additional data with no specified format\n * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`\n */\n function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _amount, bytes calldata _data) external returns(bytes4);\n\n /**\n * @notice Handle the receipt of multiple ERC1155 token types\n * @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated\n * This function MAY throw to revert and reject the transfer\n * Return of other amount than the magic value WILL result in the transaction being reverted\n * Note: The token contract address is always the message sender\n * @param _operator The address which called the `safeBatchTransferFrom` function\n * @param _from The address which previously owned the token\n * @param _ids An array containing ids of each token being transferred\n * @param _amounts An array containing amounts of each token being transferred\n * @param _data Additional data with no specified format\n * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`\n */\n function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _amounts, bytes calldata _data) external returns(bytes4);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC1271Wallet.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n\ninterface IERC1271Wallet {\n\n /**\n * @notice Verifies whether the provided signature is valid with respect to the provided data\n * @dev MUST return the correct magic value if the signature provided is valid for the provided data\n * > The bytes4 magic value to return when signature is valid is 0x20c13b0b : bytes4(keccak256("isValidSignature(bytes,bytes)")\n * > This function MAY modify Ethereum\'s state\n * @param _data Arbitrary length data signed on the behalf of address(this)\n * @param _signature Signature byte array associated with _data\n * @return magicValue Magic value 0x20c13b0b if the signature is valid and 0x0 otherwise\n *\n */\n function isValidSignature(\n bytes calldata _data,\n bytes calldata _signature)\n external\n view\n returns (bytes4 magicValue);\n\n /**\n * @notice Verifies whether the provided signature is valid with respect to the provided hash\n * @dev MUST return the correct magic value if the signature provided is valid for the provided hash\n * > The bytes4 magic value to return when signature is valid is 0x20c13b0b : bytes4(keccak256("isValidSignature(bytes,bytes)")\n * > This function MAY modify Ethereum\'s state\n * @param _hash keccak256 hash that was signed\n * @param _signature Signature byte array associated with _data\n * @return magicValue Magic value 0x20c13b0b if the signature is valid and 0x0 otherwise\n */\n function isValidSignature(\n bytes32 _hash,\n bytes calldata _signature)\n external\n view\n returns (bytes4 magicValue);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC165.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n\n/**\n * @title ERC165\n * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md\n */\ninterface IERC165 {\n\n /**\n * @notice Query if a contract implements an interface\n * @dev Interface identification is specified in ERC-165. This function\n * uses less than 30,000 gas\n * @param _interfaceId The interface identifier, as specified in ERC-165\n */\n function supportsInterface(bytes4 _interfaceId)\n external\n view\n returns (bool);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC20.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/**\n * @title ERC20 interface\n * @dev see https://eips.ethereum.org/EIPS/eip-20\n */\ninterface IERC20 {\n function transfer(address to, uint256 value) external returns (bool);\n function approve(address spender, uint256 value) external returns (bool);\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n function totalSupply() external view returns (uint256);\n function balanceOf(address who) external view returns (uint256);\n function allowance(address owner, address spender) external view returns (uint256);\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport "../../interfaces/IERC1155TokenReceiver.sol";\nimport "../../interfaces/IERC1155.sol";\nimport "../../utils/Address.sol";\nimport "../../utils/ERC165.sol";\n\n/**\n * @dev Implementation of Multi-Token Standard contract\n */\ncontract ERC1155 is IERC1155, ERC165 {\n using Address for address;\n\n /***********************************|\n | Variables and Events |\n |__________________________________*/\n\n // onReceive function signatures\n bytes4 constant internal ERC1155_RECEIVED_VALUE = 0xf23a6e61;\n bytes4 constant internal ERC1155_BATCH_RECEIVED_VALUE = 0xbc197c81;\n\n // Objects balances\n mapping (address => mapping(uint256 => uint256)) internal balances;\n\n // Operator Functions\n mapping (address => mapping(address => bool)) internal operators;\n\n\n /***********************************|\n | Public Transfer Functions |\n |__________________________________*/\n\n /**\n * @notice Transfers amount amount of an _id from the _from address to the _to address specified\n * @param _from Source address\n * @param _to Target address\n * @param _id ID of the token type\n * @param _amount Transfered amount\n * @param _data Additional data with no specified format, sent in call to `_to`\n */\n function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount, bytes memory _data)\n public virtual override\n {\n require((msg.sender == _from) || isApprovedForAll(_from, msg.sender), "ERC1155#safeTransferFrom: INVALID_OPERATOR");\n require(_to != address(0),"ERC1155#safeTransferFrom: INVALID_RECIPIENT");\n\n _safeTransferFrom(_from, _to, _id, _amount);\n _callonERC1155Received(_from, _to, _id, _amount, gasleft(), _data);\n }\n\n /**\n * @notice Send multiple types of Tokens from the _from address to the _to address (with safety call)\n * @param _from Source addresses\n * @param _to Target addresses\n * @param _ids IDs of each token type\n * @param _amounts Transfer amounts per token type\n * @param _data Additional data with no specified format, sent in call to `_to`\n */\n function safeBatchTransferFrom(address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data)\n public virtual override\n {\n // Requirements\n require((msg.sender == _from) || isApprovedForAll(_from, msg.sender), "ERC1155#safeBatchTransferFrom: INVALID_OPERATOR");\n require(_to != address(0), "ERC1155#safeBatchTransferFrom: INVALID_RECIPIENT");\n\n _safeBatchTransferFrom(_from, _to, _ids, _amounts);\n _callonERC1155BatchReceived(_from, _to, _ids, _amounts, gasleft(), _data);\n }\n\n\n /***********************************|\n | Internal Transfer Functions |\n |__________________________________*/\n\n /**\n * @notice Transfers amount amount of an _id from the _from address to the _to address specified\n * @param _from Source address\n * @param _to Target address\n * @param _id ID of the token type\n * @param _amount Transfered amount\n */\n function _safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount)\n internal virtual\n {\n // Update balances\n balances[_from][_id] -= _amount;\n balances[_to][_id] += _amount;\n\n // Emit event\n emit TransferSingle(msg.sender, _from, _to, _id, _amount);\n }\n\n /**\n * @notice Verifies if receiver is contract and if so, calls (_to).onERC1155Received(...)\n */\n function _callonERC1155Received(address _from, address _to, uint256 _id, uint256 _amount, uint256 _gasLimit, bytes memory _data)\n internal virtual\n {\n // Check if recipient is contract\n if (_to.isContract()) {\n bytes4 retval = IERC1155TokenReceiver(_to).onERC1155Received{gas: _gasLimit}(msg.sender, _from, _id, _amount, _data);\n require(retval == ERC1155_RECEIVED_VALUE, "ERC1155#_callonERC1155Received: INVALID_ON_RECEIVE_MESSAGE");\n }\n }\n\n /**\n * @notice Send multiple types of Tokens from the _from address to the _to address (with safety call)\n * @param _from Source addresses\n * @param _to Target addresses\n * @param _ids IDs of each token type\n * @param _amounts Transfer amounts per token type\n */\n function _safeBatchTransferFrom(address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts)\n internal virtual\n {\n require(_ids.length == _amounts.length, "ERC1155#_safeBatchTransferFrom: INVALID_ARRAYS_LENGTH");\n\n // Number of transfer to execute\n uint256 nTransfer = _ids.length;\n\n // Executing all transfers\n for (uint256 i = 0; i < nTransfer; i++) {\n // Update storage balance of previous bin\n balances[_from][_ids[i]] -= _amounts[i];\n balances[_to][_ids[i]] += _amounts[i];\n }\n\n // Emit event\n emit TransferBatch(msg.sender, _from, _to, _ids, _amounts);\n }\n\n /**\n * @notice Verifies if receiver is contract and if so, calls (_to).onERC1155BatchReceived(...)\n */\n function _callonERC1155BatchReceived(address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, uint256 _gasLimit, bytes memory _data)\n internal virtual\n {\n // Pass data if recipient is contract\n if (_to.isContract()) {\n bytes4 retval = IERC1155TokenReceiver(_to).onERC1155BatchReceived{gas: _gasLimit}(msg.sender, _from, _ids, _amounts, _data);\n require(retval == ERC1155_BATCH_RECEIVED_VALUE, "ERC1155#_callonERC1155BatchReceived: INVALID_ON_RECEIVE_MESSAGE");\n }\n }\n\n\n /***********************************|\n | Operator Functions |\n |__________________________________*/\n\n /**\n * @notice Enable or disable approval for a third party ("operator") to manage all of caller\'s tokens\n * @param _operator Address to add to the set of authorized operators\n * @param _approved True if the operator is approved, false to revoke approval\n */\n function setApprovalForAll(address _operator, bool _approved)\n external virtual override\n {\n // Update operator status\n operators[msg.sender][_operator] = _approved;\n emit ApprovalForAll(msg.sender, _operator, _approved);\n }\n\n /**\n * @notice Queries the approval status of an operator for a given owner\n * @param _owner The owner of the Tokens\n * @param _operator Address of authorized operator\n * @return isOperator True if the operator is approved, false if not\n */\n function isApprovedForAll(address _owner, address _operator)\n public view virtual override returns (bool isOperator)\n {\n return operators[_owner][_operator];\n }\n\n\n /***********************************|\n | Balance Functions |\n |__________________________________*/\n\n /**\n * @notice Get the balance of an account\'s Tokens\n * @param _owner The address of the token holder\n * @param _id ID of the Token\n * @return The _owner\'s balance of the Token type requested\n */\n function balanceOf(address _owner, uint256 _id)\n public view virtual override returns (uint256)\n {\n return balances[_owner][_id];\n }\n\n /**\n * @notice Get the balance of multiple account/token pairs\n * @param _owners The addresses of the token holders\n * @param _ids ID of the Tokens\n * @return The _owner\'s balance of the Token types requested (i.e. balance for each (owner, id) pair)\n */\n function balanceOfBatch(address[] memory _owners, uint256[] memory _ids)\n public view virtual override returns (uint256[] memory)\n {\n require(_owners.length == _ids.length, "ERC1155#balanceOfBatch: INVALID_ARRAY_LENGTH");\n\n // Variables\n uint256[] memory batchBalances = new uint256[](_owners.length);\n\n // Iterate over each owner and token ID\n for (uint256 i = 0; i < _owners.length; i++) {\n batchBalances[i] = balances[_owners[i]][_ids[i]];\n }\n\n return batchBalances;\n }\n\n\n /***********************************|\n | ERC165 Functions |\n |__________________________________*/\n\n /**\n * @notice Query if a contract implements an interface\n * @param _interfaceID The interface identifier, as specified in ERC-165\n * @return `true` if the contract implements `_interfaceID` and\n */\n function supportsInterface(bytes4 _interfaceID) public view virtual override(ERC165, IERC165) returns (bool) {\n if (_interfaceID == type(IERC1155).interfaceId) {\n return true;\n }\n return super.supportsInterface(_interfaceID);\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Meta.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport "./ERC1155.sol";\nimport "../../interfaces/IERC20.sol";\nimport "../../interfaces/IERC1155.sol";\nimport "../../utils/LibBytes.sol";\nimport "../../utils/SignatureValidator.sol";\n\n\n/**\n * @dev ERC-1155 with native metatransaction methods. These additional functions allow users\n * to presign function calls and allow third parties to execute these on their behalf\n */\ncontract ERC1155Meta is ERC1155, SignatureValidator {\n using LibBytes for bytes;\n\n /***********************************|\n | Variables and Structs |\n |__________________________________*/\n\n /**\n * Gas Receipt\n * feeTokenData : (bool, address, ?unit256)\n * 1st element should be the address of the token\n * 2nd argument (if ERC-1155) should be the ID of the token\n * Last element should be a 0x0 if ERC-20 and 0x1 for ERC-1155\n */\n struct GasReceipt {\n uint256 gasFee; // Fixed cost for the tx\n uint256 gasLimitCallback; // Maximum amount of gas the callback in transfer functions can use\n address feeRecipient; // Address to send payment to\n bytes feeTokenData; // Data for token to pay for gas\n }\n\n // Which token standard is used to pay gas fee\n enum FeeTokenType {\n ERC1155, // 0x00, ERC-1155 token - DEFAULT\n ERC20, // 0x01, ERC-20 token\n NTypes // 0x02, number of signature types. Always leave at end.\n }\n\n // Signature nonce per address\n mapping (address => uint256) internal nonces;\n\n\n /***********************************|\n | Events |\n |__________________________________*/\n\n event NonceChange(address indexed signer, uint256 newNonce);\n\n\n /****************************************|\n | Public Meta Transfer Functions |\n |_______________________________________*/\n\n /**\n * @notice Allows anyone with a valid signature to transfer _amount amount of a token _id on the bahalf of _from\n * @param _from Source address\n * @param _to Target address\n * @param _id ID of the token type\n * @param _amount Transfered amount\n * @param _isGasFee Whether gas is reimbursed to executor or not\n * @param _data Encodes a meta transfer indicator, signature, gas payment receipt and extra transfer data\n * _data should be encoded as (\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType),\n * (GasReceipt g, ?bytes transferData)\n * )\n * i.e. high level encoding should be (bytes, bytes), where the latter bytes array is a nested bytes array\n */\n function metaSafeTransferFrom(\n address _from,\n address _to,\n uint256 _id,\n uint256 _amount,\n bool _isGasFee,\n bytes memory _data)\n public virtual\n {\n require(_to != address(0), "ERC1155Meta#metaSafeTransferFrom: INVALID_RECIPIENT");\n\n // Initializing\n bytes memory transferData;\n GasReceipt memory gasReceipt;\n\n // Verify signature and extract the signed data\n bytes memory signedData = _signatureValidation(\n _from,\n _data,\n abi.encode(\n META_TX_TYPEHASH,\n _from, // Address as uint256\n _to, // Address as uint256\n _id,\n _amount,\n _isGasFee ? uint256(1) : uint256(0) // Boolean as uint256\n )\n );\n\n // Transfer asset\n _safeTransferFrom(_from, _to, _id, _amount);\n\n // If Gas is being reimbursed\n if (_isGasFee) {\n (gasReceipt, transferData) = abi.decode(signedData, (GasReceipt, bytes));\n\n // We need to somewhat protect relayers against gas griefing attacks in recipient contract.\n // Hence we only pass the gasLimit to the recipient such that the relayer knows the griefing\n // limit. Nothing can prevent the receiver to revert the transaction as close to the gasLimit as\n // possible, but the relayer can now only accept meta-transaction gasLimit within a certain range.\n _callonERC1155Received(_from, _to, _id, _amount, gasReceipt.gasLimitCallback, transferData);\n\n // Transfer gas cost\n _transferGasFee(_from, gasReceipt);\n\n } else {\n _callonERC1155Received(_from, _to, _id, _amount, gasleft(), signedData);\n }\n }\n\n /**\n * @notice Allows anyone with a valid signature to transfer multiple types of tokens on the bahalf of _from\n * @param _from Source addresses\n * @param _to Target addresses\n * @param _ids IDs of each token type\n * @param _amounts Transfer amounts per token type\n * @param _isGasFee Whether gas is reimbursed to executor or not\n * @param _data Encodes a meta transfer indicator, signature, gas payment receipt and extra transfer data\n * _data should be encoded as (\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType),\n * (GasReceipt g, ?bytes transferData)\n * )\n * i.e. high level encoding should be (bytes, bytes), where the latter bytes array is a nested bytes array\n */\n function metaSafeBatchTransferFrom(\n address _from,\n address _to,\n uint256[] memory _ids,\n uint256[] memory _amounts,\n bool _isGasFee,\n bytes memory _data)\n public virtual\n {\n require(_to != address(0), "ERC1155Meta#metaSafeBatchTransferFrom: INVALID_RECIPIENT");\n\n // Initializing\n bytes memory transferData;\n GasReceipt memory gasReceipt;\n\n // Verify signature and extract the signed data\n bytes memory signedData = _signatureValidation(\n _from,\n _data,\n abi.encode(\n META_BATCH_TX_TYPEHASH,\n _from, // Address as uint256\n _to, // Address as uint256\n keccak256(abi.encodePacked(_ids)),\n keccak256(abi.encodePacked(_amounts)),\n _isGasFee ? uint256(1) : uint256(0) // Boolean as uint256\n )\n );\n\n // Transfer assets\n _safeBatchTransferFrom(_from, _to, _ids, _amounts);\n\n // If gas fee being reimbursed\n if (_isGasFee) {\n (gasReceipt, transferData) = abi.decode(signedData, (GasReceipt, bytes));\n\n // We need to somewhat protect relayers against gas griefing attacks in recipient contract.\n // Hence we only pass the gasLimit to the recipient such that the relayer knows the griefing\n // limit. Nothing can prevent the receiver to revert the transaction as close to the gasLimit as\n // possible, but the relayer can now only accept meta-transaction gasLimit within a certain range.\n _callonERC1155BatchReceived(_from, _to, _ids, _amounts, gasReceipt.gasLimitCallback, transferData);\n\n // Handle gas reimbursement\n _transferGasFee(_from, gasReceipt);\n\n } else {\n _callonERC1155BatchReceived(_from, _to, _ids, _amounts, gasleft(), signedData);\n }\n }\n\n\n /***********************************|\n | Operator Functions |\n |__________________________________*/\n\n /**\n * @notice Approve the passed address to spend on behalf of _from if valid signature is provided\n * @param _owner Address that wants to set operator status _spender\n * @param _operator Address to add to the set of authorized operators\n * @param _approved True if the operator is approved, false to revoke approval\n * @param _isGasFee Whether gas will be reimbursed or not, with vlid signature\n * @param _data Encodes signature and gas payment receipt\n * _data should be encoded as (\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType),\n * (GasReceipt g)\n * )\n * i.e. high level encoding should be (bytes, bytes), where the latter bytes array is a nested bytes array\n */\n function metaSetApprovalForAll(\n address _owner,\n address _operator,\n bool _approved,\n bool _isGasFee,\n bytes memory _data)\n public virtual\n {\n // Verify signature and extract the signed data\n bytes memory signedData = _signatureValidation(\n _owner,\n _data,\n abi.encode(\n META_APPROVAL_TYPEHASH,\n _owner, // Address as uint256\n _operator, // Address as uint256\n _approved ? uint256(1) : uint256(0), // Boolean as uint256\n _isGasFee ? uint256(1) : uint256(0) // Boolean as uint256\n )\n );\n\n // Update operator status\n operators[_owner][_operator] = _approved;\n\n // Emit event\n emit ApprovalForAll(_owner, _operator, _approved);\n\n // Handle gas reimbursement\n if (_isGasFee) {\n GasReceipt memory gasReceipt = abi.decode(signedData, (GasReceipt));\n _transferGasFee(_owner, gasReceipt);\n }\n }\n\n\n /****************************************|\n | Signature Validation Functions |\n |_______________________________________*/\n\n // keccak256(\n // "metaSafeTransferFrom(address,address,uint256,uint256,bool,bytes)"\n // );\n bytes32 internal constant META_TX_TYPEHASH = 0xce0b514b3931bdbe4d5d44e4f035afe7113767b7db71949271f6a62d9c60f558;\n\n // keccak256(\n // "metaSafeBatchTransferFrom(address,address,uint256[],uint256[],bool,bytes)"\n // );\n bytes32 internal constant META_BATCH_TX_TYPEHASH = 0xa3d4926e8cf8fe8e020cd29f514c256bc2eec62aa2337e415f1a33a4828af5a0;\n\n // keccak256(\n // "metaSetApprovalForAll(address,address,bool,bool,bytes)"\n // );\n bytes32 internal constant META_APPROVAL_TYPEHASH = 0xf5d4c820494c8595de274c7ff619bead38aac4fbc3d143b5bf956aa4b84fa524;\n\n /**\n * @notice Verifies signatures for this contract\n * @param _signer Address of signer\n * @param _sigData Encodes signature, gas payment receipt and transfer data (if any)\n * @param _encMembers Encoded EIP-712 type members (except nonce and _data), all need to be 32 bytes size\n * @dev _data should be encoded as (\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType),\n * (GasReceipt g, ?bytes transferData)\n * )\n * i.e. high level encoding should be (bytes, bytes), where the latter bytes array is a nested bytes array\n * @dev A valid nonce is a nonce that is within 100 value from the current nonce\n */\n function _signatureValidation(\n address _signer,\n bytes memory _sigData,\n bytes memory _encMembers)\n internal virtual returns (bytes memory signedData)\n {\n bytes memory sig;\n\n // Get signature and data to sign\n (sig, signedData) = abi.decode(_sigData, (bytes, bytes));\n\n // Get current nonce and nonce used for signature\n uint256 currentNonce = nonces[_signer]; // Lowest valid nonce for signer\n uint256 nonce = uint256(sig.readBytes32(65)); // Nonce passed in the signature object\n\n // Verify if nonce is valid\n require(\n (nonce >= currentNonce) && (nonce < (currentNonce + 100)),\n "ERC1155Meta#_signatureValidation: INVALID_NONCE"\n );\n\n // Take hash of bytes arrays\n bytes32 hash = hashEIP712Message(keccak256(abi.encodePacked(_encMembers, nonce, keccak256(signedData))));\n\n // Complete data to pass to signer verifier\n bytes memory fullData = abi.encodePacked(_encMembers, nonce, signedData);\n\n //Update signature nonce\n nonces[_signer] = nonce + 1;\n emit NonceChange(_signer, nonce + 1);\n\n // Verify if _from is the signer\n require(isValidSignature(_signer, hash, fullData, sig), "ERC1155Meta#_signatureValidation: INVALID_SIGNATURE");\n return signedData;\n }\n\n /**\n * @notice Returns the current nonce associated with a given address\n * @param _signer Address to query signature nonce for\n */\n function getNonce(address _signer)\n public view virtual returns (uint256 nonce)\n {\n return nonces[_signer];\n }\n\n\n /***********************************|\n | Gas Reimbursement Functions |\n |__________________________________*/\n\n /**\n * @notice Will reimburse tx.origin or fee recipient for the gas spent execution a transaction\n * Can reimbuse in any ERC-20 or ERC-1155 token\n * @param _from Address from which the payment will be made from\n * @param _g GasReceipt object that contains gas reimbursement information\n */\n function _transferGasFee(address _from, GasReceipt memory _g)\n internal virtual\n {\n // Pop last byte to get token fee type\n uint8 feeTokenTypeRaw = uint8(_g.feeTokenData.popLastByte());\n\n // Ensure valid fee token type\n require(\n feeTokenTypeRaw < uint8(FeeTokenType.NTypes),\n "ERC1155Meta#_transferGasFee: UNSUPPORTED_TOKEN"\n );\n\n // Convert to FeeTokenType corresponding value\n FeeTokenType feeTokenType = FeeTokenType(feeTokenTypeRaw);\n\n // Declarations\n address tokenAddress;\n address feeRecipient;\n uint256 tokenID;\n uint256 fee = _g.gasFee;\n\n // If receiver is 0x0, then anyone can claim, otherwise, refund addresse provided\n feeRecipient = _g.feeRecipient == address(0) ? msg.sender : _g.feeRecipient;\n\n // Fee token is ERC1155\n if (feeTokenType == FeeTokenType.ERC1155) {\n (tokenAddress, tokenID) = abi.decode(_g.feeTokenData, (address, uint256));\n\n // Fee is paid from this ERC1155 contract\n if (tokenAddress == address(this)) {\n _safeTransferFrom(_from, feeRecipient, tokenID, fee);\n\n // No need to protect against griefing since recipient (if contract) is most likely owned by the relayer\n _callonERC1155Received(_from, feeRecipient, tokenID, gasleft(), fee, "");\n\n // Fee is paid from another ERC-1155 contract\n } else {\n IERC1155(tokenAddress).safeTransferFrom(_from, feeRecipient, tokenID, fee, "");\n }\n\n // Fee token is ERC20\n } else {\n tokenAddress = abi.decode(_g.feeTokenData, (address));\n require(\n IERC20(tokenAddress).transferFrom(_from, feeRecipient, fee),\n "ERC1155Meta#_transferGasFee: ERC20_TRANSFER_FAILED"\n );\n }\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Metadata.sol': { + content: + "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\nimport '../../interfaces/IERC1155Metadata.sol';\nimport '../../utils/ERC165.sol';\n\n/**\n * @notice Contract that handles metadata related methods.\n * @dev Methods assume a deterministic generation of URI based on token IDs.\n * Methods also assume that URI uses hex representation of token IDs.\n */\ncontract ERC1155Metadata is IERC1155Metadata, ERC165 {\n // URI's default URI prefix\n string public baseURI;\n string public name;\n\n // set the initial name and base URI\n constructor(string memory _name, string memory _baseURI) {\n name = _name;\n baseURI = _baseURI;\n }\n\n /***********************************|\n | Metadata Public Functions |\n |__________________________________*/\n\n /**\n * @notice A distinct Uniform Resource Identifier (URI) for a given token.\n * @dev URIs are defined in RFC 3986.\n * URIs are assumed to be deterministically generated based on token ID\n * @return URI string\n */\n function uri(uint256 _id) public view virtual override returns (string memory) {\n return string(abi.encodePacked(baseURI, _uint2str(_id), \".json\"));\n }\n\n\n /***********************************|\n | Metadata Internal Functions |\n |__________________________________*/\n\n /**\n * @notice Will emit default URI log event for corresponding token _id\n * @param _tokenIDs Array of IDs of tokens to log default URI\n */\n function _logURIs(uint256[] memory _tokenIDs) internal virtual {\n string memory baseURL = baseURI;\n string memory tokenURI;\n\n for (uint256 i = 0; i < _tokenIDs.length; i++) {\n tokenURI = string(abi.encodePacked(baseURL, _uint2str(_tokenIDs[i]), \".json\"));\n emit URI(tokenURI, _tokenIDs[i]);\n }\n }\n\n /**\n * @notice Will update the base URL of token's URI\n * @param _newBaseMetadataURI New base URL of token's URI\n */\n function _setBaseMetadataURI(string memory _newBaseMetadataURI) internal {\n baseURI = _newBaseMetadataURI;\n }\n\n /**\n * @notice Will update the name of the contract\n * @param _newName New contract name\n */\n function _setContractName(string memory _newName) internal {\n name = _newName;\n }\n\n /**\n * @notice Query if a contract implements an interface\n * @param _interfaceID The interface identifier, as specified in ERC-165\n * @return `true` if the contract implements `_interfaceID` and\n */\n function supportsInterface(bytes4 _interfaceID) public view virtual override returns (bool) {\n if (_interfaceID == type(IERC1155Metadata).interfaceId) {\n return true;\n }\n return super.supportsInterface(_interfaceID);\n }\n\n /***********************************|\n | Utility Internal Functions |\n |__________________________________*/\n\n function _uint2str(uint _i) internal pure returns (string memory _uintAsString) {\n if (_i == 0) {\n return '0';\n }\n uint j = _i;\n uint len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint k = len;\n while (_i != 0) {\n k = k - 1;\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\n bytes1 b1 = bytes1(temp);\n bstr[k] = b1;\n _i /= 10;\n }\n return string(bstr);\n }\n}\n" + }, + 'node_modules/@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155MintBurn.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\nimport "./ERC1155.sol";\n\n\n/**\n * @dev Multi-Fungible Tokens with minting and burning methods. These methods assume\n * a parent contract to be executed as they are `internal` functions\n */\ncontract ERC1155MintBurn is ERC1155 {\n\n /****************************************|\n | Minting Functions |\n |_______________________________________*/\n\n /**\n * @notice Mint _amount of tokens of a given id\n * @param _to The address to mint tokens to\n * @param _id Token id to mint\n * @param _amount The amount to be minted\n * @param _data Data to pass if receiver is contract\n */\n function _mint(address _to, uint256 _id, uint256 _amount, bytes memory _data)\n internal virtual\n {\n // Add _amount\n balances[_to][_id] += _amount;\n\n // Emit event\n emit TransferSingle(msg.sender, address(0x0), _to, _id, _amount);\n\n // Calling onReceive method if recipient is contract\n _callonERC1155Received(address(0x0), _to, _id, _amount, gasleft(), _data);\n }\n\n /**\n * @notice Mint tokens for each ids in _ids\n * @param _to The address to mint tokens to\n * @param _ids Array of ids to mint\n * @param _amounts Array of amount of tokens to mint per id\n * @param _data Data to pass if receiver is contract\n */\n function _batchMint(address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data)\n internal virtual\n {\n require(_ids.length == _amounts.length, "ERC1155MintBurn#batchMint: INVALID_ARRAYS_LENGTH");\n\n // Number of mints to execute\n uint256 nMint = _ids.length;\n\n // Executing all minting\n for (uint256 i = 0; i < nMint; i++) {\n // Update storage balance\n balances[_to][_ids[i]] += _amounts[i];\n }\n\n // Emit batch mint event\n emit TransferBatch(msg.sender, address(0x0), _to, _ids, _amounts);\n\n // Calling onReceive method if recipient is contract\n _callonERC1155BatchReceived(address(0x0), _to, _ids, _amounts, gasleft(), _data);\n }\n\n\n /****************************************|\n | Burning Functions |\n |_______________________________________*/\n\n /**\n * @notice Burn _amount of tokens of a given token id\n * @param _from The address to burn tokens from\n * @param _id Token id to burn\n * @param _amount The amount to be burned\n */\n function _burn(address _from, uint256 _id, uint256 _amount)\n internal virtual\n {\n //Substract _amount\n balances[_from][_id] -= _amount;\n\n // Emit event\n emit TransferSingle(msg.sender, _from, address(0x0), _id, _amount);\n }\n\n /**\n * @notice Burn tokens of given token id for each (_ids[i], _amounts[i]) pair\n * @param _from The address to burn tokens from\n * @param _ids Array of token ids to burn\n * @param _amounts Array of the amount to be burned\n */\n function _batchBurn(address _from, uint256[] memory _ids, uint256[] memory _amounts)\n internal virtual\n {\n // Number of mints to execute\n uint256 nBurn = _ids.length;\n require(nBurn == _amounts.length, "ERC1155MintBurn#batchBurn: INVALID_ARRAYS_LENGTH");\n\n // Executing all minting\n for (uint256 i = 0; i < nBurn; i++) {\n // Update storage balance\n balances[_from][_ids[i]] -= _amounts[i];\n }\n\n // Emit batch mint event\n emit TransferBatch(msg.sender, _from, address(0x0), _ids, _amounts);\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/Address.sol': { + content: + 'pragma solidity ^0.8.0;\n\n/**\n * Utility library of inline functions on addresses\n */\nlibrary Address {\n\n // Default hash for EOA accounts returned by extcodehash\n bytes32 constant internal ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n\n /**\n * Returns whether the target address is a contract\n * @dev This function will return false if invoked during the constructor of a contract.\n * @param _address address of the account to check\n * @return Whether the target address is a contract\n */\n function isContract(address _address) internal view returns (bool) {\n bytes32 codehash;\n\n // Currently there is no better way to check if there is a contract in an address\n // than to check the size of the code at that address or if it has a non-zero code hash or account hash\n assembly { codehash := extcodehash(_address) }\n return (codehash != 0x0 && codehash != ACCOUNT_HASH);\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/ERC165.sol': { + content: + 'pragma solidity ^0.8.0;\nimport "../interfaces/IERC165.sol";\n\nabstract contract ERC165 is IERC165 {\n /**\n * @notice Query if a contract implements an interface\n * @param _interfaceID The interface identifier, as specified in ERC-165\n * @return `true` if the contract implements `_interfaceID`\n */\n function supportsInterface(bytes4 _interfaceID) public view virtual override returns (bool) {\n return _interfaceID == this.supportsInterface.selector;\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/LibBytes.sol': { + content: + '/*\n Copyright 2018 ZeroEx Intl.\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n This is a truncated version of the original LibBytes.sol library from ZeroEx.\n*/\n\npragma solidity ^0.8.0;\n\n\nlibrary LibBytes {\n using LibBytes for bytes;\n\n /***********************************|\n | Pop Bytes Functions |\n |__________________________________*/\n\n /**\n * @dev Pops the last byte off of a byte array by modifying its length.\n * @param b Byte array that will be modified.\n * @return result The byte that was popped off.\n */\n function popLastByte(bytes memory b)\n internal\n pure\n returns (bytes1 result)\n {\n require(\n b.length > 0,\n "LibBytes#popLastByte: GREATER_THAN_ZERO_LENGTH_REQUIRED"\n );\n\n // Store last byte.\n result = b[b.length - 1];\n\n assembly {\n // Decrement length of byte array.\n let newLen := sub(mload(b), 1)\n mstore(b, newLen)\n }\n return result;\n }\n\n\n /***********************************|\n | Read Bytes Functions |\n |__________________________________*/\n\n /**\n * @dev Reads a bytes32 value from a position in a byte array.\n * @param b Byte array containing a bytes32 value.\n * @param index Index in byte array of bytes32 value.\n * @return result bytes32 value from byte array.\n */\n function readBytes32(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes32 result)\n {\n require(\n b.length >= index + 32,\n "LibBytes#readBytes32: GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED"\n );\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n result := mload(add(b, index))\n }\n return result;\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/LibEIP712.sol': { + content: + '/**\n * Copyright 2018 ZeroEx Intl.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npragma solidity ^0.8.0;\n\n\ncontract LibEIP712 {\n\n /***********************************|\n | Constants |\n |__________________________________*/\n\n // keccak256(\n // "EIP712Domain(address verifyingContract)"\n // );\n bytes32 internal constant DOMAIN_SEPARATOR_TYPEHASH = 0x035aff83d86937d35b32e04f0ddc6ff469290eef2f1b692d8a815c89404d4749;\n\n // EIP-191 Header\n string constant internal EIP191_HEADER = "\\x19\\x01";\n\n /***********************************|\n | Hashing Function |\n |__________________________________*/\n\n /**\n * @dev Calculates EIP712 encoding for a hash struct in this EIP712 Domain.\n * @param hashStruct The EIP712 hash struct.\n * @return result EIP712 hash applied to this EIP712 Domain.\n */\n function hashEIP712Message(bytes32 hashStruct)\n internal\n view\n returns (bytes32 result)\n {\n return keccak256(\n abi.encodePacked(\n EIP191_HEADER,\n keccak256(\n abi.encode(\n DOMAIN_SEPARATOR_TYPEHASH,\n address(this)\n )\n ),\n hashStruct\n ));\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/SignatureValidator.sol': { + content: + 'pragma solidity ^0.8.0;\n\nimport "../interfaces/IERC1271Wallet.sol";\nimport "./LibBytes.sol";\nimport "./LibEIP712.sol";\n\n\n/**\n * @dev Contains logic for signature validation.\n * Signatures from wallet contracts assume ERC-1271 support (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1271.md)\n * Notes: Methods are strongly inspired by contracts in https://github.com/0xProject/0x-monorepo/blob/development/\n */\ncontract SignatureValidator is LibEIP712 {\n using LibBytes for bytes;\n\n /***********************************|\n | Variables |\n |__________________________________*/\n\n // bytes4(keccak256("isValidSignature(bytes,bytes)"))\n bytes4 constant internal ERC1271_MAGICVALUE = 0x20c13b0b;\n\n // bytes4(keccak256("isValidSignature(bytes32,bytes)"))\n bytes4 constant internal ERC1271_MAGICVALUE_BYTES32 = 0x1626ba7e;\n\n // Allowed signature types.\n enum SignatureType {\n Illegal, // 0x00, default value\n EIP712, // 0x01\n EthSign, // 0x02\n WalletBytes, // 0x03 To call isValidSignature(bytes, bytes) on wallet contract\n WalletBytes32, // 0x04 To call isValidSignature(bytes32, bytes) on wallet contract\n NSignatureTypes // 0x05, number of signature types. Always leave at end.\n }\n\n\n /***********************************|\n | Signature Functions |\n |__________________________________*/\n\n /**\n * @dev Verifies that a hash has been signed by the given signer.\n * @param _signerAddress Address that should have signed the given hash.\n * @param _hash Hash of the EIP-712 encoded data\n * @param _data Full EIP-712 data structure that was hashed and signed\n * @param _sig Proof that the hash has been signed by signer.\n * For non wallet signatures, _sig is expected to be an array tightly encoded as\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType)\n * @return isValid True if the address recovered from the provided signature matches the input signer address.\n */\n function isValidSignature(\n address _signerAddress,\n bytes32 _hash,\n bytes memory _data,\n bytes memory _sig\n )\n public\n view\n returns (bool isValid)\n {\n require(\n _sig.length > 0,\n "SignatureValidator#isValidSignature: LENGTH_GREATER_THAN_0_REQUIRED"\n );\n\n require(\n _signerAddress != address(0x0),\n "SignatureValidator#isValidSignature: INVALID_SIGNER"\n );\n\n // Pop last byte off of signature byte array.\n uint8 signatureTypeRaw = uint8(_sig.popLastByte());\n\n // Ensure signature is supported\n require(\n signatureTypeRaw < uint8(SignatureType.NSignatureTypes),\n "SignatureValidator#isValidSignature: UNSUPPORTED_SIGNATURE"\n );\n\n // Extract signature type\n SignatureType signatureType = SignatureType(signatureTypeRaw);\n\n // Variables are not scoped in Solidity.\n uint8 v;\n bytes32 r;\n bytes32 s;\n address recovered;\n\n // Always illegal signature.\n // This is always an implicit option since a signer can create a\n // signature array with invalid type or length. We may as well make\n // it an explicit option. This aids testing and analysis. It is\n // also the initialization value for the enum type.\n if (signatureType == SignatureType.Illegal) {\n revert("SignatureValidator#isValidSignature: ILLEGAL_SIGNATURE");\n\n\n // Signature using EIP712\n } else if (signatureType == SignatureType.EIP712) {\n require(\n _sig.length == 97,\n "SignatureValidator#isValidSignature: LENGTH_97_REQUIRED"\n );\n r = _sig.readBytes32(0);\n s = _sig.readBytes32(32);\n v = uint8(_sig[64]);\n recovered = ecrecover(_hash, v, r, s);\n isValid = _signerAddress == recovered;\n return isValid;\n\n\n // Signed using web3.eth_sign() or Ethers wallet.signMessage()\n } else if (signatureType == SignatureType.EthSign) {\n require(\n _sig.length == 97,\n "SignatureValidator#isValidSignature: LENGTH_97_REQUIRED"\n );\n r = _sig.readBytes32(0);\n s = _sig.readBytes32(32);\n v = uint8(_sig[64]);\n recovered = ecrecover(\n keccak256(abi.encodePacked("\\x19Ethereum Signed Message:\\n32", _hash)),\n v,\n r,\n s\n );\n isValid = _signerAddress == recovered;\n return isValid;\n\n\n // Signature verified by wallet contract with data validation.\n } else if (signatureType == SignatureType.WalletBytes) {\n isValid = ERC1271_MAGICVALUE == IERC1271Wallet(_signerAddress).isValidSignature(_data, _sig);\n return isValid;\n\n\n // Signature verified by wallet contract without data validation.\n } else if (signatureType == SignatureType.WalletBytes32) {\n isValid = ERC1271_MAGICVALUE_BYTES32 == IERC1271Wallet(_signerAddress).isValidSignature(_hash, _sig);\n return isValid;\n }\n\n // Anything else is illegal (We do not return false because\n // the signature may actually be valid, just not in a format\n // that we currently support. In this case returning false\n // may lead the caller to incorrectly believe that the\n // signature was invalid.)\n revert("SignatureValidator#isValidSignature: UNSUPPORTED_SIGNATURE");\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/access/AccessControl.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IAccessControl.sol";\nimport "../utils/Context.sol";\nimport "../utils/Strings.sol";\nimport "../utils/introspection/ERC165.sol";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn\'t allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role\'s admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n "AccessControl: account ",\n Strings.toHexString(account),\n " is missing role ",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role\'s admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function\'s\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), "AccessControl: can only renounce roles for self");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn\'t perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``\'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/access/IAccessControl.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + 'node_modules/@openzeppelin/contracts/access/Ownable.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/Context.sol";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), "Ownable: caller is not the owner");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), "Ownable: new owner is the zero address");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.9._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/IERC2981.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/introspection/IERC165.sol";\n\n/**\n * @dev Interface for the NFT Royalty Standard.\n *\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\n *\n * _Available since v4.5._\n */\ninterface IERC2981 is IERC165 {\n /**\n * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\n * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\n */\n function royaltyInfo(uint256 tokenId, uint256 salePrice)\n external\n view\n returns (address receiver, uint256 royaltyAmount);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport "../beacon/IBeacon.sol";\nimport "../../interfaces/IERC1967.sol";\nimport "../../interfaces/draft-IERC1822.sol";\nimport "../../utils/Address.sol";\nimport "../../utils/StorageSlot.sol";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");\n } catch {\n revert("ERC1967Upgrade: new implementation is not UUPS");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), "ERC1967: new admin is the zero address");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256(\'eip1967.proxy.beacon\')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n "ERC1967: beacon implementation is not a contract"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/Proxy.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IBeacon.sol";\nimport "../../access/Ownable.sol";\nimport "../../utils/Address.sol";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n constructor(address implementation_) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract");\n _implementation = newImplementation;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/token/common/ERC2981.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport "../../interfaces/IERC2981.sol";\nimport "../../utils/introspection/ERC165.sol";\n\n/**\n * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.\n *\n * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for\n * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.\n *\n * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the\n * fee is specified in basis points by default.\n *\n * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See\n * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to\n * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.\n *\n * _Available since v4.5._\n */\nabstract contract ERC2981 is IERC2981, ERC165 {\n struct RoyaltyInfo {\n address receiver;\n uint96 royaltyFraction;\n }\n\n RoyaltyInfo private _defaultRoyaltyInfo;\n mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @inheritdoc IERC2981\n */\n function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {\n RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];\n\n if (royalty.receiver == address(0)) {\n royalty = _defaultRoyaltyInfo;\n }\n\n uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();\n\n return (royalty.receiver, royaltyAmount);\n }\n\n /**\n * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a\n * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an\n * override.\n */\n function _feeDenominator() internal pure virtual returns (uint96) {\n return 10000;\n }\n\n /**\n * @dev Sets the royalty information that all ids in this contract will default to.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {\n require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");\n require(receiver != address(0), "ERC2981: invalid receiver");\n\n _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Removes default royalty information.\n */\n function _deleteDefaultRoyalty() internal virtual {\n delete _defaultRoyaltyInfo;\n }\n\n /**\n * @dev Sets the royalty information for a specific token id, overriding the global default.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setTokenRoyalty(\n uint256 tokenId,\n address receiver,\n uint96 feeNumerator\n ) internal virtual {\n require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");\n require(receiver != address(0), "ERC2981: Invalid parameters");\n\n _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Resets royalty information for the token id back to the global default.\n */\n function _resetTokenRoyalty(uint256 tokenId) internal virtual {\n delete _tokenRoyaltyInfo[tokenId];\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Address.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn\'t rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity\'s `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, "Address: low-level call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, "Address: insufficient balance for call");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, "Address: low-level static call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, "Address: low-level delegate call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), "Address: call to non-contract");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn\'t, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Context.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Create2.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Create2.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as \'counterfactual interactions\'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(\n uint256 amount,\n bytes32 salt,\n bytes memory bytecode\n ) internal returns (address addr) {\n require(address(this).balance >= amount, "Create2: insufficient balance");\n require(bytecode.length != 0, "Create2: bytecode length is zero");\n /// @solidity memory-safe-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), "Create2: Failed on deploy");\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract\'s address, returns the same value as {computeAddress}.\n */\n function computeAddress(\n bytes32 salt,\n bytes32 bytecodeHash,\n address deployer\n ) internal pure returns (address addr) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40) // Get free memory pointer\n\n // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... |\n // |-------------------|---------------------------------------------------------------------------|\n // | bytecodeHash | CCCCCCCCCCCCC...CC |\n // | salt | BBBBBBBBBBBBB...BB |\n // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA |\n // | 0xFF | FF |\n // |-------------------|---------------------------------------------------------------------------|\n // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |\n // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |\n\n mstore(add(ptr, 0x40), bytecodeHash)\n mstore(add(ptr, 0x20), salt)\n mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes\n let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff\n mstore8(start, 0xff)\n addr := keccak256(start, 85)\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/StorageSlot.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Strings.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport "./math/Math.sol";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = "0123456789abcdef";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = "0";\n buffer[1] = "x";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, "Strings: hex length insufficient");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IERC165.sol";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/math/Math.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + 'src/proxies/SequenceProxyFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {\r\n TransparentUpgradeableBeaconProxy,\r\n ITransparentUpgradeableBeaconProxy\r\n} from "./TransparentUpgradeableBeaconProxy.sol";\r\n\r\nimport {Create2} from "@openzeppelin/contracts/utils/Create2.sol";\r\nimport {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";\r\nimport {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";\r\n\r\n/**\r\n * An proxy factory that deploys upgradeable beacon proxies.\r\n * @dev The factory owner is able to upgrade the beacon implementation.\r\n * @dev Proxy deployers are able to override the beacon reference with their own.\r\n */\r\nabstract contract SequenceProxyFactory is Ownable {\r\n UpgradeableBeacon public beacon;\r\n\r\n /**\r\n * Initialize a Sequence Proxy Factory.\r\n * @param implementation The initial beacon implementation.\r\n * @param factoryOwner The owner of the factory.\r\n */\r\n function _initialize(address implementation, address factoryOwner) internal {\r\n beacon = new UpgradeableBeacon(implementation);\r\n Ownable._transferOwnership(factoryOwner);\r\n }\r\n\r\n /**\r\n * Deploys and initializes a new proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @param _data The initialization data.\r\n * @return proxyAddress The address of the deployed proxy.\r\n */\r\n function _createProxy(bytes32 _salt, address _proxyOwner, bytes memory _data) internal returns (address proxyAddress) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes memory bytecode = type(TransparentUpgradeableBeaconProxy).creationCode;\r\n\r\n proxyAddress = Create2.deploy(0, saltedHash, bytecode);\r\n ITransparentUpgradeableBeaconProxy(payable(proxyAddress)).initialize(_proxyOwner, address(beacon), _data);\r\n }\r\n\r\n /**\r\n * Computes the address of a proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @return proxy The expected address of the deployed proxy.\r\n */\r\n function _computeProxyAddress(bytes32 _salt, address _proxyOwner, bytes memory _data) internal view returns (address) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes32 bytecodeHash = keccak256(type(TransparentUpgradeableBeaconProxy).creationCode);\r\n\r\n return Create2.computeAddress(saltedHash, bytecodeHash);\r\n }\r\n\r\n /**\r\n * Upgrades the beacon implementation.\r\n * @param implementation The new beacon implementation.\r\n */\r\n function upgradeBeacon(address implementation) public onlyOwner {\r\n beacon.upgradeTo(implementation);\r\n }\r\n}\r\n' + }, + 'src/proxies/TransparentUpgradeableBeaconProxy.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {BeaconProxy, Proxy} from "./openzeppelin/BeaconProxy.sol";\r\nimport {TransparentUpgradeableProxy, ERC1967Proxy} from "./openzeppelin/TransparentUpgradeableProxy.sol";\r\n\r\ninterface ITransparentUpgradeableBeaconProxy {\r\n function initialize(address admin, address beacon, bytes memory data) external;\r\n}\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * @dev As the underlying proxy implementation (TransparentUpgradeableProxy) allows the admin to call the implementation,\r\n * care must be taken to avoid proxy selector collisions. Implementation selectors must not conflict with the proxy selectors.\r\n * See https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * The proxy selectors are:\r\n * - 0xcf7a1d77: initialize\r\n * - 0x3659cfe6: upgradeTo (from TransparentUpgradeableProxy)\r\n * - 0x4f1ef286: upgradeToAndCall (from TransparentUpgradeableProxy)\r\n * - 0x8f283970: changeAdmin (from TransparentUpgradeableProxy)\r\n * - 0xf851a440: admin (from TransparentUpgradeableProxy)\r\n * - 0x5c60da1b: implementation (from TransparentUpgradeableProxy)\r\n */\r\ncontract TransparentUpgradeableBeaconProxy is TransparentUpgradeableProxy, BeaconProxy {\r\n /**\r\n * Decode the initialization data from the msg.data and call the initialize function.\r\n */\r\n function _dispatchInitialize() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n (address admin, address beacon, bytes memory data) = abi.decode(msg.data[4:], (address, address, bytes));\r\n initialize(admin, beacon, data);\r\n\r\n return "";\r\n }\r\n\r\n function initialize(address admin, address beacon, bytes memory data) internal {\r\n if (_admin() != address(0)) {\r\n // Redundant call. This function can only be called when the admin is not set.\r\n revert InvalidInitialization();\r\n }\r\n _changeAdmin(admin);\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n\r\n /**\r\n * @dev If the admin is not set, the fallback function is used to initialize the proxy.\r\n * @dev If the admin is set, the fallback function is used to delegatecall the implementation.\r\n */\r\n function _fallback() internal override (TransparentUpgradeableProxy, Proxy) {\r\n if (_getAdmin() == address(0)) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableBeaconProxy.initialize.selector) {\r\n ret = _dispatchInitialize();\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n }\r\n // When the admin is not set, the fallback function is used to initialize the proxy.\r\n revert InvalidInitialization();\r\n }\r\n TransparentUpgradeableProxy._fallback();\r\n }\r\n\r\n /**\r\n * Returns the current implementation address.\r\n * @dev This is the implementation address set by the admin, or the beacon implementation.\r\n */\r\n function _implementation() internal view override (ERC1967Proxy, BeaconProxy) returns (address) {\r\n address implementation = ERC1967Proxy._implementation();\r\n if (implementation != address(0)) {\r\n return implementation;\r\n }\r\n return BeaconProxy._implementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/BeaconProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\r\n *\r\n * The beacon address is stored in storage slot `uint256(keccak256(\'eip1967.proxy.beacon\')) - 1`, so that it doesn\'t\r\n * conflict with the storage layout of the implementation behind the proxy.\r\n *\r\n * _Available since v3.4._\r\n */\r\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current beacon address.\r\n */\r\n function _beacon() internal view virtual returns (address) {\r\n return _getBeacon();\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation address of the associated beacon.\r\n */\r\n function _implementation() internal view virtual override returns (address) {\r\n return IBeacon(_getBeacon()).implementation();\r\n }\r\n\r\n /**\r\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\r\n *\r\n * If `data` is nonempty, it\'s used as data in a delegate call to the implementation returned by the beacon.\r\n *\r\n * Requirements:\r\n *\r\n * - `beacon` must be a contract.\r\n * - The implementation returned by `beacon` must be a contract.\r\n */\r\n function _setBeacon(address beacon, bytes memory data) internal virtual {\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/ERC1967Proxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\r\n * implementation address that can be changed. This address is stored in storage in the location specified by\r\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn\'t conflict with the storage layout of the\r\n * implementation behind the proxy.\r\n */\r\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current implementation address.\r\n */\r\n function _implementation() internal view virtual override returns (address impl) {\r\n return ERC1967Upgrade._getImplementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/TransparentUpgradeableProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\r\n\r\n/// @notice This implementation is a copy of OpenZeppelin\'s with the following changes:\r\n/// - Pragma updated\r\n/// - Imports updated\r\n/// - Constructor removed\r\n/// - Allows admin to call implementation\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "./ERC1967Proxy.sol";\r\n\r\n/**\r\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\r\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\r\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\r\n * include them in the ABI so this interface must be used to interact with it.\r\n */\r\ninterface ITransparentUpgradeableProxy is IERC1967 {\r\n function admin() external view returns (address);\r\n\r\n function implementation() external view returns (address);\r\n\r\n function changeAdmin(address) external;\r\n\r\n function upgradeTo(address) external;\r\n\r\n function upgradeToAndCall(address, bytes memory) external payable;\r\n}\r\n\r\n/**\r\n * @dev This contract implements a proxy that is upgradeable by an admin.\r\n *\r\n * Unlike the original OpenZeppelin implementation, this contract does not prevent the admin from calling the implementation.\r\n * This potentially exposes the admin to a proxy selector attack. See\r\n * https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * When using this contract, you must ensure that the implementation function selectors do not clash with the proxy selectors.\r\n * The proxy selectors are:\r\n * - 0x3659cfe6: upgradeTo\r\n * - 0x4f1ef286: upgradeToAndCall\r\n * - 0x8f283970: changeAdmin\r\n * - 0xf851a440: admin\r\n * - 0x5c60da1b: implementation\r\n *\r\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\r\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\r\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\r\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\r\n * implementation.\r\n *\r\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\r\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\r\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\r\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\r\n */\r\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\r\n /**\r\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\r\n *\r\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\r\n * implementation provides a function with the same selector.\r\n */\r\n modifier ifAdmin() {\r\n if (msg.sender == _getAdmin()) {\r\n _;\r\n } else {\r\n _fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\r\n */\r\n function _fallback() internal virtual override {\r\n if (msg.sender == _getAdmin()) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\r\n ret = _dispatchUpgradeTo();\r\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\r\n ret = _dispatchUpgradeToAndCall();\r\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\r\n ret = _dispatchChangeAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\r\n ret = _dispatchAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\r\n ret = _dispatchImplementation();\r\n } else {\r\n // Call implementation\r\n return super._fallback();\r\n }\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n } else {\r\n super._fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\r\n */\r\n function _dispatchAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address admin = _getAdmin();\r\n return abi.encode(admin);\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\r\n */\r\n function _dispatchImplementation() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address implementation = _implementation();\r\n return abi.encode(implementation);\r\n }\r\n\r\n /**\r\n * @dev Changes the admin of the proxy.\r\n *\r\n * Emits an {AdminChanged} event.\r\n */\r\n function _dispatchChangeAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newAdmin = abi.decode(msg.data[4:], (address));\r\n _changeAdmin(newAdmin);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy.\r\n */\r\n function _dispatchUpgradeTo() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newImplementation = abi.decode(msg.data[4:], (address));\r\n _upgradeToAndCall(newImplementation, bytes(""), false);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\r\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\r\n * proxied contract.\r\n */\r\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\r\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\r\n _upgradeToAndCall(newImplementation, data, true);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\r\n */\r\n function _admin() internal view virtual returns (address) {\r\n return _getAdmin();\r\n }\r\n\r\n /**\r\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\r\n * emulate some proxy functions being non-payable while still allowing value to pass through.\r\n */\r\n function _requireZeroValue() internal {\r\n require(msg.value == 0);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC1155//presets/minter/IERC1155TokenMinter.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC1155TokenMinterFunctions {\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param tokenId Token ID to mint.\r\n * @param amount Amount of tokens to mint.\r\n * @param data Data to pass if receiver is contract.\r\n */\r\n function mint(address to, uint256 tokenId, uint256 amount, bytes memory data) external;\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param tokenIds Token IDs to mint.\r\n * @param amounts Amounts of tokens to mint.\r\n * @param data Data to pass if receiver is contract.\r\n */\r\n function batchMint(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data) external;\r\n}\r\n\r\ninterface IERC1155TokenMinterSignals {\r\n /**\r\n * Invalid initialization error.\r\n */\r\n error InvalidInitialization();\r\n}\r\n\r\ninterface IERC1155TokenMinter is IERC1155TokenMinterFunctions, IERC1155TokenMinterSignals {}\r\n' + }, + 'src/tokens/ERC1155/ERC1155Token.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC1155, ERC1155MintBurn} from "@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155MintBurn.sol";\r\nimport {ERC1155Meta} from "@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Meta.sol";\r\nimport {ERC1155Metadata} from "@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Metadata.sol";\r\nimport {ERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/ERC2981Controlled.sol";\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * A standard base implementation of ERC-1155 for use in Sequence library contracts.\r\n */\r\nabstract contract ERC1155Token is ERC1155MintBurn, ERC1155Meta, ERC1155Metadata, ERC2981Controlled {\r\n bytes32 internal constant METADATA_ADMIN_ROLE = keccak256("METADATA_ADMIN_ROLE");\r\n\r\n string private _contractURI;\r\n\r\n /**\r\n * Deploy contract.\r\n */\r\n constructor() ERC1155Metadata("", "") {}\r\n\r\n /**\r\n * Initialize the contract.\r\n * @param owner Owner address.\r\n * @param tokenName Token name.\r\n * @param tokenBaseURI Base URI for token metadata.\r\n * @param tokenContractURI Contract URI for token metadata.\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function _initialize(\r\n address owner,\r\n string memory tokenName,\r\n string memory tokenBaseURI,\r\n string memory tokenContractURI\r\n )\r\n internal\r\n {\r\n name = tokenName;\r\n baseURI = tokenBaseURI;\r\n _contractURI = tokenContractURI;\r\n\r\n _setupRole(DEFAULT_ADMIN_ROLE, owner);\r\n _setupRole(ROYALTY_ADMIN_ROLE, owner);\r\n _setupRole(METADATA_ADMIN_ROLE, owner);\r\n }\r\n\r\n //\r\n // Metadata\r\n //\r\n\r\n /**\r\n * Update the base URI of token\'s URI.\r\n * @param tokenBaseURI New base URI of token\'s URI\r\n */\r\n function setBaseMetadataURI(string memory tokenBaseURI) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _setBaseMetadataURI(tokenBaseURI);\r\n }\r\n\r\n /**\r\n * Update the name of the contract.\r\n * @param tokenName New contract name\r\n */\r\n function setContractName(string memory tokenName) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _setContractName(tokenName);\r\n }\r\n\r\n /**\r\n * Update the contract URI of token\'s URI.\r\n * @param tokenContractURI New contract URI of token\'s URI\r\n * @notice Refer to https://docs.opensea.io/docs/contract-level-metadata\r\n */\r\n function setContractURI(string memory tokenContractURI) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _contractURI = tokenContractURI;\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Get the contract URI of token\'s URI.\r\n * @return Contract URI of token\'s URI\r\n * @notice Refer to https://docs.opensea.io/docs/contract-level-metadata\r\n */\r\n function contractURI() public view returns (string memory) {\r\n return _contractURI;\r\n }\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC1155, ERC1155Metadata, ERC2981Controlled)\r\n returns (bool)\r\n {\r\n return ERC1155.supportsInterface(interfaceId) || ERC1155Metadata.supportsInterface(interfaceId)\r\n || ERC2981Controlled.supportsInterface(interfaceId) || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC1155/presets/minter/ERC1155TokenMinter.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC1155MintBurn, ERC1155} from "@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155MintBurn.sol";\r\nimport {\r\n IERC1155TokenMinter,\r\n IERC1155TokenMinterFunctions\r\n} from "@0xsequence/contracts-library/tokens/ERC1155//presets/minter/IERC1155TokenMinter.sol";\r\nimport {ERC1155Token} from "@0xsequence/contracts-library/tokens/ERC1155/ERC1155Token.sol";\r\nimport {ERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/ERC2981Controlled.sol";\r\n\r\n/**\r\n * An implementation of ERC-1155 capable of minting when role provided.\r\n */\r\ncontract ERC1155TokenMinter is ERC1155MintBurn, ERC1155Token, IERC1155TokenMinter {\r\n bytes32 internal constant MINTER_ROLE = keccak256("MINTER_ROLE");\r\n\r\n address private immutable initializer;\r\n bool private initialized;\r\n\r\n constructor() {\r\n initializer = msg.sender;\r\n }\r\n\r\n /**\r\n * Initialize the contract.\r\n * @param owner Owner address\r\n * @param tokenName Token name\r\n * @param tokenBaseURI Base URI for token metadata\r\n * @param tokenContractURI Contract URI for token metadata\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function initialize(\r\n address owner,\r\n string memory tokenName,\r\n string memory tokenBaseURI,\r\n string memory tokenContractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n public\r\n virtual\r\n {\r\n if (msg.sender != initializer || initialized) {\r\n revert InvalidInitialization();\r\n }\r\n\r\n ERC1155Token._initialize(owner, tokenName, tokenBaseURI, tokenContractURI);\r\n _setDefaultRoyalty(royaltyReceiver, royaltyFeeNumerator);\r\n\r\n _setupRole(MINTER_ROLE, owner);\r\n\r\n initialized = true;\r\n }\r\n\r\n //\r\n // Minting\r\n //\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param tokenId Token ID to mint.\r\n * @param amount Amount of tokens to mint.\r\n * @param data Data to pass if receiver is contract.\r\n */\r\n function mint(address to, uint256 tokenId, uint256 amount, bytes memory data) external onlyRole(MINTER_ROLE) {\r\n _mint(to, tokenId, amount, data);\r\n }\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param tokenIds Token IDs to mint.\r\n * @param amounts Amounts of tokens to mint.\r\n * @param data Data to pass if receiver is contract.\r\n */\r\n function batchMint(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data)\r\n external\r\n onlyRole(MINTER_ROLE)\r\n {\r\n _batchMint(to, tokenIds, amounts, data);\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId) public view override (ERC1155Token, ERC1155) returns (bool) {\r\n return type(IERC1155TokenMinterFunctions).interfaceId == interfaceId || ERC1155Token.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC1155/presets/minter/ERC1155TokenMinterFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC1155TokenMinter} from "@0xsequence/contracts-library/tokens/ERC1155/presets/minter/ERC1155TokenMinter.sol";\r\nimport {IERC1155TokenMinterFactory} from\r\n "@0xsequence/contracts-library/tokens/ERC1155/presets/minter/IERC1155TokenMinterFactory.sol";\r\nimport {SequenceProxyFactory} from "@0xsequence/contracts-library/proxies/SequenceProxyFactory.sol";\r\n\r\n/**\r\n * Deployer of ERC-1155 Token Minter proxies.\r\n */\r\ncontract ERC1155TokenMinterFactory is IERC1155TokenMinterFactory, SequenceProxyFactory {\r\n /**\r\n * Creates an ERC-1155 Token Minter Factory.\r\n * @param factoryOwner The owner of the ERC-1155 Token Minter Factory\r\n */\r\n constructor(address factoryOwner) {\r\n ERC1155TokenMinter impl = new ERC1155TokenMinter();\r\n SequenceProxyFactory._initialize(address(impl), factoryOwner);\r\n }\r\n\r\n /**\r\n * Creates an ERC-1155 Token Minter proxy.\r\n * @param proxyOwner The owner of the ERC-1155 Token Minter proxy\r\n * @param tokenOwner The owner of the ERC-1155 Token Minter implementation\r\n * @param name The name of the ERC-1155 Token Minter proxy\r\n * @param baseURI The base URI of the ERC-1155 Token Minter proxy\r\n * @param contractURI The contract URI of the ERC-1155 Token Minter proxy\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @return proxyAddr The address of the ERC-1155 Token Minter Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-1155 Token Minter functions.\r\n */\r\n function deploy(\r\n address proxyOwner,\r\n address tokenOwner,\r\n string memory name,\r\n string memory baseURI,\r\n string memory contractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n external\r\n returns (address proxyAddr)\r\n {\r\n bytes32 salt = keccak256(abi.encodePacked(tokenOwner, name, baseURI, contractURI, royaltyReceiver, royaltyFeeNumerator));\r\n proxyAddr = _createProxy(salt, proxyOwner, "");\r\n ERC1155TokenMinter(proxyAddr).initialize(tokenOwner, name, baseURI, contractURI, royaltyReceiver, royaltyFeeNumerator);\r\n emit ERC1155TokenMinterDeployed(proxyAddr);\r\n return proxyAddr;\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC1155/presets/minter/IERC1155TokenMinterFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC1155TokenMinterFactoryFunctions {\r\n /**\r\n * Creates an ERC-1155 Token Minter proxy.\r\n * @param proxyOwner The owner of the ERC-1155 Token Minter proxy\r\n * @param tokenOwner The owner of the ERC-1155 Token Minter implementation\r\n * @param name The name of the ERC-1155 Token Minter proxy\r\n * @param baseURI The base URI of the ERC-1155 Token Minter proxy\r\n * @param contractURI The contract URI of the ERC-1155 Token Minter proxy\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @return proxyAddr The address of the ERC-1155 Token Minter Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-1155 Token Minter functions.\r\n */\r\n function deploy(\r\n address proxyOwner,\r\n address tokenOwner,\r\n string memory name,\r\n string memory baseURI,\r\n string memory contractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n external\r\n returns (address proxyAddr);\r\n}\r\n\r\ninterface IERC1155TokenMinterFactorySignals {\r\n /**\r\n * Event emitted when a new ERC-1155 Token Minter proxy contract is deployed.\r\n * @param proxyAddr The address of the deployed proxy.\r\n */\r\n event ERC1155TokenMinterDeployed(address proxyAddr);\r\n}\r\n\r\ninterface IERC1155TokenMinterFactory is IERC1155TokenMinterFactoryFunctions, IERC1155TokenMinterFactorySignals {}\r\n' + }, + 'src/tokens/common/ERC2981Controlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/IERC2981Controlled.sol";\r\nimport {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";\r\nimport {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";\r\n\r\n/**\r\n * An implementation of ERC-2981 that allows updates by roles.\r\n */\r\nabstract contract ERC2981Controlled is ERC2981, AccessControl, IERC2981Controlled {\r\n bytes32 internal constant ROYALTY_ADMIN_ROLE = keccak256("ROYALTY_ADMIN_ROLE");\r\n\r\n //\r\n // Royalty\r\n //\r\n\r\n /**\r\n * Sets the royalty information that all ids in this contract will default to.\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n */\r\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyRole(ROYALTY_ADMIN_ROLE) {\r\n _setDefaultRoyalty(receiver, feeNumerator);\r\n }\r\n\r\n /**\r\n * Sets the royalty information that a given token id in this contract will use.\r\n * @param tokenId The token id to set the royalty information for\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @notice This overrides the default royalty information for this token id\r\n */\r\n function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator)\r\n external\r\n onlyRole(ROYALTY_ADMIN_ROLE)\r\n {\r\n _setTokenRoyalty(tokenId, receiver, feeNumerator);\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC2981, AccessControl)\r\n returns (bool)\r\n {\r\n return ERC2981.supportsInterface(interfaceId) || AccessControl.supportsInterface(interfaceId)\r\n || type(IERC2981Controlled).interfaceId == interfaceId || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/common/IERC2981Controlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC2981ControlledFunctions {\r\n /**\r\n * Sets the royalty information that all ids in this contract will default to.\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n */\r\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external;\r\n\r\n /**\r\n * Sets the royalty information that a given token id in this contract will use.\r\n * @param tokenId The token id to set the royalty information for\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @notice This overrides the default royalty information for this token id\r\n */\r\n function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) external;\r\n}\r\n\r\ninterface IERC2981Controlled is IERC2981ControlledFunctions {}\r\n' + } + }, + settings: { + evmVersion: 'paris', + libraries: {}, + metadata: { bytecodeHash: 'ipfs' }, + optimizer: { enabled: true, runs: 20000 }, + remappings: [ + ':@0xsequence/contracts-library/=src/', + ':@0xsequence/erc-1155/=node_modules/@0xsequence/erc-1155/', + ':@0xsequence/erc20-meta-token/=node_modules/@0xsequence/erc20-meta-token/', + ':@openzeppelin/=node_modules/@openzeppelin/', + ':ds-test/=lib/forge-std/lib/ds-test/src/', + ':erc721a-upgradeable/=node_modules/erc721a-upgradeable/', + ':erc721a/=node_modules/erc721a/', + ':forge-std/=lib/forge-std/src/', + ':murky/=lib/murky/src/', + ':openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/' + ], + viaIR: true, + outputSelection: { + '*': { + '*': ['evm.bytecode', 'evm.deployedBytecode', 'devdoc', 'userdoc', 'metadata', 'abi'] + } + } + } + } +} diff --git a/scripts/factories/token_library/ERC1155SaleFactory.ts b/scripts/factories/token_library/ERC1155SaleFactory.ts new file mode 100644 index 0000000..2b48e30 --- /dev/null +++ b/scripts/factories/token_library/ERC1155SaleFactory.ts @@ -0,0 +1,386 @@ +import type { EtherscanVerificationRequest } from '@0xsequence/solidity-deployer' +import { ContractFactory, ethers } from 'ethers' + +// https://github.com/0xsequence/contracts-library/blob/5e0017b81cc3099e60704eaf4a50b64e79fe706c/src/tokens/ERC20/presets/minter/ERC20TokenMinterFactory.sol + +const abi = [ + { + inputs: [ + { + internalType: 'address', + name: 'factoryOwner', + type: 'address' + } + ], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'proxyAddr', + type: 'address' + } + ], + name: 'ERC1155SaleDeployed', + 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' + }, + { + inputs: [], + name: 'beacon', + outputs: [ + { + internalType: 'contract UpgradeableBeacon', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'proxyOwner', + type: 'address' + }, + { + internalType: 'address', + name: 'tokenOwner', + type: 'address' + }, + { internalType: 'string', name: 'name', type: 'string' }, + { internalType: 'string', name: 'baseURI', type: 'string' }, + { internalType: 'bytes32', name: 'salt', type: 'bytes32' } + ], + name: 'deploy', + outputs: [{ internalType: 'address', name: 'proxyAddr', type: 'address' }], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [], + name: 'owner', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'implementation', + type: 'address' + } + ], + name: 'upgradeBeacon', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + } +] + +export class ERC1155SaleFactory extends ContractFactory { + constructor(signer: ethers.Signer) { + super( + abi, + '0x608034610125576001600160401b0390601f6200856438819003918201601f191683019291908484118385101761010f57816020928492604096875283398101031261012557516001600160a01b038082168203610125576100603361012a565b8251936160a194858101958187108388111761010f57620024c3823980600096039086f0908115610105578451916105ee808401928311848410176100f1579184849260209462001ed5853916815203019085f080156100e4576100d69394501660018060a01b0319600154161760015561012a565b51611d639081620001728239f35b50505051903d90823e3d90fd5b634e487b7160e01b88526041600452602488fd5b84513d87823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b600080546001600160a01b039283166001600160a01b03198216811783559216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a356fe6080604052600436101561001257600080fd5b6000803560e01c80631bce4583146108b157806338234f4d146102d857806359659e9014610286578063715018a6146101e95780638da5cb5b146101985763f2fde38b1461005f57600080fd5b346101955760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557610096610970565b61009e610a5d565b73ffffffffffffffffffffffffffffffffffffffff80911690811561011157600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b80fd5b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101955773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557610220610a5d565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b50346101955760e07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557610310610970565b73ffffffffffffffffffffffffffffffffffffffff60243516602435036108a85760443567ffffffffffffffff8111610792576103519036906004016109e8565b9060643567ffffffffffffffff81116108ad576103729036906004016109e8565b9060843567ffffffffffffffff81116108a4576103939036906004016109e8565b73ffffffffffffffffffffffffffffffffffffffff60a4351660a435036108a8576bffffffffffffffffffffffff60c4351660c435036108a45760405160208101907fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060243560601b1682526104ac6054828851610418816034840160208d01610adc565b810188519061042e826034830160208d01610adc565b01865190610443826034830160208b01610adc565b017fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060a43560601b1660348201527fffffffffffffffffffffffff000000000000000000000000000000000000000060c43560a01b1660488201520360348101845201826109a7565b519020936040519485602081011067ffffffffffffffff60208801111761087557602086016040528686526001547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006040519160208301938452818760601b16604084015260601b1660548201526105436068828951610533818c60208686019101610adc565b81010360488101845201826109a7565b519020604051906111eb61055a60208201846109a7565b8083526020830190610b4382398251156108175773ffffffffffffffffffffffffffffffffffffffff92519089f5169485156107b957869373ffffffffffffffffffffffffffffffffffffffff6001541691873b156107b557859161061573ffffffffffffffffffffffffffffffffffffffff9260405195869485947fcf7a1d770000000000000000000000000000000000000000000000000000000086521660048501526024840152606060448401526064830190610aff565b0381838a5af19081156107aa578491610796575b5050843b15610792576106f6610696926106c660405196879586957ff895481800000000000000000000000000000000000000000000000000000000875273ffffffffffffffffffffffffffffffffffffffff60243516600488015260c0602488015260c4870190610aff565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc868303016044870152610aff565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc848303016064850152610aff565b73ffffffffffffffffffffffffffffffffffffffff60a4351660848301526bffffffffffffffffffffffff60c4351660a4830152038183865af180156107875761076f575b6020827f346f0211197dd599e2e2a8c828f6e7dc39e8a49171ce0a728428e8b778c61eea82604051838152a1604051908152f35b6107798391610993565b610783578161073b565b5080fd5b6040513d85823e3d90fd5b8280fd5b61079f90610993565b610792578238610629565b6040513d86823e3d90fd5b8580fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8480fd5b600080fd5b8380fd5b50346101955760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610195576108e9610970565b6108f1610a5d565b8173ffffffffffffffffffffffffffffffffffffffff806001541692833b15610792576024908360405195869485937f3659cfe60000000000000000000000000000000000000000000000000000000085521660048401525af1801561096557610959575080f35b61096290610993565b80f35b6040513d84823e3d90fd5b6004359073ffffffffffffffffffffffffffffffffffffffff821682036108a857565b67ffffffffffffffff811161087557604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761087557604052565b81601f820112156108a85780359067ffffffffffffffff82116108755760405192610a3b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601856109a7565b828452602083830101116108a857816000926020809301838601378301015290565b73ffffffffffffffffffffffffffffffffffffffff600054163303610a7e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60005b838110610aef5750506000910152565b8181015183820152602001610adf565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610b3b81518092818752878088019101610adc565b011601019056fe60808060405234610016576111cf908161001c8239f35b600080fdfe604060808152366103825773ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000917fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000843516146100c057600484517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b6100c8611192565b60049136831161037e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261037e578235916101088361067f565b602435926101158461067f565b60443567ffffffffffffffff811161037a57610135839136908801610789565b941692156103525761014791166107e3565b803b156102cf578451907f5c60da1b000000000000000000000000000000000000000000000000000000009384835260209687848381865afa9384156102a657889461019d9189916102b2575b503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab575b610242575b8361023c6107d0565b80519101f35b8592839182525afa9182156102a65761026a9392610277575b506102646109b1565b91610a21565b5038808083818080610233565b610298919250843d861161029f575b610290818361070e565b810190610902565b903861025b565b503d610286565b61091a565b508661022e565b6102c99150863d881161029f57610290818361070e565b38610194565b60848360208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b8487517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8380fd5b73ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000907fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833516146104395760046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b610441611192565b60049236841161067b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067b5783356104808161067f565b6024359161048d8361067f565b60443567ffffffffffffffff8111610677576104ad829136908901610789565b9316931561064e576104bf91166107e3565b813b156105ca576040517f5c60da1b000000000000000000000000000000000000000000000000000000009283825260209586838281855afa9283156102a65787936105149188916105b357503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905560405194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab57610242578361023c6107d0565b6102c99150853d871161029f57610290818361070e565b6084846020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b856040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8280fd5b73ffffffffffffffffffffffffffffffffffffffff81160361069d57565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff8211176106ed57604052565b6106a2565b6040810190811067ffffffffffffffff8211176106ed57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106ed57604052565b67ffffffffffffffff81116106ed57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f8201121561069d578035906107a08261074f565b926107ae604051948561070e565b8284526020838301011161069d57816000926020809301838601378301015290565b604051906107dd826106d1565b60008252565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61039081547f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f604080519373ffffffffffffffffffffffffffffffffffffffff9081851686521693846020820152a1811561087e577fffffffffffffffffffffffff000000000000000000000000000000000000000016179055565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b9081602091031261069d57516109178161067f565b90565b6040513d6000823e3d90fd5b1561092d57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201527f73206e6f74206120636f6e7472616374000000000000000000000000000000006064820152fd5b604051906060820182811067ffffffffffffffff8211176106ed57604052602782527f206661696c6564000000000000000000000000000000000000000000000000006040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6000806109179493602081519101845af43d15610a60573d91610a438361074f565b92610a51604051948561070e565b83523d6000602085013e610acd565b606091610acd565b15610a6f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b91929015610aed5750815115610ae1575090565b610917903b1515610a68565b825190915015610b005750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b848110610b7d575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201610b3c565b610bee610bd57fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b3303610d14576000357fffffffff00000000000000000000000000000000000000000000000000000000167f3659cfe6000000000000000000000000000000000000000000000000000000008103610c515750610c49610f0f565b602081519101f35b7f4f1ef286000000000000000000000000000000000000000000000000000000008103610c865750610c81611083565b610c49565b7f8f283970000000000000000000000000000000000000000000000000000000008103610cb65750610c81610ec5565b7ff851a440000000000000000000000000000000000000000000000000000000008103610ce65750610c81610dfd565b7f5c60da1b0000000000000000000000000000000000000000000000000000000003610d1457610c81610e53565b610d1c610d3b565b6000808092368280378136915af43d82803e15610d37573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541680610df8575060206004917fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505416604051928380927f5c60da1b0000000000000000000000000000000000000000000000000000000082525afa9081156102a657600091610de0575090565b610917915060203d811161029f57610290818361070e565b905090565b610e05611192565b73ffffffffffffffffffffffffffffffffffffffff7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103541660405190602082015260208152610917816106f2565b610e5b611192565b610e63610d3b565b73ffffffffffffffffffffffffffffffffffffffff6040519116602082015260208152610917816106f2565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc602091011261069d576004356109178161067f565b610ecd611192565b3660041161069d57610efc73ffffffffffffffffffffffffffffffffffffffff610ef636610e8f565b166107e3565b604051610f08816106d1565b6000815290565b610f17611192565b3660041161069d5773ffffffffffffffffffffffffffffffffffffffff610f3d36610e8f565b1660405190610f4b826106d1565b60008252803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2815115801590610ff7575b610fe3575b5050604051610f08816106d1565b610fef916102646109b1565b503880610fd5565b506000610fd0565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152fd5b3660041161069d5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261069d576004356110c18161067f565b60243567ffffffffffffffff811161069d576110f673ffffffffffffffffffffffffffffffffffffffff913690600401610789565b9116803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061118a57610fe3575050604051610f08816106d1565b506001610fd0565b3461069d5756fea264697066735822122019f840d2ec21d6e6c6d650eef546ce8fd590e6d8042a04516b47dd55a17345c664736f6c63430008130033a26469706673582212205a190a24907fc2795b67a2e01fcf44e89ea206bb195321a48e8b9b058940a9ba64736f6c6343000813003360803461011a57601f6105ee38819003918201601f19168301916001600160401b0383118484101761011f5780849260209460405283398101031261011a57516001600160a01b03808216919082820361011a576000549160018060a01b0319923384821617600055604051923391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a33b156100b2575060015416176001556040516104b890816101368239f35b62461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b6000803560e01c80633659cfe6146102ce5780635c60da1b1461027c578063715018a6146101e05780638da5cb5b1461018f5763f2fde38b1461005457600080fd5b3461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610188576100ad610403565b8115610104578254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b80fd5b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57610217610403565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff81169081810361018857610328610403565b3b1561037f57807fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8280a280f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff60005416330361042457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea2646970667358221220dc365b16a2b6643d361d2ca2ef711f783ae4b4503a5f52631ea9ce48e88aa6da64736f6c63430008130033608060405234620002f55762000014620002fa565b6200001e620002fa565b815190916001600160401b0390818311620002df576004938454916001948584811c9416918215620002d4575b60209283861014620002bf578190601f9586811162000269575b5083908683116001146200020157600092620001f5575b5050600019600383901b1c191690861b1786555b8151938411620001e0576003958654908682811c92168015620001d5575b83831014620001c0575083811162000175575b50809284116001146200010b5750928293918392600094620000ff575b50501b9160001990841b1c19161790555b604051615d8290816200031f8239f35b015192503880620000de565b919083601f1981168760005284600020946000905b888383106200015a575050501062000141575b505050811b019055620000ef565b015160001983861b60f8161c1916905538808062000133565b85870151885590960195948501948793509081019062000120565b86600052816000208480870160051c820192848810620001b6575b0160051c019086905b828110620001a9575050620000c1565b6000815501869062000199565b9250819262000190565b602290634e487b7160e01b6000525260246000fd5b91607f1691620000ae565b604186634e487b7160e01b6000525260246000fd5b0151905038806200007c565b90889350601f198316918a600052856000209260005b8782821062000252575050841162000238575b505050811b01865562000090565b015160001960f88460031b161c191690553880806200022a565b8385015186558c9790950194938401930162000217565b90915088600052836000208680850160051c820192868610620002b5575b918a91869594930160051c01915b828110620002a557505062000065565b600081558594508a910162000295565b9250819262000287565b602288634e487b7160e01b6000525260246000fd5b93607f16936200004b565b634e487b7160e01b600052604160045260246000fd5b600080fd5b60405190602082016001600160401b03811183821017620002df576040526000825256fe6080604052600436101561001257600080fd5b60003560e01c8062fdd58e146102a657806301ffc9a7146102a157806304634d8d1461029c57806306fdde03146102975780630869678c146102925780630b5ee0061461028d5780630e89341c14610288578063119cd50c1461028357806318160ddd1461027e578063248a9ca3146102795780632693ebf2146102745780632a55205a1461026f5780632d0335ab1461026a5780632eb2c2d6146102655780632f2ff15d146102605780633013ce291461025b57806336568abe1461025657806343d3f88b1461025157806344004cc11461024c5780634782f779146102475780634e1273f4146102425780634f651ccd1461023d5780635944c7531461023857806369e3e6e3146102335780636c0360eb1461022e5780637e518ec81461022957806391d1485414610224578063938e3d7b1461021f57806395be8bf41461021a578063a217fddf14610215578063a22cb46514610210578063a3d4926e1461020b578063ce0b514b14610206578063d547741f14610201578063e8a3d485146101fc578063e985e9c5146101f7578063f242432a146101f2578063f5d4c820146101ed578063f8954818146101e8578063f8e4dec5146101e35763fa4e12d7146101de57600080fd5b612343565b6122ee565b612260565b61209d565b611f52565b611eda565b611e33565b611df1565b611c15565b611b82565b611aa6565b611a80565b6119f1565b6118c1565b61185d565b61175e565b6116b7565b611636565b6114e5565b6113a5565b6112e9565b611237565b61117c565b611010565b610f32565b610efb565b610ddd565b610c65565b610ba4565b610ada565b610aae565b610a7f565b610a61565b610a3c565b61090e565b61080f565b610700565b6105fd565b610458565b610351565b6102ce565b73ffffffffffffffffffffffffffffffffffffffff8116036102c957565b600080fd5b346102c95760406003193601126102c95773ffffffffffffffffffffffffffffffffffffffff600435610300816102ab565b16600052600060205260406000206024356000526020526020604060002054604051908152f35b7fffffffff000000000000000000000000000000000000000000000000000000008116036102c957565b346102c95760206003193601126102c957602060043561037081610327565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fbc58f75d00000000000000000000000000000000000000000000000000000000149081156103c8575b506040519015158152f35b90506103d3816158e5565b908115610411575b8115610400575b81156103f0575b50386103bd565b6103fa91506159ab565b386103e9565b905061040b816159ab565b906103e2565b905061041c81615959565b906103db565b604435906bffffffffffffffffffffffff821682036102c957565b60a435906bffffffffffffffffffffffff821682036102c957565b346102c95760406003193601126102c957600435610475816102ab565b6024356bffffffffffffffffffffffff811681036102c95761049e9161049961408e565b615038565b005b60009103126102c957565b90600182811c921680156104f4575b60208310146104c557565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f16916104ba565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6080810190811067ffffffffffffffff82111761054957604052565b6104fe565b67ffffffffffffffff811161054957604052565b6040810190811067ffffffffffffffff82111761054957604052565b90601f601f19910116810190811067ffffffffffffffff82111761054957604052565b60005b8381106105b45750506000910152565b81810151838201526020016105a4565b90601f19601f6020936105e2815180928187528780880191016105a1565b0116010190565b9060206105fa9281815201906105c4565b90565b346102c9576000806003193601126106fd576040519080600454610620816104ab565b808552916001918083169081156106b5575060011461065a575b6106568561064a8187038261057e565b604051918291826105e9565b0390f35b9250600483527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b82841061069d57505050810160200161064a8261065661063a565b80546020858701810191909152909301928101610682565b8695506106569693506020925061064a9491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101929361063a565b80fd5b346102c95760206003193601126102c9576107196158c0565b5060043560005260126020526106566107356040600020615638565b6040519182918291909160608060808301948051845267ffffffffffffffff80602083015116602086015260408201511660408501520151910152565b6040519061077f82610562565b565b67ffffffffffffffff811161054957601f01601f191660200190565b81601f820112156102c9578035906107b482610781565b926107c2604051948561057e565b828452602083830101116102c957816000926020809301838601378301015290565b60206003198201126102c9576004359067ffffffffffffffff82116102c9576105fa9160040161079d565b346102c95761081d366107e4565b61082561416a565b805167ffffffffffffffff81116105495761084a816108456004546104ab565b614b0a565b602080601f83116001146108875750819260009261087c575b50506000198260011b9260031b1c191617600455600080f35b015190503880610863565b90601f198316936108ba60046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90565b926000905b8682106108f657505083600195106108dd575b505050811b01600455005b015160001960f88460031b161c191690553880806108d2565b806001859682949686015181550195019301906108bf565b346102c9576020806003193601126102c95761092b600435613765565b6040519060009260035461093e816104ab565b906001908181169081156109ff57506001146109a1575b6106568561064a8161099361096a8b8a6130aa565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b03601f19810183528261057e565b9091945060036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b906000915b8383106109ec575050508201909201918161099361096a610955565b80548684018801529186019181016109d0565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168685015250508015150283010192508161099361096a610955565b346102c95760006003193601126102c957610a556158c0565b506106566107356155fd565b346102c95760006003193601126102c9576020600b54604051908152f35b346102c95760206003193601126102c95760043560005260076020526020600160406000200154604051908152f35b346102c95760206003193601126102c957600435600052600c6020526020604060002054604051908152f35b346102c95760406003193601126102c9576004356000526006602052604060002060405190610b0882610562565b549073ffffffffffffffffffffffffffffffffffffffff908183169283825260a01c60208201529115610b94575b610b5f610b576bffffffffffffffffffffffff602085015116602435613703565b612710900490565b915116610656604051928392836020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b9050610b9e61476e565b90610b36565b346102c95760206003193601126102c95773ffffffffffffffffffffffffffffffffffffffff600435610bd6816102ab565b1660005260026020526020604060002054604051908152f35b67ffffffffffffffff81116105495760051b60200190565b81601f820112156102c957803591610c1e83610bef565b92610c2c604051948561057e565b808452602092838086019260051b8201019283116102c9578301905b828210610c56575050505090565b81358152908301908301610c48565b346102c95760a06003193601126102c957600435610c82816102ab565b60243590610c8f826102ab565b67ffffffffffffffff906044358281116102c957610cb1903690600401610c07565b916064358181116102c957610cca903690600401610c07565b906084359081116102c957610ce390369060040161079d565b9273ffffffffffffffffffffffffffffffffffffffff94858416803314908115610d9b575b5015610d3157610d1e61049e968216151561241b565b610d2a838383876127c8565b5a93612ad0565b608460405162461bcd60e51b815260206004820152602f60248201527f45524331313535237361666542617463685472616e7366657246726f6d3a204960448201527f4e56414c49445f4f50455241544f5200000000000000000000000000000000006064820152fd5b9050600052600160205260ff610dd53360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541638610d08565b346102c95760406003193601126102c957600435602435610dfd816102ab565b6000918083526007602052610e186001604085200154614269565b808352600760205260ff610e4f83604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541615610e5a578280f35b8083526007602052610e8f82604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b346102c95760006003193601126102c957602073ffffffffffffffffffffffffffffffffffffffff600e5460081c16604051908152f35b346102c95760406003193601126102c957602435610f4f816102ab565b3373ffffffffffffffffffffffffffffffffffffffff821603610f785761049e90600435614690565b608460405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b6064359067ffffffffffffffff821682036102c957565b6084359067ffffffffffffffff821682036102c957565b346102c95760c06003193601126102c9577f8fd3ac39fbb3d5e9c906dd9ec439dc6e584b8fa3ce02d5b67d589b22b22152a9602435600435611177604435611057816102ab565b61105f610fe2565b611067610ff9565b9060a435926110746141bf565b7fffffffffffffffffffffff0000000000000000000000000000000000000000ff74ffffffffffffffffffffffffffffffffffffffff00600e549260081b16911617600e556040516110c58161052d565b85815283606067ffffffffffffffff928385169384602083015286166040820152015285600f55601054907fffffffffffffffffffffffffffffffff000000000000000000000000000000006fffffffffffffffff00000000000000008560401b169216171760105561113783601155565b61114086600955565b6040519586958691936080939196959460a08401978452602084015267ffffffffffffffff80921660408401521660608201520152565b0390a1005b346102c95760606003193601126102c95761049e61122373ffffffffffffffffffffffffffffffffffffffff6004356111b4816102ab565b6112316024356111c3816102ab565b6111cb614214565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff909116602482015260448035908201529384906064820190565b03601f19810185528461057e565b166156de565b346102c95760406003193601126102c957600435611254816102ab565b61125c614214565b60008080808094602435905af16112716157d8565b501561127a5780f35b60046040517f750b219c000000000000000000000000000000000000000000000000000000008152fd5b90815180825260208080930193019160005b8281106112c4575050505090565b8351855293810193928101926001016112b6565b9060206105fa9281815201906112a4565b346102c95760406003193601126102c95760043567ffffffffffffffff8082116102c957366023830112156102c957816004013561132681610bef565b92611334604051948561057e565b81845260209160248386019160051b830101913683116102c957602401905b82821061138c57856024358681116102c9576106569161137a611380923690600401610c07565b90612bcd565b604051918291826112d8565b838091833561139a816102ab565b815201910190611353565b346102c95760c06003193601126102c9577f8ced76aee4b96a1e218e7903610fc7d648023d9075677163a5b31396cb280f966024356004356111776044356113eb610fe2565b6113f3610ff9565b9060a435926114006141bf565b60405161140c8161052d565b87815260026020820167ffffffffffffffff90818616815260408401828816815260608501928984528b6000526012602052604060002095518655600186019251167fffffffffffffffffffffffffffffffff000000000000000000000000000000006fffffffffffffffff00000000000000008454935160401b1692161717905551910155806114a787600052600a602052604060002090565b55604051968796879260a09492979695919760c085019885526020850152604084015267ffffffffffffffff80921660608401521660808201520152565b346102c95760606003193601126102c957602435611502816102ab565b61150a610422565b9061151361408e565b61152f6127106bffffffffffffffffffffffff84161115614fc7565b73ffffffffffffffffffffffffffffffffffffffff8116156115f25761158e61049e9261157961155d610772565b73ffffffffffffffffffffffffffffffffffffffff9094168452565b6bffffffffffffffffffffffff166020830152565b6115a46004356000526006602052604060002090565b815160209092015160a01b7fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b606460405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152fd5b346102c95760806003193601126102c957600435611653816102ab565b67ffffffffffffffff906024358281116102c957611675903690600401610c07565b6044358381116102c95761168d903690600401610c07565b906064359384116102c9576116a961049e94369060040161079d565b926116b26141bf565b615377565b346102c9576000806003193601126106fd5760405190806003546116da816104ab565b808552916001918083169081156106b55750600114611703576106568561064a8187038261057e565b9250600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061174657505050810160200161064a8261065661063a565b8054602085870181019190915290930192810161172b565b346102c95761176c366107e4565b61177461416a565b805167ffffffffffffffff811161054957611799816117946003546104ab565b614b7b565b602080601f83116001146117d6575081926000926117cb575b50506000198260011b9260031b1c191617600355600080f35b0151905038806117b2565b90601f1983169361180960036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90565b926000905b868210611845575050836001951061182c575b505050811b01600355005b015160001960f88460031b161c19169055388080611821565b8060018596829496860151815501950193019061180e565b346102c95760406003193601126102c957602060ff6118b5602435611881816102ab565b6004356000526007845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166040519015158152f35b346102c9576118cf366107e4565b6118d761416a565b805167ffffffffffffffff8111610549576118fc816118f76008546104ab565b614bec565b602080601f83116001146119395750819260009261192e575b50506000198260011b9260031b1c191617600855600080f35b015190503880611915565b90601f1983169361196c60086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390565b926000905b8682106119a8575050836001951061198f575b505050811b01600855005b015160001960f88460031b161c19169055388080611984565b80600185968294968601518155019501930190611971565b9181601f840112156102c95782359167ffffffffffffffff83116102c9576020808501948460051b0101116102c957565b60a06003193601126102c957600435611a09816102ab565b67ffffffffffffffff906024358281116102c957611a2b903690600401610c07565b906044358381116102c957611a44903690600401610c07565b6064358481116102c957611a5c90369060040161079d565b906084359485116102c957611a7861049e9536906004016119c0565b9490936150f6565b346102c95760006003193601126102c957602060405160008152f35b801515036102c957565b346102c95760406003193601126102c957600435611ac3816102ab565b73ffffffffffffffffffffffffffffffffffffffff60243591611ae583611a9c565b336000526001602052611b5083611b208360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b604051921515835216907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b346102c95760c06003193601126102c957600435611b9f816102ab565b60243590611bac826102ab565b67ffffffffffffffff916044358381116102c957611bce903690600401610c07565b6064358481116102c957611be6903690600401610c07565b9060843592611bf484611a9c565b60a4359586116102c957611c0f61049e96369060040161079d565b94612e86565b346102c95760c06003193601126102c957600435611c32816102ab565b60243590611c3f826102ab565b60443590606435608435611c5281611a9c565b60a43567ffffffffffffffff81116102c957611c7290369060040161079d565b73ffffffffffffffffffffffffffffffffffffffff861615611d8757611d1d611d3191611c9d612cd8565b5060008415611d7e5750611d2b60015b604051938491888b8d8c6020870191959493909260a09360c08401977fce0b514b3931bdbe4d5d44e4f035afe7113767b7db71949271f6a62d9c60f558855273ffffffffffffffffffffffffffffffffffffffff8092166020860152166040840152606083015260808201520152565b03601f19810184528361057e565b85613187565b90611d3e83868887612505565b15611d72579061049e94611d5e83602080611d6d96518301019101612da4565b9290956020870151928661263d565b613477565b9261049e945a9361263d565b611d2b90611cad565b608460405162461bcd60e51b815260206004820152603360248201527f455243313135354d657461236d657461536166655472616e7366657246726f6d60448201527f3a20494e56414c49445f524543495049454e54000000000000000000000000006064820152fd5b346102c95760406003193601126102c95761049e602435600435611e14826102ab565b806000526007602052611e2e600160406000200154614269565b614690565b346102c9576000806003193601126106fd576040519080600854611e56816104ab565b808552916001918083169081156106b55750600114611e7f576106568561064a8187038261057e565b9250600883527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee35b828410611ec257505050810160200161064a8261065661063a565b80546020858701810191909152909301928101611ea7565b346102c95760406003193601126102c957602060ff6118b5600435611efe816102ab565b73ffffffffffffffffffffffffffffffffffffffff60243591611f20836102ab565b166000526001845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b346102c95760a06003193601126102c957600435611f6f816102ab565b60243590611f7c826102ab565b6044359060643560843567ffffffffffffffff81116102c957611fa390369060040161079d565b9273ffffffffffffffffffffffffffffffffffffffff9485841680331490811561205b575b5015611ff157611fde61049e96821615156123aa565b611fea83838387612505565b5a9361263d565b608460405162461bcd60e51b815260206004820152602a60248201527f4552433131353523736166655472616e7366657246726f6d3a20494e56414c4960448201527f445f4f50455241544f52000000000000000000000000000000000000000000006064820152fd5b9050600052600160205260ff6120953360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541638611fc8565b346102c95760a06003193601126102c9576004356120ba816102ab565b602435906120c7826102ab565b604435916120d483611a9c565b606435906120e182611a9c565b60843567ffffffffffffffff81116102c95761210461218c91369060040161079d565b6000861561225a57506001905b600085156122505750611d2b6001925b611d1d604051948592888b60208601909260809295949360a08301967ff5d4c820494c8595de274c7ff619bead38aac4fbc3d143b5bf956aa4b84fa524845273ffffffffffffffffffffffffffffffffffffffff809216602085015216604083015260608201520152565b936121e481611b20846121bf8873ffffffffffffffffffffffffffffffffffffffff166000526001602052604060002090565b9073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b604051901515815273ffffffffffffffffffffffffffffffffffffffff918216918416907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a361223457005b61224a8260208061049e95518301019101612fe6565b90613477565b611d2b9092612121565b90612111565b346102c95760c06003193601126102c95760043561227d816102ab565b67ffffffffffffffff906024358281116102c95761229f90369060040161079d565b6044358381116102c9576122b790369060040161079d565b6064359384116102c9576122d261049e94369060040161079d565b90608435926122e0846102ab565b6122e861043d565b94614e25565b346102c95760606003193601126102c95760243567ffffffffffffffff81116102c95761233961232460209236906004016119c0565b60443591612331836102ab565b600435615c03565b6040519015158152f35b346102c95760806003193601126102c957600435612360816102ab565b67ffffffffffffffff6044358181116102c95761238190369060040161079d565b916064359182116102c9576020926123a061233993369060040161079d565b9160243590613cf6565b156123b157565b608460405162461bcd60e51b815260206004820152602b60248201527f4552433131353523736166655472616e7366657246726f6d3a20494e56414c4960448201527f445f524543495049454e540000000000000000000000000000000000000000006064820152fd5b1561242257565b608460405162461bcd60e51b815260206004820152603060248201527f45524331313535237361666542617463685472616e7366657246726f6d3a204960448201527f4e56414c49445f524543495049454e54000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9060001982019182116124ca57565b61248c565b919082039182116124ca57565b90606482018092116124ca57565b90600182018092116124ca57565b919082018092116124ca57565b9291909173ffffffffffffffffffffffffffffffffffffffff809416926000948486528560205260408620848752602052604086209182548481039081116124ca5760409355169485815280602052818120848252602052208054918083018093116124ca5791905560408051928352602083019190915233917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6291819081015b0390a4565b908160209103126102c957516105fa81610327565b6040513d6000823e3d90fd5b156125d357565b608460405162461bcd60e51b815260206004820152603a60248201527f45524331313535235f63616c6c6f6e4552433131353552656365697665643a2060448201527f494e56414c49445f4f4e5f524543454956455f4d4553534147450000000000006064820152fd5b9491939261264a82613871565b612657575b505050505050565b60006020946126cc976040518099819782967ff23a6e61000000000000000000000000000000000000000000000000000000009b8c855233600486015273ffffffffffffffffffffffffffffffffffffffff80961660248601526044850152606484015260a0608484015260a48301906105c4565b03941690f19182156127475761270e927fffffffff0000000000000000000000000000000000000000000000000000000091600091612719575b5016146125cc565b38808080808061264f565b61273a915060203d8111612740575b612732818361057e565b8101906125ab565b38612706565b503d612728565b6125c0565b60001981146124ca5760010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b805182101561279e5760209160051b010190565b61275b565b90916127ba6105fa936040845260408401906112a4565b9160208184039101526112a4565b92919081518351036128e157815160005b8181106128305750506125a67f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb9160405191829173ffffffffffffffffffffffffffffffffffffffff8091169716953395836127a3565b8061283e6128dc928761278a565b5161289061288861286f8a73ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b612879858a61278a565b51600052602052604060002090565b9182546124cf565b905561289c818761278a565b516128d56128cd61286f8773ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b9182546124f8565b905561274c565b6127d9565b608460405162461bcd60e51b815260206004820152603560248201527f45524331313535235f7361666542617463685472616e7366657246726f6d3a2060448201527f494e56414c49445f4152524159535f4c454e47544800000000000000000000006064820152fd5b1561295257565b608460405162461bcd60e51b815260206004820152603f60248201527f45524331313535235f63616c6c6f6e455243313135354261746368526563656960448201527f7665643a20494e56414c49445f4f4e5f524543454956455f4d455353414745006064820152fd5b929190926129c981613871565b6129d5575b5050505050565b612a6694600060209473ffffffffffffffffffffffffffffffffffffffff604051809981978296612a57612a447fbc197c81000000000000000000000000000000000000000000000000000000009d8e875233600488015289602488015260a0604488015260a48701906112a4565b60031993848783030160648801526112a4565b918483030160848501526105c4565b03941690f191821561274757612aa8927fffffffff0000000000000000000000000000000000000000000000000000000091600091612ab2575b50161461294b565b38808080806129ce565b612aca915060203d811161274057612732818361057e565b38612aa0565b9493929193612ade82613871565b612aea57505050505050565b6000602094612b5b97604051809981978296612a57612a447fbc197c81000000000000000000000000000000000000000000000000000000009d8e875233600488015273ffffffffffffffffffffffffffffffffffffffff809816602488015260a0604488015260a48701906112a4565b03941690f19182156127475761270e927fffffffff0000000000000000000000000000000000000000000000000000000091600091612ab25750161461294b565b90612ba682610bef565b612bb3604051918261057e565b828152601f19612bc38294610bef565b0190602036910137565b9190918051835103612c6e57612be38151612b9c565b9060005b8151811015612c675780612c51612c47612c21612c07612c62958761278a565b5173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b612879838961278a565b54612c5c828661278a565b5261274c565b612be7565b5090925050565b608460405162461bcd60e51b815260206004820152602c60248201527f455243313135352362616c616e63654f6642617463683a20494e56414c49445f60448201527f41525241595f4c454e47544800000000000000000000000000000000000000006064820152fd5b60405190612ce58261052d565b606080836000815260006020820152600060408201520152565b81601f820112156102c9578051612d1581610781565b92612d23604051948561057e565b818452602082840101116102c9576105fa91602080850191016105a1565b91906080838203126102c95760405190612d5a8261052d565b819380518352602081015160208401526040810151612d78816102ab565b604084015260608101519167ffffffffffffffff83116102c957606092612d9f9201612cff565b910152565b9190916040818403126102c95780519267ffffffffffffffff938481116102c95781612dd1918401612d41565b9360208301519081116102c9576105fa9201612cff565b15612def57565b608460405162461bcd60e51b815260206004820152603860248201527f455243313135354d657461236d6574615361666542617463685472616e73666560448201527f7246726f6d3a20494e56414c49445f524543495049454e5400000000000000006064820152fd5b805160208092019160005b828110612e72575050505090565b835185529381019392810192600101612e64565b92909493612eab73ffffffffffffffffffffffffffffffffffffffff87161515612de8565b612eb3612cd8565b50612f988460405196612f9260209889612f868c8a84612ed68582018093612e59565b0394612eea601f199687810183528261057e565b5190208a604051612f0e81612f028882018095612e59565b0388810183528261057e565b5190209060008b15612fe057506001925b604080517fa3d4926e8cf8fe8e020cd29f514c256bc2eec62aa2337e415f1a33a4828af5a097810197885273ffffffffffffffffffffffffffffffffffffffff9b8c1660208901529a909116908601526060850152608084015260a0830152859160c00190565b0390810184528361057e565b86613187565b90612fa5838589886127c8565b15612fd25794611d6d9291612fc587878061077f9a518301019101612da4565b9390968701519286612ad0565b93509061077f945a93612ad0565b92612f1f565b906020828203126102c957815167ffffffffffffffff81116102c9576105fa9201612d41565b9190916040818403126102c95780519267ffffffffffffffff938481116102c95781612dd1918401612cff565b1561304057565b608460405162461bcd60e51b815260206004820152602f60248201527f455243313135354d657461235f7369676e617475726556616c69646174696f6e60448201527f3a20494e56414c49445f4e4f4e434500000000000000000000000000000000006064820152fd5b906130bd602092828151948592016105a1565b0190565b6020906130d760409593828151948592016105a1565b0191825260208201520190565b6020939291906130fb8592828151948592016105a1565b01908152613111825180938580850191016105a1565b010190565b1561311d57565b608460405162461bcd60e51b815260206004820152603360248201527f455243313135354d657461235f7369676e617475726556616c69646174696f6e60448201527f3a20494e56414c49445f5349474e4154555245000000000000000000000000006064820152fd5b916132d3906131a26105fa936020808251830101910161300c565b9490916131cf8273ffffffffffffffffffffffffffffffffffffffff166000526002602052604060002090565b54916131ef6131dd8561395f565b938085101590816132d8575b50613039565b61328a83613251895160208b012061323160405191826132156020820192878b856130c1565b0392613229601f199485810183528261057e565b5190206139f9565b956132458c604051998a93602085016130e4565b0390810187528661057e565b61325a816124ea565b6132848473ffffffffffffffffffffffffffffffffffffffff166000526002602052604060002090565b556124ea565b60405190815273ffffffffffffffffffffffffffffffffffffffff8216907fb861b7bdbe611a846ab271b8d2810391bc8b5a968f390c322438ecab66bccf5990602090a2613cf6565b613116565b6132e291506124dc565b8410386131e9565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6003111561332357565b6132ea565b1561332f57565b608460405162461bcd60e51b815260206004820152602e60248201527f455243313135354d657461235f7472616e736665724761734665653a20554e5360448201527f5550504f525445445f544f4b454e0000000000000000000000000000000000006064820152fd5b908160209103126102c957516105fa816102ab565b908160209103126102c957516105fa81611a9c565b156133ca57565b608460405162461bcd60e51b815260206004820152603260248201527f455243313135354d657461235f7472616e736665724761734665653a2045524360448201527f32305f5452414e534645525f4641494c454400000000000000000000000000006064820152fd5b91908260409103126102c9576020825161344d816102ab565b92015190565b604051906020820182811067ffffffffffffffff8211176105495760405260008252565b606082019160ff61349161348b85516138a7565b60f81c90565b1661349e60028210613328565b6134a781613319565b6134ca6040835193015173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff94908581166136cc575033915b6134f581613319565b6135e05761350d905160208082518301019101613434565b9416933085036135385761077f945061352883828487612505565b5a91613532613453565b9461263d565b919390813b156102c957600080946135bc604051978896879586947ff242432a00000000000000000000000000000000000000000000000000000000865260048601929060c0949273ffffffffffffffffffffffffffffffffffffffff80921685521660208401526040830152606082015260a06080820152600060a08201520190565b03925af18015612747576135cd5750565b806135da61077f9261054e565b806104a0565b61368294509060006136206136076136076136076020989651898082518301019101613399565b73ffffffffffffffffffffffffffffffffffffffff1690565b92604051968795869485937f23b872dd0000000000000000000000000000000000000000000000000000000085526004850160409194939294606082019573ffffffffffffffffffffffffffffffffffffffff80921683521660208201520152565b03925af180156127475761077f9160009161369e575b506133c3565b6136bf915060203d81116136c5575b6136b7818361057e565b8101906133ae565b38613698565b503d6136ad565b916134ec565b604051906136df8261052d565b604282526060366020840137565b90600a820291808304600a14901517156124ca57565b818102929181159184041417156124ca57565b60ff166030019060ff82116124ca57565b80516040101561279e5760600190565b80511561279e5760200190565b80516001101561279e5760210190565b90815181101561279e570160200190565b8015613837578060008281935b61382357508161378184610781565b9361378f604051958661057e565b808552601f1961379e82610781565b01366020870137905b6137b15750505090565b6137ba906124bb565b918261381b6138126137ea6137e56137df600a8704966137d9886136ed565b906124cf565b60ff1690565b613716565b60f81b7fff000000000000000000000000000000000000000000000000000000000000001690565b841a9186613754565b5391826137a7565b9261382f600a9161274c565b930480613772565b5060405161384481610562565b600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b3f801515908161387f575090565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709150141590565b8051156138f557805190600019918281019081116124ca576138ea7fff000000000000000000000000000000000000000000000000000000000000009183613754565b511691815101905290565b608460405162461bcd60e51b815260206004820152603760248201527f4c6962427974657323706f704c617374427974653a20475245415445525f544860448201527f414e5f5a45524f5f4c454e4754485f52455155495245440000000000000000006064820152fd5b606181511061396f576061015190565b608460405162461bcd60e51b815260206004820152603c60248201527f4c696242797465732372656164427974657333323a20475245415445525f4f5260448201527f5f455155414c5f544f5f33325f4c454e4754485f5245515549524544000000006064820152fd5b602081511061396f576020015190565b604081511061396f576040015190565b604090815190613a0882610562565b6002825260208201927f1901000000000000000000000000000000000000000000000000000000000000845280519060208201917f035aff83d86937d35b32e04f0ddc6ff469290eef2f1b692d8a815c89404d474983523082820152818152606081019481861067ffffffffffffffff87111761054957613abb946060948785528351902091613aa160808501998a92519283916105a1565b830191608083015260a0820152039081018452018261057e565b51902090565b15613ac857565b60a460405162461bcd60e51b815260206004820152604360248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a204c454e4754485f475245415445525f5448414e5f305f524551554960648201527f52454400000000000000000000000000000000000000000000000000000000006084820152fd5b15613b5f57565b608460405162461bcd60e51b815260206004820152603360248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a20494e56414c49445f5349474e4552000000000000000000000000006064820152fd5b6006111561332357565b15613bda57565b60405162461bcd60e51b815260206004820152603a60248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a20554e535550504f525445445f5349474e41545552450000000000006064820152608490fd5b0390fd5b6040906105fa9392815281602082015201906105c4565b9091613c776105fa936040845260408401906105c4565b9160208184039101526105c4565b15613c8c57565b608460405162461bcd60e51b815260206004820152603760248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a204c454e4754485f39375f52455155495245440000000000000000006064820152fd5b9190600091613d0785511515613ac1565b73ffffffffffffffffffffffffffffffffffffffff80941694613d2b861515613b58565b60ff613d3961348b836138a7565b1691613d4760058410613bd3565b613d5083613bc9565b613d5983613bc9565b82613dc95760405162461bcd60e51b815260206004820152603660248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a20494c4c4547414c5f5349474e4154555245000000000000000000006064820152608490fd5b82613dd48694613bc9565b60018103613e74575050602092613dee6061835114613c85565b613e60613dfa836139d9565b92613e3961348b613e13613e0d846139e9565b93613727565b517fff000000000000000000000000000000000000000000000000000000000000001690565b93604051948594859094939260ff6060936080840197845216602083015260408201520152565b838052039060015afa156127475751161490565b90919250613e8181613bc9565b60028103613f2557505060209181613e9d606186945114613c85565b613e60613ea9826139d9565b91613ebc61348b613e13613e0d846139e9565b93604051613efb816109938a82019485603c917f19457468657265756d205369676e6564204d6573736167653a0a3332000000008252601c8201520190565b51902092604051948594859094939260ff6060936080840197845216602083015260408201520152565b90959291939450613f3581613bc9565b60038103613fd3575050613f7c9160209160405180809581947f20c13b0b00000000000000000000000000000000000000000000000000000000998a845260048401613c60565b03915afa908115612747577fffffffff000000000000000000000000000000000000000000000000000000009291613fb5575b50161490565b613fcd915060203d811161274057612732818361057e565b38613faf565b6004919550613fe181613bc9565b146140515760405162461bcd60e51b815260206004820152603a60248201527f5369676e617475726556616c696461746f7223697356616c69645369676e617460448201527f7572653a20554e535550504f525445445f5349474e41545552450000000000006064820152608490fd5b613f7c9160209160405180809581947f1626ba7e00000000000000000000000000000000000000000000000000000000998a845260048401613c49565b3360009081527fd838e0c4bf6fbf1b92284c80395eaed7cb9e717c948275160db5e385e7ed0c8f602052604090205460ff16156140c757565b613c4560486141526140d8336147f9565b6109936140e3614896565b6040519485937f416363657373436f6e74726f6c3a206163636f756e742000000000000000000060208601526141238151809260206037890191016105a1565b84017f206973206d697373696e6720726f6c6520000000000000000000000000000000603782015201906130aa565b60405191829162461bcd60e51b8352600483016105e9565b3360009081527ff1ea39e85fdf1b91eed6f63005412888c26eb79f5123dd508f2e1d38c8ded730602052604090205460ff16156141a357565b613c4560486141526141b4336147f9565b6109936140e3614933565b3360009081527f9ec6aad44ad8ecbb288a4d8d4b7f49871400dc8e2a237ced02488508eec0d2d8602052604090205460ff16156141f857565b613c456048614152614209336147f9565b6109936140e36149d0565b3360009081527f6a08b1dbd1fa935f98a1934130b4227b075e328a9f5899896fb9cfa63f4ac22e602052604090205460ff161561424d57565b613c45604861415261425e336147f9565b6109936140e3614a6d565b80600052600760205260ff6142a23360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b5416156142ac5750565b6142b5336147f9565b6142bd6136d2565b9160306142c984613737565b5360786142d584613744565b5360415b600181116142f857613c45604861415285610993886140e388156147ae565b90600f811690601082101561279e577f3031323334353637383961626364656600000000000000000000000000000000614341921a6143378487613754565b5360041c916147a1565b6142d9565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df602052604081205460ff1615614397575050565b80805260076020526143cc82604083209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fd838e0c4bf6fbf1b92284c80395eaed7cb9e717c948275160db5e385e7ed0c8f602052604081207f6db4061a20ca83a3be756ee172bd37a029093ac5afe4ce968c6d5435b43cb0119060ff905b5416156144aa57505050565b80825260076020526144df83604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527ff1ea39e85fdf1b91eed6f63005412888c26eb79f5123dd508f2e1d38c8ded730602052604081207fe02a0315b383857ac496e9d2b2546a699afaeb4e5e83a1fdef64376d0b74e5a59060ff9061449e565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f9ec6aad44ad8ecbb288a4d8d4b7f49871400dc8e2a237ced02488508eec0d2d8602052604081207f4c02318d8c3aadc98ccf18aebbf3126f651e0c3f6a1de5ff8edcf6724a2ad5c29060ff9061449e565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f6a08b1dbd1fa935f98a1934130b4227b075e328a9f5899896fb9cfa63f4ac22e602052604081207f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec9060ff9061449e565b600090808252600760205260ff6146ca84604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166146d557505050565b808252600760205261470a83604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b6040519061477b82610562565b60055473ffffffffffffffffffffffffffffffffffffffff8116835260a01c6020830152565b80156124ca576000190190565b156147b557565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906060820182811067ffffffffffffffff82111761054957604052602a82526040366020840137603061482e83613737565b53607861483a83613744565b536029905b60018211614852576105fa9150156147ae565b600f811690601082101561279e577f3031323334353637383961626364656600000000000000000000000000000000614890921a6143378486613754565b9061483f565b7f6db4061a20ca83a3be756ee172bd37a029093ac5afe4ce968c6d5435b43cb0116148bf6136d2565b9060306148cb83613737565b5360786148d783613744565b536041905b600182116148ef576105fa9150156147ae565b600f811690601082101561279e577f303132333435363738396162636465660000000000000000000000000000000061492d921a6143378486613754565b906148dc565b7fe02a0315b383857ac496e9d2b2546a699afaeb4e5e83a1fdef64376d0b74e5a561495c6136d2565b90603061496883613737565b53607861497483613744565b536041905b6001821161498c576105fa9150156147ae565b600f811690601082101561279e577f30313233343536373839616263646566000000000000000000000000000000006149ca921a6143378486613754565b90614979565b7f4c02318d8c3aadc98ccf18aebbf3126f651e0c3f6a1de5ff8edcf6724a2ad5c26149f96136d2565b906030614a0583613737565b536078614a1183613744565b536041905b60018211614a29576105fa9150156147ae565b600f811690601082101561279e577f3031323334353637383961626364656600000000000000000000000000000000614a67921a6143378486613754565b90614a16565b7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec614a966136d2565b906030614aa283613737565b536078614aae83613744565b536041905b60018211614ac6576105fa9150156147ae565b600f811690601082101561279e577f3031323334353637383961626364656600000000000000000000000000000000614b04921a6143378486613754565b90614ab3565b601f8111614b16575050565b600090600482527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b906020601f850160051c83019410614b71575b601f0160051c01915b828110614b6657505050565b818155600101614b5a565b9092508290614b51565b601f8111614b87575050565b600090600382527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b906020601f850160051c83019410614be2575b601f0160051c01915b828110614bd757505050565b818155600101614bcb565b9092508290614bc2565b601f8111614bf8575050565b600090600882527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3906020601f850160051c83019410614c53575b601f0160051c01915b828110614c4857505050565b818155600101614c3c565b9092508290614c33565b90815167ffffffffffffffff811161054957614c7e816117946003546104ab565b602080601f8311600114614cb95750819293600092614cae575b50506000198260011b9260031b1c191617600355565b015190503880614c98565b90601f19831694614cec60036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90565b926000905b878210614d29575050836001959610614d10575b505050811b01600355565b015160001960f88460031b161c19169055388080614d05565b80600185968294968601518155019501930190614cf1565b90815167ffffffffffffffff811161054957614d62816118f76008546104ab565b602080601f8311600114614d9d5750819293600092614d92575b50506000198260011b9260031b1c191617600855565b015190503880614d7c565b90601f19831694614dd060086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee390565b926000905b878210614e0d575050836001959610614df4575b505050811b01600855565b015160001960f88460031b161c19169055388080614de9565b80600185968294968601518155019501930190614dd5565b949392919060ff600e5416614f9d5780519067ffffffffffffffff821161054957614e55826108456004546104ab565b60209081601f8411600114614f045750614ebb959383614ea094614ec99a999794614e9b94600092614ef9575b50506000198260011b9260031b1c191617600455614c5d565b614d41565b614ea984614346565b614eb284614434565b61049984614546565b614ec4816145b4565b614622565b61077f60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600e541617600e55565b015190503880614e82565b60046000529190601f1984167f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b936000905b828210614f8557505084614ec99a999794614e9b94614ebb9a9894614ea09860019510614f6c575b505050811b01600455614c5d565b015160001960f88460031b161c19169055388080614f5e565b80600186978294978701518155019601940190614f36565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b15614fce57565b608460405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff83169161506b612710841115614fc7565b169182156150b2577fffffffffffffffffffffffff00000000000000000000000000000000000000009160206040516150a381610562565b858152015260a01b1617600555565b606460405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152fd5b9495929593909360009485809561510b6155fd565b9586936020926151258487015167ffffffffffffffff1690565b9c61515367ffffffffffffffff9e8f8061514b6040809c015167ffffffffffffffff1690565b169116615898565b95809c5b8d855111156152c9578d9061516c828761278a565b518092151591826152be575b5050615295578f9091828f9a99898e8e8d849d9c9b9a99989f61519b908d61278a565b5197806151b2886000526012602052604060002090565b6151bb90615638565b9586015167ffffffffffffffff169286015167ffffffffffffffff16169116906151e491615898565b1561526f5750505061523d575081615222615228928f8f958f9161521661522e9861521c946060840151913392615ae0565b51613703565b906124f8565b9e6124f8565b9d61274c565b9c9b9091929394959697615157565b89517f035acf500000000000000000000000000000000000000000000000000000000081526004810191909152602490fd5b8694506152229350958261521661521c9361522e9960606152289a970151913392615ae0565b600489517f340bc4c9000000000000000000000000000000000000000000000000000000008152fd5b101590508138615178565b5097509a509a9650965096505050965073ffffffffffffffffffffffffffffffffffffffff615311600e5473ffffffffffffffffffffffffffffffffffffffff9060081c1690565b1680615363575080340361532b575061077f949550615377565b86517fb99e2ab70000000000000000000000000000000000000000000000000000000081526004810191909152346024820152604490fd5b61077f969750906153779130903390615676565b90939291845194815186036155d35760009586905b80821061546d57505060095480151580615459575b61541457506153be6153b961077f9697600b546124f8565b600b55565b604051600073ffffffffffffffffffffffffffffffffffffffff8516917f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb33918061540a8888836127a3565b0390a45a926129bc565b600b546040517fa92278300000000000000000000000000000000000000000000000000000000081526004810191909152602481018890526044810191909152606490fd5b508061546788600b546124f8565b116153a1565b909661548d61547c898561278a565b51600052600a602052604060002090565b541515806155a3575b6155345761552861552e916154ab8a8761278a565b516154e76128cd8c6128796154e08c73ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b918a61278a565b90556154f38a8761278a565b516155156128cd6155048d8961278a565b51600052600c602052604060002090565b90556155218a8761278a565b51906124f8565b9761274c565b9061538c565b8284613c4561555f61547c8c61555881615551615504828a61278a565b549661278a565b519561278a565b546040519384937fa9227830000000000000000000000000000000000000000000000000000000008552600485016040919493926060820195825260208201520152565b506155bf6155b46155048a8661278a565b546155218a8761278a565b6155cc61547c8a8661278a565b5410615496565b60046040517f9d89020a000000000000000000000000000000000000000000000000000000008152fd5b6040519061560a8261052d565b81600f54815260105467ffffffffffffffff90818116602084015260401c1660408201526060601154910152565b906040516156458161052d565b60606002829480548452600181015467ffffffffffffffff90818116602087015260401c1660408501520154910152565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff9283166024820152929091166044830152606482019290925261077f916156de8260848101611d1d565b6040516157499173ffffffffffffffffffffffffffffffffffffffff1661570482610562565b6000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af16157436157d8565b91615808565b8051908161575657505050565b82806157669383010191016133ae565b1561576e5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b3d15615803573d906157e982610781565b916157f7604051938461057e565b82523d6000602084013e565b606090565b91929015615869575081511561581c575090565b3b156158255790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b82519091501561587c5750805190602001fd5b613c459060405191829162461bcd60e51b8352600483016105e9565b9080159182156158b6575b5081156158ae575090565b905042101590565b42109150386158a3565b604051906158cd8261052d565b60006060838281528260208201528260408201520152565b7fffffffff00000000000000000000000000000000000000000000000000000000167fd9b67a26000000000000000000000000000000000000000000000000000000008114615953577f01ffc9a7000000000000000000000000000000000000000000000000000000001490565b50600190565b7f0e89341c000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821614615953576105fa906158e5565b6159b481615a69565b908115615a02575b81156159d7575b81156159cd575090565b6105fa9150615a13565b7fffffffff0000000000000000000000000000000000000000000000000000000081161591506159c3565b9050615a0d81615a13565b906159bc565b7f7965db0b000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000821614908115615a63575090565b6105fa91505b7fffffffff00000000000000000000000000000000000000000000000000000000167f2a55205a000000000000000000000000000000000000000000000000000000008114908115615ab9575090565b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501490565b92919083615aef575b50505050565b615afb83838387615c03565b15615b70575050615b679173ffffffffffffffffffffffffffffffffffffffff615b3c9216600052600d602052604060002090600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b38808080615ae9565b604092919251937f5dd5cbe80000000000000000000000000000000000000000000000000000000085526004850152606060248501528260648501527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116102c95773ffffffffffffffffffffffffffffffffffffffff849260849460051b8093868601371660448301528101030190fd5b91909160009273ffffffffffffffffffffffffffffffffffffffff85168452602093600d855260408120838252855260ff604082205416159586615c4b575b50505050505090565b90919293949695506040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008882019260601b16825260148152615c8e81610562565b51902093615c9b81610bef565b92615ca9604051948561057e565b8184528784019160051b8101923684116106fd5750905b828210615ce057505050615cd5939450615cef565b388080808080615c42565b81358152908701908701615cc0565b929091906000915b8451831015615d4457615d0a838661278a565b5190600082821015615d325750600052602052615d2c60406000205b9261274c565b91615cf7565b604091615d2c93825260205220615d26565b91509250149056fea264697066735822122001630d2af462aaae50ca8d313888679bc4243ff26e8b22425779c8c08c4e3d8e64736f6c63430008130033', + signer + ) + } +} + +export const ERC1155SALEFACTORY_VERIFICATION: Omit = { + contractToVerify: 'src/tokens/ERC1155/presets/sale/ERC1155SaleFactory.sol:ERC1155SaleFactory', + version: 'v0.8.19+commit.7dd6d404', + compilerInput: { + language: 'Solidity', + sources: { + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC1155.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\nimport \'./IERC165.sol\';\n\n\ninterface IERC1155 is IERC165 {\n\n /****************************************|\n | Events |\n |_______________________________________*/\n\n /**\n * @dev Either TransferSingle or TransferBatch MUST emit when tokens are transferred, including zero amount transfers as well as minting or burning\n * Operator MUST be msg.sender\n * When minting/creating tokens, the `_from` field MUST be set to `0x0`\n * When burning/destroying tokens, the `_to` field MUST be set to `0x0`\n * The total amount transferred from address 0x0 minus the total amount transferred to 0x0 may be used by clients and exchanges to be added to the "circulating supply" for a given token ID\n * To broadcast the existence of a token ID with no initial balance, the contract SHOULD emit the TransferSingle event from `0x0` to `0x0`, with the token creator as `_operator`, and a `_amount` of 0\n */\n event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _amount);\n\n /**\n * @dev Either TransferSingle or TransferBatch MUST emit when tokens are transferred, including zero amount transfers as well as minting or burning\n * Operator MUST be msg.sender\n * When minting/creating tokens, the `_from` field MUST be set to `0x0`\n * When burning/destroying tokens, the `_to` field MUST be set to `0x0`\n * The total amount transferred from address 0x0 minus the total amount transferred to 0x0 may be used by clients and exchanges to be added to the "circulating supply" for a given token ID\n * To broadcast the existence of multiple token IDs with no initial balance, this SHOULD emit the TransferBatch event from `0x0` to `0x0`, with the token creator as `_operator`, and a `_amount` of 0\n */\n event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _amounts);\n\n /**\n * @dev MUST emit when an approval is updated\n */\n event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);\n\n\n /****************************************|\n | Functions |\n |_______________________________________*/\n\n /**\n * @notice Transfers amount of an _id from the _from address to the _to address specified\n * @dev MUST emit TransferSingle event on success\n * Caller must be approved to manage the _from account\'s tokens (see isApprovedForAll)\n * MUST throw if `_to` is the zero address\n * MUST throw if balance of sender for token `_id` is lower than the `_amount` sent\n * MUST throw on any other error\n * When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0). If so, it MUST call `onERC1155Received` on `_to` and revert if the return amount is not `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`\n * @param _from Source address\n * @param _to Target address\n * @param _id ID of the token type\n * @param _amount Transfered amount\n * @param _data Additional data with no specified format, sent in call to `_to`\n */\n function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount, bytes calldata _data) external;\n\n /**\n * @notice Send multiple types of Tokens from the _from address to the _to address (with safety call)\n * @dev MUST emit TransferBatch event on success\n * Caller must be approved to manage the _from account\'s tokens (see isApprovedForAll)\n * MUST throw if `_to` is the zero address\n * MUST throw if length of `_ids` is not the same as length of `_amounts`\n * MUST throw if any of the balance of sender for token `_ids` is lower than the respective `_amounts` sent\n * MUST throw on any other error\n * When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0). If so, it MUST call `onERC1155BatchReceived` on `_to` and revert if the return amount is not `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`\n * Transfers and events MUST occur in the array order they were submitted (_ids[0] before _ids[1], etc)\n * @param _from Source addresses\n * @param _to Target addresses\n * @param _ids IDs of each token type\n * @param _amounts Transfer amounts per token type\n * @param _data Additional data with no specified format, sent in call to `_to`\n */\n function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _amounts, bytes calldata _data) external;\n\n /**\n * @notice Get the balance of an account\'s Tokens\n * @param _owner The address of the token holder\n * @param _id ID of the Token\n * @return The _owner\'s balance of the Token type requested\n */\n function balanceOf(address _owner, uint256 _id) external view returns (uint256);\n\n /**\n * @notice Get the balance of multiple account/token pairs\n * @param _owners The addresses of the token holders\n * @param _ids ID of the Tokens\n * @return The _owner\'s balance of the Token types requested (i.e. balance for each (owner, id) pair)\n */\n function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);\n\n /**\n * @notice Enable or disable approval for a third party ("operator") to manage all of caller\'s tokens\n * @dev MUST emit the ApprovalForAll event on success\n * @param _operator Address to add to the set of authorized operators\n * @param _approved True if the operator is approved, false to revoke approval\n */\n function setApprovalForAll(address _operator, bool _approved) external;\n\n /**\n * @notice Queries the approval status of an operator for a given owner\n * @param _owner The owner of the Tokens\n * @param _operator Address of authorized operator\n * @return isOperator True if the operator is approved, false if not\n */\n function isApprovedForAll(address _owner, address _operator) external view returns (bool isOperator);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC1155Metadata.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n\ninterface IERC1155Metadata {\n\n event URI(string _uri, uint256 indexed _id);\n\n /****************************************|\n | Functions |\n |_______________________________________*/\n\n /**\n * @notice A distinct Uniform Resource Identifier (URI) for a given token.\n * @dev URIs are defined in RFC 3986.\n * URIs are assumed to be deterministically generated based on token ID\n * Token IDs are assumed to be represented in their hex format in URIs\n * @return URI string\n */\n function uri(uint256 _id) external view returns (string memory);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC1155TokenReceiver.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1155 interface for accepting safe transfers.\n */\ninterface IERC1155TokenReceiver {\n\n /**\n * @notice Handle the receipt of a single ERC1155 token type\n * @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeTransferFrom` after the balance has been updated\n * This function MAY throw to revert and reject the transfer\n * Return of other amount than the magic value MUST result in the transaction being reverted\n * Note: The token contract address is always the message sender\n * @param _operator The address which called the `safeTransferFrom` function\n * @param _from The address which previously owned the token\n * @param _id The id of the token being transferred\n * @param _amount The amount of tokens being transferred\n * @param _data Additional data with no specified format\n * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`\n */\n function onERC1155Received(address _operator, address _from, uint256 _id, uint256 _amount, bytes calldata _data) external returns(bytes4);\n\n /**\n * @notice Handle the receipt of multiple ERC1155 token types\n * @dev An ERC1155-compliant smart contract MUST call this function on the token recipient contract, at the end of a `safeBatchTransferFrom` after the balances have been updated\n * This function MAY throw to revert and reject the transfer\n * Return of other amount than the magic value WILL result in the transaction being reverted\n * Note: The token contract address is always the message sender\n * @param _operator The address which called the `safeBatchTransferFrom` function\n * @param _from The address which previously owned the token\n * @param _ids An array containing ids of each token being transferred\n * @param _amounts An array containing amounts of each token being transferred\n * @param _data Additional data with no specified format\n * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`\n */\n function onERC1155BatchReceived(address _operator, address _from, uint256[] calldata _ids, uint256[] calldata _amounts, bytes calldata _data) external returns(bytes4);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC1271Wallet.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n\ninterface IERC1271Wallet {\n\n /**\n * @notice Verifies whether the provided signature is valid with respect to the provided data\n * @dev MUST return the correct magic value if the signature provided is valid for the provided data\n * > The bytes4 magic value to return when signature is valid is 0x20c13b0b : bytes4(keccak256("isValidSignature(bytes,bytes)")\n * > This function MAY modify Ethereum\'s state\n * @param _data Arbitrary length data signed on the behalf of address(this)\n * @param _signature Signature byte array associated with _data\n * @return magicValue Magic value 0x20c13b0b if the signature is valid and 0x0 otherwise\n *\n */\n function isValidSignature(\n bytes calldata _data,\n bytes calldata _signature)\n external\n view\n returns (bytes4 magicValue);\n\n /**\n * @notice Verifies whether the provided signature is valid with respect to the provided hash\n * @dev MUST return the correct magic value if the signature provided is valid for the provided hash\n * > The bytes4 magic value to return when signature is valid is 0x20c13b0b : bytes4(keccak256("isValidSignature(bytes,bytes)")\n * > This function MAY modify Ethereum\'s state\n * @param _hash keccak256 hash that was signed\n * @param _signature Signature byte array associated with _data\n * @return magicValue Magic value 0x20c13b0b if the signature is valid and 0x0 otherwise\n */\n function isValidSignature(\n bytes32 _hash,\n bytes calldata _signature)\n external\n view\n returns (bytes4 magicValue);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC165.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n\n/**\n * @title ERC165\n * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md\n */\ninterface IERC165 {\n\n /**\n * @notice Query if a contract implements an interface\n * @dev Interface identification is specified in ERC-165. This function\n * uses less than 30,000 gas\n * @param _interfaceId The interface identifier, as specified in ERC-165\n */\n function supportsInterface(bytes4 _interfaceId)\n external\n view\n returns (bool);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/interfaces/IERC20.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\n/**\n * @title ERC20 interface\n * @dev see https://eips.ethereum.org/EIPS/eip-20\n */\ninterface IERC20 {\n function transfer(address to, uint256 value) external returns (bool);\n function approve(address spender, uint256 value) external returns (bool);\n function transferFrom(address from, address to, uint256 value) external returns (bool);\n function totalSupply() external view returns (uint256);\n function balanceOf(address who) external view returns (uint256);\n function allowance(address owner, address spender) external view returns (uint256);\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport "../../interfaces/IERC1155TokenReceiver.sol";\nimport "../../interfaces/IERC1155.sol";\nimport "../../utils/Address.sol";\nimport "../../utils/ERC165.sol";\n\n/**\n * @dev Implementation of Multi-Token Standard contract\n */\ncontract ERC1155 is IERC1155, ERC165 {\n using Address for address;\n\n /***********************************|\n | Variables and Events |\n |__________________________________*/\n\n // onReceive function signatures\n bytes4 constant internal ERC1155_RECEIVED_VALUE = 0xf23a6e61;\n bytes4 constant internal ERC1155_BATCH_RECEIVED_VALUE = 0xbc197c81;\n\n // Objects balances\n mapping (address => mapping(uint256 => uint256)) internal balances;\n\n // Operator Functions\n mapping (address => mapping(address => bool)) internal operators;\n\n\n /***********************************|\n | Public Transfer Functions |\n |__________________________________*/\n\n /**\n * @notice Transfers amount amount of an _id from the _from address to the _to address specified\n * @param _from Source address\n * @param _to Target address\n * @param _id ID of the token type\n * @param _amount Transfered amount\n * @param _data Additional data with no specified format, sent in call to `_to`\n */\n function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount, bytes memory _data)\n public virtual override\n {\n require((msg.sender == _from) || isApprovedForAll(_from, msg.sender), "ERC1155#safeTransferFrom: INVALID_OPERATOR");\n require(_to != address(0),"ERC1155#safeTransferFrom: INVALID_RECIPIENT");\n\n _safeTransferFrom(_from, _to, _id, _amount);\n _callonERC1155Received(_from, _to, _id, _amount, gasleft(), _data);\n }\n\n /**\n * @notice Send multiple types of Tokens from the _from address to the _to address (with safety call)\n * @param _from Source addresses\n * @param _to Target addresses\n * @param _ids IDs of each token type\n * @param _amounts Transfer amounts per token type\n * @param _data Additional data with no specified format, sent in call to `_to`\n */\n function safeBatchTransferFrom(address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data)\n public virtual override\n {\n // Requirements\n require((msg.sender == _from) || isApprovedForAll(_from, msg.sender), "ERC1155#safeBatchTransferFrom: INVALID_OPERATOR");\n require(_to != address(0), "ERC1155#safeBatchTransferFrom: INVALID_RECIPIENT");\n\n _safeBatchTransferFrom(_from, _to, _ids, _amounts);\n _callonERC1155BatchReceived(_from, _to, _ids, _amounts, gasleft(), _data);\n }\n\n\n /***********************************|\n | Internal Transfer Functions |\n |__________________________________*/\n\n /**\n * @notice Transfers amount amount of an _id from the _from address to the _to address specified\n * @param _from Source address\n * @param _to Target address\n * @param _id ID of the token type\n * @param _amount Transfered amount\n */\n function _safeTransferFrom(address _from, address _to, uint256 _id, uint256 _amount)\n internal virtual\n {\n // Update balances\n balances[_from][_id] -= _amount;\n balances[_to][_id] += _amount;\n\n // Emit event\n emit TransferSingle(msg.sender, _from, _to, _id, _amount);\n }\n\n /**\n * @notice Verifies if receiver is contract and if so, calls (_to).onERC1155Received(...)\n */\n function _callonERC1155Received(address _from, address _to, uint256 _id, uint256 _amount, uint256 _gasLimit, bytes memory _data)\n internal virtual\n {\n // Check if recipient is contract\n if (_to.isContract()) {\n bytes4 retval = IERC1155TokenReceiver(_to).onERC1155Received{gas: _gasLimit}(msg.sender, _from, _id, _amount, _data);\n require(retval == ERC1155_RECEIVED_VALUE, "ERC1155#_callonERC1155Received: INVALID_ON_RECEIVE_MESSAGE");\n }\n }\n\n /**\n * @notice Send multiple types of Tokens from the _from address to the _to address (with safety call)\n * @param _from Source addresses\n * @param _to Target addresses\n * @param _ids IDs of each token type\n * @param _amounts Transfer amounts per token type\n */\n function _safeBatchTransferFrom(address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts)\n internal virtual\n {\n require(_ids.length == _amounts.length, "ERC1155#_safeBatchTransferFrom: INVALID_ARRAYS_LENGTH");\n\n // Number of transfer to execute\n uint256 nTransfer = _ids.length;\n\n // Executing all transfers\n for (uint256 i = 0; i < nTransfer; i++) {\n // Update storage balance of previous bin\n balances[_from][_ids[i]] -= _amounts[i];\n balances[_to][_ids[i]] += _amounts[i];\n }\n\n // Emit event\n emit TransferBatch(msg.sender, _from, _to, _ids, _amounts);\n }\n\n /**\n * @notice Verifies if receiver is contract and if so, calls (_to).onERC1155BatchReceived(...)\n */\n function _callonERC1155BatchReceived(address _from, address _to, uint256[] memory _ids, uint256[] memory _amounts, uint256 _gasLimit, bytes memory _data)\n internal virtual\n {\n // Pass data if recipient is contract\n if (_to.isContract()) {\n bytes4 retval = IERC1155TokenReceiver(_to).onERC1155BatchReceived{gas: _gasLimit}(msg.sender, _from, _ids, _amounts, _data);\n require(retval == ERC1155_BATCH_RECEIVED_VALUE, "ERC1155#_callonERC1155BatchReceived: INVALID_ON_RECEIVE_MESSAGE");\n }\n }\n\n\n /***********************************|\n | Operator Functions |\n |__________________________________*/\n\n /**\n * @notice Enable or disable approval for a third party ("operator") to manage all of caller\'s tokens\n * @param _operator Address to add to the set of authorized operators\n * @param _approved True if the operator is approved, false to revoke approval\n */\n function setApprovalForAll(address _operator, bool _approved)\n external virtual override\n {\n // Update operator status\n operators[msg.sender][_operator] = _approved;\n emit ApprovalForAll(msg.sender, _operator, _approved);\n }\n\n /**\n * @notice Queries the approval status of an operator for a given owner\n * @param _owner The owner of the Tokens\n * @param _operator Address of authorized operator\n * @return isOperator True if the operator is approved, false if not\n */\n function isApprovedForAll(address _owner, address _operator)\n public view virtual override returns (bool isOperator)\n {\n return operators[_owner][_operator];\n }\n\n\n /***********************************|\n | Balance Functions |\n |__________________________________*/\n\n /**\n * @notice Get the balance of an account\'s Tokens\n * @param _owner The address of the token holder\n * @param _id ID of the Token\n * @return The _owner\'s balance of the Token type requested\n */\n function balanceOf(address _owner, uint256 _id)\n public view virtual override returns (uint256)\n {\n return balances[_owner][_id];\n }\n\n /**\n * @notice Get the balance of multiple account/token pairs\n * @param _owners The addresses of the token holders\n * @param _ids ID of the Tokens\n * @return The _owner\'s balance of the Token types requested (i.e. balance for each (owner, id) pair)\n */\n function balanceOfBatch(address[] memory _owners, uint256[] memory _ids)\n public view virtual override returns (uint256[] memory)\n {\n require(_owners.length == _ids.length, "ERC1155#balanceOfBatch: INVALID_ARRAY_LENGTH");\n\n // Variables\n uint256[] memory batchBalances = new uint256[](_owners.length);\n\n // Iterate over each owner and token ID\n for (uint256 i = 0; i < _owners.length; i++) {\n batchBalances[i] = balances[_owners[i]][_ids[i]];\n }\n\n return batchBalances;\n }\n\n\n /***********************************|\n | ERC165 Functions |\n |__________________________________*/\n\n /**\n * @notice Query if a contract implements an interface\n * @param _interfaceID The interface identifier, as specified in ERC-165\n * @return `true` if the contract implements `_interfaceID` and\n */\n function supportsInterface(bytes4 _interfaceID) public view virtual override(ERC165, IERC165) returns (bool) {\n if (_interfaceID == type(IERC1155).interfaceId) {\n return true;\n }\n return super.supportsInterface(_interfaceID);\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Meta.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport "./ERC1155.sol";\nimport "../../interfaces/IERC20.sol";\nimport "../../interfaces/IERC1155.sol";\nimport "../../utils/LibBytes.sol";\nimport "../../utils/SignatureValidator.sol";\n\n\n/**\n * @dev ERC-1155 with native metatransaction methods. These additional functions allow users\n * to presign function calls and allow third parties to execute these on their behalf\n */\ncontract ERC1155Meta is ERC1155, SignatureValidator {\n using LibBytes for bytes;\n\n /***********************************|\n | Variables and Structs |\n |__________________________________*/\n\n /**\n * Gas Receipt\n * feeTokenData : (bool, address, ?unit256)\n * 1st element should be the address of the token\n * 2nd argument (if ERC-1155) should be the ID of the token\n * Last element should be a 0x0 if ERC-20 and 0x1 for ERC-1155\n */\n struct GasReceipt {\n uint256 gasFee; // Fixed cost for the tx\n uint256 gasLimitCallback; // Maximum amount of gas the callback in transfer functions can use\n address feeRecipient; // Address to send payment to\n bytes feeTokenData; // Data for token to pay for gas\n }\n\n // Which token standard is used to pay gas fee\n enum FeeTokenType {\n ERC1155, // 0x00, ERC-1155 token - DEFAULT\n ERC20, // 0x01, ERC-20 token\n NTypes // 0x02, number of signature types. Always leave at end.\n }\n\n // Signature nonce per address\n mapping (address => uint256) internal nonces;\n\n\n /***********************************|\n | Events |\n |__________________________________*/\n\n event NonceChange(address indexed signer, uint256 newNonce);\n\n\n /****************************************|\n | Public Meta Transfer Functions |\n |_______________________________________*/\n\n /**\n * @notice Allows anyone with a valid signature to transfer _amount amount of a token _id on the bahalf of _from\n * @param _from Source address\n * @param _to Target address\n * @param _id ID of the token type\n * @param _amount Transfered amount\n * @param _isGasFee Whether gas is reimbursed to executor or not\n * @param _data Encodes a meta transfer indicator, signature, gas payment receipt and extra transfer data\n * _data should be encoded as (\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType),\n * (GasReceipt g, ?bytes transferData)\n * )\n * i.e. high level encoding should be (bytes, bytes), where the latter bytes array is a nested bytes array\n */\n function metaSafeTransferFrom(\n address _from,\n address _to,\n uint256 _id,\n uint256 _amount,\n bool _isGasFee,\n bytes memory _data)\n public virtual\n {\n require(_to != address(0), "ERC1155Meta#metaSafeTransferFrom: INVALID_RECIPIENT");\n\n // Initializing\n bytes memory transferData;\n GasReceipt memory gasReceipt;\n\n // Verify signature and extract the signed data\n bytes memory signedData = _signatureValidation(\n _from,\n _data,\n abi.encode(\n META_TX_TYPEHASH,\n _from, // Address as uint256\n _to, // Address as uint256\n _id,\n _amount,\n _isGasFee ? uint256(1) : uint256(0) // Boolean as uint256\n )\n );\n\n // Transfer asset\n _safeTransferFrom(_from, _to, _id, _amount);\n\n // If Gas is being reimbursed\n if (_isGasFee) {\n (gasReceipt, transferData) = abi.decode(signedData, (GasReceipt, bytes));\n\n // We need to somewhat protect relayers against gas griefing attacks in recipient contract.\n // Hence we only pass the gasLimit to the recipient such that the relayer knows the griefing\n // limit. Nothing can prevent the receiver to revert the transaction as close to the gasLimit as\n // possible, but the relayer can now only accept meta-transaction gasLimit within a certain range.\n _callonERC1155Received(_from, _to, _id, _amount, gasReceipt.gasLimitCallback, transferData);\n\n // Transfer gas cost\n _transferGasFee(_from, gasReceipt);\n\n } else {\n _callonERC1155Received(_from, _to, _id, _amount, gasleft(), signedData);\n }\n }\n\n /**\n * @notice Allows anyone with a valid signature to transfer multiple types of tokens on the bahalf of _from\n * @param _from Source addresses\n * @param _to Target addresses\n * @param _ids IDs of each token type\n * @param _amounts Transfer amounts per token type\n * @param _isGasFee Whether gas is reimbursed to executor or not\n * @param _data Encodes a meta transfer indicator, signature, gas payment receipt and extra transfer data\n * _data should be encoded as (\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType),\n * (GasReceipt g, ?bytes transferData)\n * )\n * i.e. high level encoding should be (bytes, bytes), where the latter bytes array is a nested bytes array\n */\n function metaSafeBatchTransferFrom(\n address _from,\n address _to,\n uint256[] memory _ids,\n uint256[] memory _amounts,\n bool _isGasFee,\n bytes memory _data)\n public virtual\n {\n require(_to != address(0), "ERC1155Meta#metaSafeBatchTransferFrom: INVALID_RECIPIENT");\n\n // Initializing\n bytes memory transferData;\n GasReceipt memory gasReceipt;\n\n // Verify signature and extract the signed data\n bytes memory signedData = _signatureValidation(\n _from,\n _data,\n abi.encode(\n META_BATCH_TX_TYPEHASH,\n _from, // Address as uint256\n _to, // Address as uint256\n keccak256(abi.encodePacked(_ids)),\n keccak256(abi.encodePacked(_amounts)),\n _isGasFee ? uint256(1) : uint256(0) // Boolean as uint256\n )\n );\n\n // Transfer assets\n _safeBatchTransferFrom(_from, _to, _ids, _amounts);\n\n // If gas fee being reimbursed\n if (_isGasFee) {\n (gasReceipt, transferData) = abi.decode(signedData, (GasReceipt, bytes));\n\n // We need to somewhat protect relayers against gas griefing attacks in recipient contract.\n // Hence we only pass the gasLimit to the recipient such that the relayer knows the griefing\n // limit. Nothing can prevent the receiver to revert the transaction as close to the gasLimit as\n // possible, but the relayer can now only accept meta-transaction gasLimit within a certain range.\n _callonERC1155BatchReceived(_from, _to, _ids, _amounts, gasReceipt.gasLimitCallback, transferData);\n\n // Handle gas reimbursement\n _transferGasFee(_from, gasReceipt);\n\n } else {\n _callonERC1155BatchReceived(_from, _to, _ids, _amounts, gasleft(), signedData);\n }\n }\n\n\n /***********************************|\n | Operator Functions |\n |__________________________________*/\n\n /**\n * @notice Approve the passed address to spend on behalf of _from if valid signature is provided\n * @param _owner Address that wants to set operator status _spender\n * @param _operator Address to add to the set of authorized operators\n * @param _approved True if the operator is approved, false to revoke approval\n * @param _isGasFee Whether gas will be reimbursed or not, with vlid signature\n * @param _data Encodes signature and gas payment receipt\n * _data should be encoded as (\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType),\n * (GasReceipt g)\n * )\n * i.e. high level encoding should be (bytes, bytes), where the latter bytes array is a nested bytes array\n */\n function metaSetApprovalForAll(\n address _owner,\n address _operator,\n bool _approved,\n bool _isGasFee,\n bytes memory _data)\n public virtual\n {\n // Verify signature and extract the signed data\n bytes memory signedData = _signatureValidation(\n _owner,\n _data,\n abi.encode(\n META_APPROVAL_TYPEHASH,\n _owner, // Address as uint256\n _operator, // Address as uint256\n _approved ? uint256(1) : uint256(0), // Boolean as uint256\n _isGasFee ? uint256(1) : uint256(0) // Boolean as uint256\n )\n );\n\n // Update operator status\n operators[_owner][_operator] = _approved;\n\n // Emit event\n emit ApprovalForAll(_owner, _operator, _approved);\n\n // Handle gas reimbursement\n if (_isGasFee) {\n GasReceipt memory gasReceipt = abi.decode(signedData, (GasReceipt));\n _transferGasFee(_owner, gasReceipt);\n }\n }\n\n\n /****************************************|\n | Signature Validation Functions |\n |_______________________________________*/\n\n // keccak256(\n // "metaSafeTransferFrom(address,address,uint256,uint256,bool,bytes)"\n // );\n bytes32 internal constant META_TX_TYPEHASH = 0xce0b514b3931bdbe4d5d44e4f035afe7113767b7db71949271f6a62d9c60f558;\n\n // keccak256(\n // "metaSafeBatchTransferFrom(address,address,uint256[],uint256[],bool,bytes)"\n // );\n bytes32 internal constant META_BATCH_TX_TYPEHASH = 0xa3d4926e8cf8fe8e020cd29f514c256bc2eec62aa2337e415f1a33a4828af5a0;\n\n // keccak256(\n // "metaSetApprovalForAll(address,address,bool,bool,bytes)"\n // );\n bytes32 internal constant META_APPROVAL_TYPEHASH = 0xf5d4c820494c8595de274c7ff619bead38aac4fbc3d143b5bf956aa4b84fa524;\n\n /**\n * @notice Verifies signatures for this contract\n * @param _signer Address of signer\n * @param _sigData Encodes signature, gas payment receipt and transfer data (if any)\n * @param _encMembers Encoded EIP-712 type members (except nonce and _data), all need to be 32 bytes size\n * @dev _data should be encoded as (\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType),\n * (GasReceipt g, ?bytes transferData)\n * )\n * i.e. high level encoding should be (bytes, bytes), where the latter bytes array is a nested bytes array\n * @dev A valid nonce is a nonce that is within 100 value from the current nonce\n */\n function _signatureValidation(\n address _signer,\n bytes memory _sigData,\n bytes memory _encMembers)\n internal virtual returns (bytes memory signedData)\n {\n bytes memory sig;\n\n // Get signature and data to sign\n (sig, signedData) = abi.decode(_sigData, (bytes, bytes));\n\n // Get current nonce and nonce used for signature\n uint256 currentNonce = nonces[_signer]; // Lowest valid nonce for signer\n uint256 nonce = uint256(sig.readBytes32(65)); // Nonce passed in the signature object\n\n // Verify if nonce is valid\n require(\n (nonce >= currentNonce) && (nonce < (currentNonce + 100)),\n "ERC1155Meta#_signatureValidation: INVALID_NONCE"\n );\n\n // Take hash of bytes arrays\n bytes32 hash = hashEIP712Message(keccak256(abi.encodePacked(_encMembers, nonce, keccak256(signedData))));\n\n // Complete data to pass to signer verifier\n bytes memory fullData = abi.encodePacked(_encMembers, nonce, signedData);\n\n //Update signature nonce\n nonces[_signer] = nonce + 1;\n emit NonceChange(_signer, nonce + 1);\n\n // Verify if _from is the signer\n require(isValidSignature(_signer, hash, fullData, sig), "ERC1155Meta#_signatureValidation: INVALID_SIGNATURE");\n return signedData;\n }\n\n /**\n * @notice Returns the current nonce associated with a given address\n * @param _signer Address to query signature nonce for\n */\n function getNonce(address _signer)\n public view virtual returns (uint256 nonce)\n {\n return nonces[_signer];\n }\n\n\n /***********************************|\n | Gas Reimbursement Functions |\n |__________________________________*/\n\n /**\n * @notice Will reimburse tx.origin or fee recipient for the gas spent execution a transaction\n * Can reimbuse in any ERC-20 or ERC-1155 token\n * @param _from Address from which the payment will be made from\n * @param _g GasReceipt object that contains gas reimbursement information\n */\n function _transferGasFee(address _from, GasReceipt memory _g)\n internal virtual\n {\n // Pop last byte to get token fee type\n uint8 feeTokenTypeRaw = uint8(_g.feeTokenData.popLastByte());\n\n // Ensure valid fee token type\n require(\n feeTokenTypeRaw < uint8(FeeTokenType.NTypes),\n "ERC1155Meta#_transferGasFee: UNSUPPORTED_TOKEN"\n );\n\n // Convert to FeeTokenType corresponding value\n FeeTokenType feeTokenType = FeeTokenType(feeTokenTypeRaw);\n\n // Declarations\n address tokenAddress;\n address feeRecipient;\n uint256 tokenID;\n uint256 fee = _g.gasFee;\n\n // If receiver is 0x0, then anyone can claim, otherwise, refund addresse provided\n feeRecipient = _g.feeRecipient == address(0) ? msg.sender : _g.feeRecipient;\n\n // Fee token is ERC1155\n if (feeTokenType == FeeTokenType.ERC1155) {\n (tokenAddress, tokenID) = abi.decode(_g.feeTokenData, (address, uint256));\n\n // Fee is paid from this ERC1155 contract\n if (tokenAddress == address(this)) {\n _safeTransferFrom(_from, feeRecipient, tokenID, fee);\n\n // No need to protect against griefing since recipient (if contract) is most likely owned by the relayer\n _callonERC1155Received(_from, feeRecipient, tokenID, gasleft(), fee, "");\n\n // Fee is paid from another ERC-1155 contract\n } else {\n IERC1155(tokenAddress).safeTransferFrom(_from, feeRecipient, tokenID, fee, "");\n }\n\n // Fee token is ERC20\n } else {\n tokenAddress = abi.decode(_g.feeTokenData, (address));\n require(\n IERC20(tokenAddress).transferFrom(_from, feeRecipient, fee),\n "ERC1155Meta#_transferGasFee: ERC20_TRANSFER_FAILED"\n );\n }\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Metadata.sol': { + content: + "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\nimport '../../interfaces/IERC1155Metadata.sol';\nimport '../../utils/ERC165.sol';\n\n/**\n * @notice Contract that handles metadata related methods.\n * @dev Methods assume a deterministic generation of URI based on token IDs.\n * Methods also assume that URI uses hex representation of token IDs.\n */\ncontract ERC1155Metadata is IERC1155Metadata, ERC165 {\n // URI's default URI prefix\n string public baseURI;\n string public name;\n\n // set the initial name and base URI\n constructor(string memory _name, string memory _baseURI) {\n name = _name;\n baseURI = _baseURI;\n }\n\n /***********************************|\n | Metadata Public Functions |\n |__________________________________*/\n\n /**\n * @notice A distinct Uniform Resource Identifier (URI) for a given token.\n * @dev URIs are defined in RFC 3986.\n * URIs are assumed to be deterministically generated based on token ID\n * @return URI string\n */\n function uri(uint256 _id) public view virtual override returns (string memory) {\n return string(abi.encodePacked(baseURI, _uint2str(_id), \".json\"));\n }\n\n\n /***********************************|\n | Metadata Internal Functions |\n |__________________________________*/\n\n /**\n * @notice Will emit default URI log event for corresponding token _id\n * @param _tokenIDs Array of IDs of tokens to log default URI\n */\n function _logURIs(uint256[] memory _tokenIDs) internal virtual {\n string memory baseURL = baseURI;\n string memory tokenURI;\n\n for (uint256 i = 0; i < _tokenIDs.length; i++) {\n tokenURI = string(abi.encodePacked(baseURL, _uint2str(_tokenIDs[i]), \".json\"));\n emit URI(tokenURI, _tokenIDs[i]);\n }\n }\n\n /**\n * @notice Will update the base URL of token's URI\n * @param _newBaseMetadataURI New base URL of token's URI\n */\n function _setBaseMetadataURI(string memory _newBaseMetadataURI) internal {\n baseURI = _newBaseMetadataURI;\n }\n\n /**\n * @notice Will update the name of the contract\n * @param _newName New contract name\n */\n function _setContractName(string memory _newName) internal {\n name = _newName;\n }\n\n /**\n * @notice Query if a contract implements an interface\n * @param _interfaceID The interface identifier, as specified in ERC-165\n * @return `true` if the contract implements `_interfaceID` and\n */\n function supportsInterface(bytes4 _interfaceID) public view virtual override returns (bool) {\n if (_interfaceID == type(IERC1155Metadata).interfaceId) {\n return true;\n }\n return super.supportsInterface(_interfaceID);\n }\n\n /***********************************|\n | Utility Internal Functions |\n |__________________________________*/\n\n function _uint2str(uint _i) internal pure returns (string memory _uintAsString) {\n if (_i == 0) {\n return '0';\n }\n uint j = _i;\n uint len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint k = len;\n while (_i != 0) {\n k = k - 1;\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\n bytes1 b1 = bytes1(temp);\n bstr[k] = b1;\n _i /= 10;\n }\n return string(bstr);\n }\n}\n" + }, + 'node_modules/@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155MintBurn.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\nimport "./ERC1155.sol";\n\n\n/**\n * @dev Multi-Fungible Tokens with minting and burning methods. These methods assume\n * a parent contract to be executed as they are `internal` functions\n */\ncontract ERC1155MintBurn is ERC1155 {\n\n /****************************************|\n | Minting Functions |\n |_______________________________________*/\n\n /**\n * @notice Mint _amount of tokens of a given id\n * @param _to The address to mint tokens to\n * @param _id Token id to mint\n * @param _amount The amount to be minted\n * @param _data Data to pass if receiver is contract\n */\n function _mint(address _to, uint256 _id, uint256 _amount, bytes memory _data)\n internal virtual\n {\n // Add _amount\n balances[_to][_id] += _amount;\n\n // Emit event\n emit TransferSingle(msg.sender, address(0x0), _to, _id, _amount);\n\n // Calling onReceive method if recipient is contract\n _callonERC1155Received(address(0x0), _to, _id, _amount, gasleft(), _data);\n }\n\n /**\n * @notice Mint tokens for each ids in _ids\n * @param _to The address to mint tokens to\n * @param _ids Array of ids to mint\n * @param _amounts Array of amount of tokens to mint per id\n * @param _data Data to pass if receiver is contract\n */\n function _batchMint(address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data)\n internal virtual\n {\n require(_ids.length == _amounts.length, "ERC1155MintBurn#batchMint: INVALID_ARRAYS_LENGTH");\n\n // Number of mints to execute\n uint256 nMint = _ids.length;\n\n // Executing all minting\n for (uint256 i = 0; i < nMint; i++) {\n // Update storage balance\n balances[_to][_ids[i]] += _amounts[i];\n }\n\n // Emit batch mint event\n emit TransferBatch(msg.sender, address(0x0), _to, _ids, _amounts);\n\n // Calling onReceive method if recipient is contract\n _callonERC1155BatchReceived(address(0x0), _to, _ids, _amounts, gasleft(), _data);\n }\n\n\n /****************************************|\n | Burning Functions |\n |_______________________________________*/\n\n /**\n * @notice Burn _amount of tokens of a given token id\n * @param _from The address to burn tokens from\n * @param _id Token id to burn\n * @param _amount The amount to be burned\n */\n function _burn(address _from, uint256 _id, uint256 _amount)\n internal virtual\n {\n //Substract _amount\n balances[_from][_id] -= _amount;\n\n // Emit event\n emit TransferSingle(msg.sender, _from, address(0x0), _id, _amount);\n }\n\n /**\n * @notice Burn tokens of given token id for each (_ids[i], _amounts[i]) pair\n * @param _from The address to burn tokens from\n * @param _ids Array of token ids to burn\n * @param _amounts Array of the amount to be burned\n */\n function _batchBurn(address _from, uint256[] memory _ids, uint256[] memory _amounts)\n internal virtual\n {\n // Number of mints to execute\n uint256 nBurn = _ids.length;\n require(nBurn == _amounts.length, "ERC1155MintBurn#batchBurn: INVALID_ARRAYS_LENGTH");\n\n // Executing all minting\n for (uint256 i = 0; i < nBurn; i++) {\n // Update storage balance\n balances[_from][_ids[i]] -= _amounts[i];\n }\n\n // Emit batch mint event\n emit TransferBatch(msg.sender, _from, address(0x0), _ids, _amounts);\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/Address.sol': { + content: + 'pragma solidity ^0.8.0;\n\n/**\n * Utility library of inline functions on addresses\n */\nlibrary Address {\n\n // Default hash for EOA accounts returned by extcodehash\n bytes32 constant internal ACCOUNT_HASH = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n\n /**\n * Returns whether the target address is a contract\n * @dev This function will return false if invoked during the constructor of a contract.\n * @param _address address of the account to check\n * @return Whether the target address is a contract\n */\n function isContract(address _address) internal view returns (bool) {\n bytes32 codehash;\n\n // Currently there is no better way to check if there is a contract in an address\n // than to check the size of the code at that address or if it has a non-zero code hash or account hash\n assembly { codehash := extcodehash(_address) }\n return (codehash != 0x0 && codehash != ACCOUNT_HASH);\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/ERC165.sol': { + content: + 'pragma solidity ^0.8.0;\nimport "../interfaces/IERC165.sol";\n\nabstract contract ERC165 is IERC165 {\n /**\n * @notice Query if a contract implements an interface\n * @param _interfaceID The interface identifier, as specified in ERC-165\n * @return `true` if the contract implements `_interfaceID`\n */\n function supportsInterface(bytes4 _interfaceID) public view virtual override returns (bool) {\n return _interfaceID == this.supportsInterface.selector;\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/LibBytes.sol': { + content: + '/*\n Copyright 2018 ZeroEx Intl.\n Licensed under the Apache License, Version 2.0 (the "License");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an "AS IS" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n This is a truncated version of the original LibBytes.sol library from ZeroEx.\n*/\n\npragma solidity ^0.8.0;\n\n\nlibrary LibBytes {\n using LibBytes for bytes;\n\n /***********************************|\n | Pop Bytes Functions |\n |__________________________________*/\n\n /**\n * @dev Pops the last byte off of a byte array by modifying its length.\n * @param b Byte array that will be modified.\n * @return result The byte that was popped off.\n */\n function popLastByte(bytes memory b)\n internal\n pure\n returns (bytes1 result)\n {\n require(\n b.length > 0,\n "LibBytes#popLastByte: GREATER_THAN_ZERO_LENGTH_REQUIRED"\n );\n\n // Store last byte.\n result = b[b.length - 1];\n\n assembly {\n // Decrement length of byte array.\n let newLen := sub(mload(b), 1)\n mstore(b, newLen)\n }\n return result;\n }\n\n\n /***********************************|\n | Read Bytes Functions |\n |__________________________________*/\n\n /**\n * @dev Reads a bytes32 value from a position in a byte array.\n * @param b Byte array containing a bytes32 value.\n * @param index Index in byte array of bytes32 value.\n * @return result bytes32 value from byte array.\n */\n function readBytes32(\n bytes memory b,\n uint256 index\n )\n internal\n pure\n returns (bytes32 result)\n {\n require(\n b.length >= index + 32,\n "LibBytes#readBytes32: GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED"\n );\n\n // Arrays are prefixed by a 256 bit length parameter\n index += 32;\n\n // Read the bytes32 from array memory\n assembly {\n result := mload(add(b, index))\n }\n return result;\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/LibEIP712.sol': { + content: + '/**\n * Copyright 2018 ZeroEx Intl.\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npragma solidity ^0.8.0;\n\n\ncontract LibEIP712 {\n\n /***********************************|\n | Constants |\n |__________________________________*/\n\n // keccak256(\n // "EIP712Domain(address verifyingContract)"\n // );\n bytes32 internal constant DOMAIN_SEPARATOR_TYPEHASH = 0x035aff83d86937d35b32e04f0ddc6ff469290eef2f1b692d8a815c89404d4749;\n\n // EIP-191 Header\n string constant internal EIP191_HEADER = "\\x19\\x01";\n\n /***********************************|\n | Hashing Function |\n |__________________________________*/\n\n /**\n * @dev Calculates EIP712 encoding for a hash struct in this EIP712 Domain.\n * @param hashStruct The EIP712 hash struct.\n * @return result EIP712 hash applied to this EIP712 Domain.\n */\n function hashEIP712Message(bytes32 hashStruct)\n internal\n view\n returns (bytes32 result)\n {\n return keccak256(\n abi.encodePacked(\n EIP191_HEADER,\n keccak256(\n abi.encode(\n DOMAIN_SEPARATOR_TYPEHASH,\n address(this)\n )\n ),\n hashStruct\n ));\n }\n}\n' + }, + 'node_modules/@0xsequence/erc-1155/contracts/utils/SignatureValidator.sol': { + content: + 'pragma solidity ^0.8.0;\n\nimport "../interfaces/IERC1271Wallet.sol";\nimport "./LibBytes.sol";\nimport "./LibEIP712.sol";\n\n\n/**\n * @dev Contains logic for signature validation.\n * Signatures from wallet contracts assume ERC-1271 support (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1271.md)\n * Notes: Methods are strongly inspired by contracts in https://github.com/0xProject/0x-monorepo/blob/development/\n */\ncontract SignatureValidator is LibEIP712 {\n using LibBytes for bytes;\n\n /***********************************|\n | Variables |\n |__________________________________*/\n\n // bytes4(keccak256("isValidSignature(bytes,bytes)"))\n bytes4 constant internal ERC1271_MAGICVALUE = 0x20c13b0b;\n\n // bytes4(keccak256("isValidSignature(bytes32,bytes)"))\n bytes4 constant internal ERC1271_MAGICVALUE_BYTES32 = 0x1626ba7e;\n\n // Allowed signature types.\n enum SignatureType {\n Illegal, // 0x00, default value\n EIP712, // 0x01\n EthSign, // 0x02\n WalletBytes, // 0x03 To call isValidSignature(bytes, bytes) on wallet contract\n WalletBytes32, // 0x04 To call isValidSignature(bytes32, bytes) on wallet contract\n NSignatureTypes // 0x05, number of signature types. Always leave at end.\n }\n\n\n /***********************************|\n | Signature Functions |\n |__________________________________*/\n\n /**\n * @dev Verifies that a hash has been signed by the given signer.\n * @param _signerAddress Address that should have signed the given hash.\n * @param _hash Hash of the EIP-712 encoded data\n * @param _data Full EIP-712 data structure that was hashed and signed\n * @param _sig Proof that the hash has been signed by signer.\n * For non wallet signatures, _sig is expected to be an array tightly encoded as\n * (bytes32 r, bytes32 s, uint8 v, uint256 nonce, SignatureType sigType)\n * @return isValid True if the address recovered from the provided signature matches the input signer address.\n */\n function isValidSignature(\n address _signerAddress,\n bytes32 _hash,\n bytes memory _data,\n bytes memory _sig\n )\n public\n view\n returns (bool isValid)\n {\n require(\n _sig.length > 0,\n "SignatureValidator#isValidSignature: LENGTH_GREATER_THAN_0_REQUIRED"\n );\n\n require(\n _signerAddress != address(0x0),\n "SignatureValidator#isValidSignature: INVALID_SIGNER"\n );\n\n // Pop last byte off of signature byte array.\n uint8 signatureTypeRaw = uint8(_sig.popLastByte());\n\n // Ensure signature is supported\n require(\n signatureTypeRaw < uint8(SignatureType.NSignatureTypes),\n "SignatureValidator#isValidSignature: UNSUPPORTED_SIGNATURE"\n );\n\n // Extract signature type\n SignatureType signatureType = SignatureType(signatureTypeRaw);\n\n // Variables are not scoped in Solidity.\n uint8 v;\n bytes32 r;\n bytes32 s;\n address recovered;\n\n // Always illegal signature.\n // This is always an implicit option since a signer can create a\n // signature array with invalid type or length. We may as well make\n // it an explicit option. This aids testing and analysis. It is\n // also the initialization value for the enum type.\n if (signatureType == SignatureType.Illegal) {\n revert("SignatureValidator#isValidSignature: ILLEGAL_SIGNATURE");\n\n\n // Signature using EIP712\n } else if (signatureType == SignatureType.EIP712) {\n require(\n _sig.length == 97,\n "SignatureValidator#isValidSignature: LENGTH_97_REQUIRED"\n );\n r = _sig.readBytes32(0);\n s = _sig.readBytes32(32);\n v = uint8(_sig[64]);\n recovered = ecrecover(_hash, v, r, s);\n isValid = _signerAddress == recovered;\n return isValid;\n\n\n // Signed using web3.eth_sign() or Ethers wallet.signMessage()\n } else if (signatureType == SignatureType.EthSign) {\n require(\n _sig.length == 97,\n "SignatureValidator#isValidSignature: LENGTH_97_REQUIRED"\n );\n r = _sig.readBytes32(0);\n s = _sig.readBytes32(32);\n v = uint8(_sig[64]);\n recovered = ecrecover(\n keccak256(abi.encodePacked("\\x19Ethereum Signed Message:\\n32", _hash)),\n v,\n r,\n s\n );\n isValid = _signerAddress == recovered;\n return isValid;\n\n\n // Signature verified by wallet contract with data validation.\n } else if (signatureType == SignatureType.WalletBytes) {\n isValid = ERC1271_MAGICVALUE == IERC1271Wallet(_signerAddress).isValidSignature(_data, _sig);\n return isValid;\n\n\n // Signature verified by wallet contract without data validation.\n } else if (signatureType == SignatureType.WalletBytes32) {\n isValid = ERC1271_MAGICVALUE_BYTES32 == IERC1271Wallet(_signerAddress).isValidSignature(_hash, _sig);\n return isValid;\n }\n\n // Anything else is illegal (We do not return false because\n // the signature may actually be valid, just not in a format\n // that we currently support. In this case returning false\n // may lead the caller to incorrectly believe that the\n // signature was invalid.)\n revert("SignatureValidator#isValidSignature: UNSUPPORTED_SIGNATURE");\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/access/AccessControl.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IAccessControl.sol";\nimport "../utils/Context.sol";\nimport "../utils/Strings.sol";\nimport "../utils/introspection/ERC165.sol";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn\'t allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role\'s admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n "AccessControl: account ",\n Strings.toHexString(account),\n " is missing role ",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role\'s admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function\'s\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), "AccessControl: can only renounce roles for self");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn\'t perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``\'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/access/IAccessControl.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + 'node_modules/@openzeppelin/contracts/access/Ownable.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/Context.sol";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), "Ownable: caller is not the owner");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), "Ownable: new owner is the zero address");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.9._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/IERC2981.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/introspection/IERC165.sol";\n\n/**\n * @dev Interface for the NFT Royalty Standard.\n *\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\n *\n * _Available since v4.5._\n */\ninterface IERC2981 is IERC165 {\n /**\n * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\n * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\n */\n function royaltyInfo(uint256 tokenId, uint256 salePrice)\n external\n view\n returns (address receiver, uint256 royaltyAmount);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport "../beacon/IBeacon.sol";\nimport "../../interfaces/IERC1967.sol";\nimport "../../interfaces/draft-IERC1822.sol";\nimport "../../utils/Address.sol";\nimport "../../utils/StorageSlot.sol";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");\n } catch {\n revert("ERC1967Upgrade: new implementation is not UUPS");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), "ERC1967: new admin is the zero address");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256(\'eip1967.proxy.beacon\')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n "ERC1967: beacon implementation is not a contract"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/Proxy.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IBeacon.sol";\nimport "../../access/Ownable.sol";\nimport "../../utils/Address.sol";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n constructor(address implementation_) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract");\n _implementation = newImplementation;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + 'node_modules/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + 'node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport "../IERC20.sol";\nimport "../extensions/draft-IERC20Permit.sol";\nimport "../../../utils/Address.sol";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // \'safeIncreaseAllowance\' and \'safeDecreaseAllowance\'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n "SafeERC20: approve from non-zero to non-zero allowance"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity\'s return data size checking mechanism, since\n // we\'re implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/token/common/ERC2981.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport "../../interfaces/IERC2981.sol";\nimport "../../utils/introspection/ERC165.sol";\n\n/**\n * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.\n *\n * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for\n * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.\n *\n * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the\n * fee is specified in basis points by default.\n *\n * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See\n * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to\n * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.\n *\n * _Available since v4.5._\n */\nabstract contract ERC2981 is IERC2981, ERC165 {\n struct RoyaltyInfo {\n address receiver;\n uint96 royaltyFraction;\n }\n\n RoyaltyInfo private _defaultRoyaltyInfo;\n mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @inheritdoc IERC2981\n */\n function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {\n RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];\n\n if (royalty.receiver == address(0)) {\n royalty = _defaultRoyaltyInfo;\n }\n\n uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();\n\n return (royalty.receiver, royaltyAmount);\n }\n\n /**\n * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a\n * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an\n * override.\n */\n function _feeDenominator() internal pure virtual returns (uint96) {\n return 10000;\n }\n\n /**\n * @dev Sets the royalty information that all ids in this contract will default to.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {\n require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");\n require(receiver != address(0), "ERC2981: invalid receiver");\n\n _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Removes default royalty information.\n */\n function _deleteDefaultRoyalty() internal virtual {\n delete _defaultRoyaltyInfo;\n }\n\n /**\n * @dev Sets the royalty information for a specific token id, overriding the global default.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setTokenRoyalty(\n uint256 tokenId,\n address receiver,\n uint96 feeNumerator\n ) internal virtual {\n require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");\n require(receiver != address(0), "ERC2981: Invalid parameters");\n\n _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Resets royalty information for the token id back to the global default.\n */\n function _resetTokenRoyalty(uint256 tokenId) internal virtual {\n delete _tokenRoyaltyInfo[tokenId];\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Address.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn\'t rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity\'s `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, "Address: low-level call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, "Address: insufficient balance for call");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, "Address: low-level static call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, "Address: low-level delegate call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), "Address: call to non-contract");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn\'t, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Context.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Create2.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Create2.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as \'counterfactual interactions\'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(\n uint256 amount,\n bytes32 salt,\n bytes memory bytecode\n ) internal returns (address addr) {\n require(address(this).balance >= amount, "Create2: insufficient balance");\n require(bytecode.length != 0, "Create2: bytecode length is zero");\n /// @solidity memory-safe-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), "Create2: Failed on deploy");\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract\'s address, returns the same value as {computeAddress}.\n */\n function computeAddress(\n bytes32 salt,\n bytes32 bytecodeHash,\n address deployer\n ) internal pure returns (address addr) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40) // Get free memory pointer\n\n // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... |\n // |-------------------|---------------------------------------------------------------------------|\n // | bytecodeHash | CCCCCCCCCCCCC...CC |\n // | salt | BBBBBBBBBBBBB...BB |\n // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA |\n // | 0xFF | FF |\n // |-------------------|---------------------------------------------------------------------------|\n // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |\n // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |\n\n mstore(add(ptr, 0x40), bytecodeHash)\n mstore(add(ptr, 0x20), salt)\n mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes\n let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff\n mstore8(start, 0xff)\n addr := keccak256(start, 85)\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/StorageSlot.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Strings.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport "./math/Math.sol";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = "0123456789abcdef";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = "0";\n buffer[1] = "x";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, "Strings: hex length insufficient");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev These functions deal with verification of Merkle Tree proofs.\n *\n * The tree and the proofs can be generated using our\n * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].\n * You will find a quickstart guide in the readme.\n *\n * WARNING: You should avoid using leaf values that are 64 bytes long prior to\n * hashing, or use a hash function other than keccak256 for hashing leaves.\n * This is because the concatenation of a sorted pair of internal nodes in\n * the merkle tree could be reinterpreted as a leaf value.\n * OpenZeppelin\'s JavaScript library generates merkle trees that are safe\n * against this attack out of the box.\n */\nlibrary MerkleProof {\n /**\n * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n * defined by `root`. For this, a `proof` must be provided, containing\n * sibling hashes on the branch from the leaf to the root of the tree. Each\n * pair of leaves and each pair of pre-images are assumed to be sorted.\n */\n function verify(\n bytes32[] memory proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n return processProof(proof, leaf) == root;\n }\n\n /**\n * @dev Calldata version of {verify}\n *\n * _Available since v4.7._\n */\n function verifyCalldata(\n bytes32[] calldata proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n return processProofCalldata(proof, leaf) == root;\n }\n\n /**\n * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n * hash matches the root of the tree. When processing the proof, the pairs\n * of leafs & pre-images are assumed to be sorted.\n *\n * _Available since v4.4._\n */\n function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n computedHash = _hashPair(computedHash, proof[i]);\n }\n return computedHash;\n }\n\n /**\n * @dev Calldata version of {processProof}\n *\n * _Available since v4.7._\n */\n function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n computedHash = _hashPair(computedHash, proof[i]);\n }\n return computedHash;\n }\n\n /**\n * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by\n * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.\n *\n * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\n *\n * _Available since v4.7._\n */\n function multiProofVerify(\n bytes32[] memory proof,\n bool[] memory proofFlags,\n bytes32 root,\n bytes32[] memory leaves\n ) internal pure returns (bool) {\n return processMultiProof(proof, proofFlags, leaves) == root;\n }\n\n /**\n * @dev Calldata version of {multiProofVerify}\n *\n * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\n *\n * _Available since v4.7._\n */\n function multiProofVerifyCalldata(\n bytes32[] calldata proof,\n bool[] calldata proofFlags,\n bytes32 root,\n bytes32[] memory leaves\n ) internal pure returns (bool) {\n return processMultiProofCalldata(proof, proofFlags, leaves) == root;\n }\n\n /**\n * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction\n * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another\n * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false\n * respectively.\n *\n * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree\n * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the\n * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).\n *\n * _Available since v4.7._\n */\n function processMultiProof(\n bytes32[] memory proof,\n bool[] memory proofFlags,\n bytes32[] memory leaves\n ) internal pure returns (bytes32 merkleRoot) {\n // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by\n // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\n // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\n // the merkle tree.\n uint256 leavesLen = leaves.length;\n uint256 totalHashes = proofFlags.length;\n\n // Check proof validity.\n require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");\n\n // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using\n // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue\'s "pop".\n bytes32[] memory hashes = new bytes32[](totalHashes);\n uint256 leafPos = 0;\n uint256 hashPos = 0;\n uint256 proofPos = 0;\n // At each step, we compute the next hash using two values:\n // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we\n // get the next hash.\n // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the\n // `proof` array.\n for (uint256 i = 0; i < totalHashes; i++) {\n bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\n bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];\n hashes[i] = _hashPair(a, b);\n }\n\n if (totalHashes > 0) {\n return hashes[totalHashes - 1];\n } else if (leavesLen > 0) {\n return leaves[0];\n } else {\n return proof[0];\n }\n }\n\n /**\n * @dev Calldata version of {processMultiProof}.\n *\n * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\n *\n * _Available since v4.7._\n */\n function processMultiProofCalldata(\n bytes32[] calldata proof,\n bool[] calldata proofFlags,\n bytes32[] memory leaves\n ) internal pure returns (bytes32 merkleRoot) {\n // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by\n // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\n // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\n // the merkle tree.\n uint256 leavesLen = leaves.length;\n uint256 totalHashes = proofFlags.length;\n\n // Check proof validity.\n require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");\n\n // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using\n // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue\'s "pop".\n bytes32[] memory hashes = new bytes32[](totalHashes);\n uint256 leafPos = 0;\n uint256 hashPos = 0;\n uint256 proofPos = 0;\n // At each step, we compute the next hash using two values:\n // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we\n // get the next hash.\n // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the\n // `proof` array.\n for (uint256 i = 0; i < totalHashes; i++) {\n bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\n bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];\n hashes[i] = _hashPair(a, b);\n }\n\n if (totalHashes > 0) {\n return hashes[totalHashes - 1];\n } else if (leavesLen > 0) {\n return leaves[0];\n } else {\n return proof[0];\n }\n }\n\n function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {\n return a < b ? _efficientHash(a, b) : _efficientHash(b, a);\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IERC165.sol";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/math/Math.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + 'src/proxies/SequenceProxyFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {\r\n TransparentUpgradeableBeaconProxy,\r\n ITransparentUpgradeableBeaconProxy\r\n} from "./TransparentUpgradeableBeaconProxy.sol";\r\n\r\nimport {Create2} from "@openzeppelin/contracts/utils/Create2.sol";\r\nimport {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";\r\nimport {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";\r\n\r\n/**\r\n * An proxy factory that deploys upgradeable beacon proxies.\r\n * @dev The factory owner is able to upgrade the beacon implementation.\r\n * @dev Proxy deployers are able to override the beacon reference with their own.\r\n */\r\nabstract contract SequenceProxyFactory is Ownable {\r\n UpgradeableBeacon public beacon;\r\n\r\n /**\r\n * Initialize a Sequence Proxy Factory.\r\n * @param implementation The initial beacon implementation.\r\n * @param factoryOwner The owner of the factory.\r\n */\r\n function _initialize(address implementation, address factoryOwner) internal {\r\n beacon = new UpgradeableBeacon(implementation);\r\n Ownable._transferOwnership(factoryOwner);\r\n }\r\n\r\n /**\r\n * Deploys and initializes a new proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @param _data The initialization data.\r\n * @return proxyAddress The address of the deployed proxy.\r\n */\r\n function _createProxy(bytes32 _salt, address _proxyOwner, bytes memory _data) internal returns (address proxyAddress) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes memory bytecode = type(TransparentUpgradeableBeaconProxy).creationCode;\r\n\r\n proxyAddress = Create2.deploy(0, saltedHash, bytecode);\r\n ITransparentUpgradeableBeaconProxy(payable(proxyAddress)).initialize(_proxyOwner, address(beacon), _data);\r\n }\r\n\r\n /**\r\n * Computes the address of a proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @return proxy The expected address of the deployed proxy.\r\n */\r\n function _computeProxyAddress(bytes32 _salt, address _proxyOwner, bytes memory _data) internal view returns (address) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes32 bytecodeHash = keccak256(type(TransparentUpgradeableBeaconProxy).creationCode);\r\n\r\n return Create2.computeAddress(saltedHash, bytecodeHash);\r\n }\r\n\r\n /**\r\n * Upgrades the beacon implementation.\r\n * @param implementation The new beacon implementation.\r\n */\r\n function upgradeBeacon(address implementation) public onlyOwner {\r\n beacon.upgradeTo(implementation);\r\n }\r\n}\r\n' + }, + 'src/proxies/TransparentUpgradeableBeaconProxy.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {BeaconProxy, Proxy} from "./openzeppelin/BeaconProxy.sol";\r\nimport {TransparentUpgradeableProxy, ERC1967Proxy} from "./openzeppelin/TransparentUpgradeableProxy.sol";\r\n\r\ninterface ITransparentUpgradeableBeaconProxy {\r\n function initialize(address admin, address beacon, bytes memory data) external;\r\n}\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * @dev As the underlying proxy implementation (TransparentUpgradeableProxy) allows the admin to call the implementation,\r\n * care must be taken to avoid proxy selector collisions. Implementation selectors must not conflict with the proxy selectors.\r\n * See https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * The proxy selectors are:\r\n * - 0xcf7a1d77: initialize\r\n * - 0x3659cfe6: upgradeTo (from TransparentUpgradeableProxy)\r\n * - 0x4f1ef286: upgradeToAndCall (from TransparentUpgradeableProxy)\r\n * - 0x8f283970: changeAdmin (from TransparentUpgradeableProxy)\r\n * - 0xf851a440: admin (from TransparentUpgradeableProxy)\r\n * - 0x5c60da1b: implementation (from TransparentUpgradeableProxy)\r\n */\r\ncontract TransparentUpgradeableBeaconProxy is TransparentUpgradeableProxy, BeaconProxy {\r\n /**\r\n * Decode the initialization data from the msg.data and call the initialize function.\r\n */\r\n function _dispatchInitialize() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n (address admin, address beacon, bytes memory data) = abi.decode(msg.data[4:], (address, address, bytes));\r\n initialize(admin, beacon, data);\r\n\r\n return "";\r\n }\r\n\r\n function initialize(address admin, address beacon, bytes memory data) internal {\r\n if (_admin() != address(0)) {\r\n // Redundant call. This function can only be called when the admin is not set.\r\n revert InvalidInitialization();\r\n }\r\n _changeAdmin(admin);\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n\r\n /**\r\n * @dev If the admin is not set, the fallback function is used to initialize the proxy.\r\n * @dev If the admin is set, the fallback function is used to delegatecall the implementation.\r\n */\r\n function _fallback() internal override (TransparentUpgradeableProxy, Proxy) {\r\n if (_getAdmin() == address(0)) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableBeaconProxy.initialize.selector) {\r\n ret = _dispatchInitialize();\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n }\r\n // When the admin is not set, the fallback function is used to initialize the proxy.\r\n revert InvalidInitialization();\r\n }\r\n TransparentUpgradeableProxy._fallback();\r\n }\r\n\r\n /**\r\n * Returns the current implementation address.\r\n * @dev This is the implementation address set by the admin, or the beacon implementation.\r\n */\r\n function _implementation() internal view override (ERC1967Proxy, BeaconProxy) returns (address) {\r\n address implementation = ERC1967Proxy._implementation();\r\n if (implementation != address(0)) {\r\n return implementation;\r\n }\r\n return BeaconProxy._implementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/BeaconProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\r\n *\r\n * The beacon address is stored in storage slot `uint256(keccak256(\'eip1967.proxy.beacon\')) - 1`, so that it doesn\'t\r\n * conflict with the storage layout of the implementation behind the proxy.\r\n *\r\n * _Available since v3.4._\r\n */\r\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current beacon address.\r\n */\r\n function _beacon() internal view virtual returns (address) {\r\n return _getBeacon();\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation address of the associated beacon.\r\n */\r\n function _implementation() internal view virtual override returns (address) {\r\n return IBeacon(_getBeacon()).implementation();\r\n }\r\n\r\n /**\r\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\r\n *\r\n * If `data` is nonempty, it\'s used as data in a delegate call to the implementation returned by the beacon.\r\n *\r\n * Requirements:\r\n *\r\n * - `beacon` must be a contract.\r\n * - The implementation returned by `beacon` must be a contract.\r\n */\r\n function _setBeacon(address beacon, bytes memory data) internal virtual {\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/ERC1967Proxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\r\n * implementation address that can be changed. This address is stored in storage in the location specified by\r\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn\'t conflict with the storage layout of the\r\n * implementation behind the proxy.\r\n */\r\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current implementation address.\r\n */\r\n function _implementation() internal view virtual override returns (address impl) {\r\n return ERC1967Upgrade._getImplementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/TransparentUpgradeableProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\r\n\r\n/// @notice This implementation is a copy of OpenZeppelin\'s with the following changes:\r\n/// - Pragma updated\r\n/// - Imports updated\r\n/// - Constructor removed\r\n/// - Allows admin to call implementation\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "./ERC1967Proxy.sol";\r\n\r\n/**\r\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\r\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\r\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\r\n * include them in the ABI so this interface must be used to interact with it.\r\n */\r\ninterface ITransparentUpgradeableProxy is IERC1967 {\r\n function admin() external view returns (address);\r\n\r\n function implementation() external view returns (address);\r\n\r\n function changeAdmin(address) external;\r\n\r\n function upgradeTo(address) external;\r\n\r\n function upgradeToAndCall(address, bytes memory) external payable;\r\n}\r\n\r\n/**\r\n * @dev This contract implements a proxy that is upgradeable by an admin.\r\n *\r\n * Unlike the original OpenZeppelin implementation, this contract does not prevent the admin from calling the implementation.\r\n * This potentially exposes the admin to a proxy selector attack. See\r\n * https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * When using this contract, you must ensure that the implementation function selectors do not clash with the proxy selectors.\r\n * The proxy selectors are:\r\n * - 0x3659cfe6: upgradeTo\r\n * - 0x4f1ef286: upgradeToAndCall\r\n * - 0x8f283970: changeAdmin\r\n * - 0xf851a440: admin\r\n * - 0x5c60da1b: implementation\r\n *\r\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\r\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\r\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\r\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\r\n * implementation.\r\n *\r\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\r\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\r\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\r\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\r\n */\r\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\r\n /**\r\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\r\n *\r\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\r\n * implementation provides a function with the same selector.\r\n */\r\n modifier ifAdmin() {\r\n if (msg.sender == _getAdmin()) {\r\n _;\r\n } else {\r\n _fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\r\n */\r\n function _fallback() internal virtual override {\r\n if (msg.sender == _getAdmin()) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\r\n ret = _dispatchUpgradeTo();\r\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\r\n ret = _dispatchUpgradeToAndCall();\r\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\r\n ret = _dispatchChangeAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\r\n ret = _dispatchAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\r\n ret = _dispatchImplementation();\r\n } else {\r\n // Call implementation\r\n return super._fallback();\r\n }\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n } else {\r\n super._fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\r\n */\r\n function _dispatchAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address admin = _getAdmin();\r\n return abi.encode(admin);\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\r\n */\r\n function _dispatchImplementation() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address implementation = _implementation();\r\n return abi.encode(implementation);\r\n }\r\n\r\n /**\r\n * @dev Changes the admin of the proxy.\r\n *\r\n * Emits an {AdminChanged} event.\r\n */\r\n function _dispatchChangeAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newAdmin = abi.decode(msg.data[4:], (address));\r\n _changeAdmin(newAdmin);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy.\r\n */\r\n function _dispatchUpgradeTo() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newImplementation = abi.decode(msg.data[4:], (address));\r\n _upgradeToAndCall(newImplementation, bytes(""), false);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\r\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\r\n * proxied contract.\r\n */\r\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\r\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\r\n _upgradeToAndCall(newImplementation, data, true);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\r\n */\r\n function _admin() internal view virtual returns (address) {\r\n return _getAdmin();\r\n }\r\n\r\n /**\r\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\r\n * emulate some proxy functions being non-payable while still allowing value to pass through.\r\n */\r\n function _requireZeroValue() internal {\r\n require(msg.value == 0);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC1155/ERC1155Token.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC1155, ERC1155MintBurn} from "@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155MintBurn.sol";\r\nimport {ERC1155Meta} from "@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Meta.sol";\r\nimport {ERC1155Metadata} from "@0xsequence/erc-1155/contracts/tokens/ERC1155/ERC1155Metadata.sol";\r\nimport {ERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/ERC2981Controlled.sol";\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * A standard base implementation of ERC-1155 for use in Sequence library contracts.\r\n */\r\nabstract contract ERC1155Token is ERC1155MintBurn, ERC1155Meta, ERC1155Metadata, ERC2981Controlled {\r\n bytes32 internal constant METADATA_ADMIN_ROLE = keccak256("METADATA_ADMIN_ROLE");\r\n\r\n string private _contractURI;\r\n\r\n /**\r\n * Deploy contract.\r\n */\r\n constructor() ERC1155Metadata("", "") {}\r\n\r\n /**\r\n * Initialize the contract.\r\n * @param owner Owner address.\r\n * @param tokenName Token name.\r\n * @param tokenBaseURI Base URI for token metadata.\r\n * @param tokenContractURI Contract URI for token metadata.\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function _initialize(\r\n address owner,\r\n string memory tokenName,\r\n string memory tokenBaseURI,\r\n string memory tokenContractURI\r\n )\r\n internal\r\n {\r\n name = tokenName;\r\n baseURI = tokenBaseURI;\r\n _contractURI = tokenContractURI;\r\n\r\n _setupRole(DEFAULT_ADMIN_ROLE, owner);\r\n _setupRole(ROYALTY_ADMIN_ROLE, owner);\r\n _setupRole(METADATA_ADMIN_ROLE, owner);\r\n }\r\n\r\n //\r\n // Metadata\r\n //\r\n\r\n /**\r\n * Update the base URI of token\'s URI.\r\n * @param tokenBaseURI New base URI of token\'s URI\r\n */\r\n function setBaseMetadataURI(string memory tokenBaseURI) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _setBaseMetadataURI(tokenBaseURI);\r\n }\r\n\r\n /**\r\n * Update the name of the contract.\r\n * @param tokenName New contract name\r\n */\r\n function setContractName(string memory tokenName) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _setContractName(tokenName);\r\n }\r\n\r\n /**\r\n * Update the contract URI of token\'s URI.\r\n * @param tokenContractURI New contract URI of token\'s URI\r\n * @notice Refer to https://docs.opensea.io/docs/contract-level-metadata\r\n */\r\n function setContractURI(string memory tokenContractURI) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _contractURI = tokenContractURI;\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Get the contract URI of token\'s URI.\r\n * @return Contract URI of token\'s URI\r\n * @notice Refer to https://docs.opensea.io/docs/contract-level-metadata\r\n */\r\n function contractURI() public view returns (string memory) {\r\n return _contractURI;\r\n }\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC1155, ERC1155Metadata, ERC2981Controlled)\r\n returns (bool)\r\n {\r\n return ERC1155.supportsInterface(interfaceId) || ERC1155Metadata.supportsInterface(interfaceId)\r\n || ERC2981Controlled.supportsInterface(interfaceId) || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC1155/extensions/supply/ERC1155Supply.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC1155Token} from "@0xsequence/contracts-library/tokens/ERC1155/ERC1155Token.sol";\r\nimport {IERC1155Supply} from "@0xsequence/contracts-library/tokens/ERC1155/extensions/supply/IERC1155Supply.sol";\r\n\r\n/**\r\n * An ERC-1155 extension that tracks token supply.\r\n */\r\nabstract contract ERC1155Supply is ERC1155Token, IERC1155Supply {\r\n // Maximum supply globaly and per token. 0 indicates unlimited supply\r\n uint256 internal totalSupplyCap;\r\n mapping(uint256 => uint256) internal tokenSupplyCap;\r\n\r\n // Current supply\r\n uint256 public totalSupply;\r\n mapping(uint256 => uint256) public tokenSupply;\r\n\r\n /**\r\n * Mint _amount of tokens of a given id\r\n * @param _to The address to mint tokens to\r\n * @param _id Token id to mint\r\n * @param _amount The amount to be minted\r\n * @param _data Data to pass if receiver is contract\r\n */\r\n function _mint(address _to, uint256 _id, uint256 _amount, bytes memory _data) internal virtual override {\r\n // Check supply cap\r\n if (totalSupplyCap > 0 && totalSupply + _amount > totalSupplyCap) {\r\n revert InsufficientSupply(totalSupply, _amount, totalSupplyCap);\r\n }\r\n totalSupply += _amount;\r\n if (tokenSupplyCap[_id] > 0 && tokenSupply[_id] + _amount > tokenSupplyCap[_id]) {\r\n revert InsufficientSupply(tokenSupply[_id], _amount, tokenSupplyCap[_id]);\r\n }\r\n tokenSupply[_id] += _amount;\r\n\r\n _mint(_to, _id, _amount, _data);\r\n }\r\n\r\n /**\r\n * Mint tokens for each ids in _ids\r\n * @param _to The address to mint tokens to\r\n * @param _ids Array of ids to mint\r\n * @param _amounts Array of amount of tokens to mint per id\r\n * @param _data Data to pass if receiver is contract\r\n */\r\n function _batchMint(address _to, uint256[] memory _ids, uint256[] memory _amounts, bytes memory _data) internal virtual override {\r\n uint256 nMint = _ids.length;\r\n if (nMint != _amounts.length) {\r\n revert InvalidArrayLength();\r\n }\r\n\r\n // Executing all minting\r\n uint256 totalAmount = 0;\r\n for (uint256 i = 0; i < nMint; i++) {\r\n // Update storage balance\r\n if (tokenSupplyCap[_ids[i]] > 0 && tokenSupply[_ids[i]] + _amounts[i] > tokenSupplyCap[_ids[i]]) {\r\n revert InsufficientSupply(tokenSupply[_ids[i]], _amounts[i], tokenSupplyCap[_ids[i]]);\r\n }\r\n balances[_to][_ids[i]] += _amounts[i];\r\n tokenSupply[_ids[i]] += _amounts[i];\r\n totalAmount += _amounts[i];\r\n }\r\n if (totalSupplyCap > 0 && totalSupply + totalAmount > totalSupplyCap) {\r\n revert InsufficientSupply(totalSupply, totalAmount, totalSupplyCap);\r\n }\r\n totalSupply += totalAmount;\r\n\r\n // Emit batch mint event\r\n emit TransferBatch(msg.sender, address(0x0), _to, _ids, _amounts);\r\n\r\n // Calling onReceive method if recipient is contract\r\n _callonERC1155BatchReceived(address(0x0), _to, _ids, _amounts, gasleft(), _data);\r\n }\r\n\r\n /**\r\n * Burn _amount of tokens of a given token id\r\n * @param _from The address to burn tokens from\r\n * @param _id Token id to burn\r\n * @param _amount The amount to be burned\r\n */\r\n function _burn(address _from, uint256 _id, uint256 _amount) internal virtual override {\r\n // Supply\r\n totalSupply -= _amount;\r\n tokenSupply[_id] -= _amount;\r\n\r\n // Balances\r\n balances[_from][_id] -= _amount;\r\n\r\n // Emit event\r\n emit TransferSingle(msg.sender, _from, address(0x0), _id, _amount);\r\n }\r\n\r\n /**\r\n * Burn tokens of given token id for each (_ids[i], _amounts[i]) pair\r\n * @param _from The address to burn tokens from\r\n * @param _ids Array of token ids to burn\r\n * @param _amounts Array of the amount to be burned\r\n */\r\n function _batchBurn(address _from, uint256[] memory _ids, uint256[] memory _amounts) internal virtual override {\r\n // Number of mints to execute\r\n uint256 nBurn = _ids.length;\r\n if (nBurn != _amounts.length) {\r\n revert InvalidArrayLength();\r\n }\r\n\r\n // Executing all minting\r\n for (uint256 i = 0; i < nBurn; i++) {\r\n // Update balances\r\n balances[_from][_ids[i]] -= _amounts[i];\r\n totalSupply -= _amounts[i];\r\n tokenSupply[_ids[i]] -= _amounts[i];\r\n }\r\n\r\n // Emit batch mint event\r\n emit TransferBatch(msg.sender, _from, address(0x0), _ids, _amounts);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC1155/extensions/supply/IERC1155Supply.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC1155SupplySignals {\r\n\r\n /**\r\n * Insufficient supply of tokens.\r\n */\r\n error InsufficientSupply(uint256 currentSupply, uint256 requestedAmount, uint256 maxSupply);\r\n\r\n /**\r\n * Invalid array input length.\r\n */\r\n error InvalidArrayLength();\r\n}\r\n\r\ninterface IERC1155Supply is IERC1155SupplySignals {}\r\n' + }, + 'src/tokens/ERC1155/presets/sale/ERC1155Sale.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IERC1155Sale, IERC1155SaleFunctions} from "@0xsequence/contracts-library/tokens/ERC1155/presets/sale/IERC1155Sale.sol";\r\nimport {\r\n ERC1155Supply,\r\n ERC1155Token\r\n} from "@0xsequence/contracts-library/tokens/ERC1155/extensions/supply/ERC1155Supply.sol";\r\nimport {\r\n WithdrawControlled,\r\n AccessControl,\r\n SafeERC20,\r\n IERC20\r\n} from "@0xsequence/contracts-library/tokens/common/WithdrawControlled.sol";\r\nimport {MerkleProofSingleUse} from "@0xsequence/contracts-library/tokens/common/MerkleProofSingleUse.sol";\r\n\r\ncontract ERC1155Sale is IERC1155Sale, ERC1155Supply, WithdrawControlled, MerkleProofSingleUse {\r\n bytes32 internal constant MINT_ADMIN_ROLE = keccak256("MINT_ADMIN_ROLE");\r\n\r\n bytes4 private constant _ERC20_TRANSFERFROM_SELECTOR =\r\n bytes4(keccak256(bytes("transferFrom(address,address,uint256)")));\r\n\r\n bool private _initialized;\r\n\r\n // ERC20 token address for payment. address(0) indicated payment in ETH.\r\n address private _paymentToken;\r\n\r\n SaleDetails private _globalSaleDetails;\r\n mapping(uint256 => SaleDetails) private _tokenSaleDetails;\r\n\r\n /**\r\n * Initialize the contract.\r\n * @param owner Owner address\r\n * @param tokenName Token name\r\n * @param tokenBaseURI Base URI for token metadata\r\n * @param tokenContractURI Contract URI for token metadata\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function initialize(\r\n address owner,\r\n string memory tokenName,\r\n string memory tokenBaseURI,\r\n string memory tokenContractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n public\r\n virtual\r\n {\r\n if (_initialized) {\r\n revert InvalidInitialization();\r\n }\r\n\r\n ERC1155Token._initialize(owner, tokenName, tokenBaseURI, tokenContractURI);\r\n _setDefaultRoyalty(royaltyReceiver, royaltyFeeNumerator);\r\n\r\n _setupRole(MINT_ADMIN_ROLE, owner);\r\n _setupRole(WITHDRAW_ROLE, owner);\r\n\r\n _initialized = true;\r\n }\r\n\r\n /**\r\n * Checks if the current block.timestamp is out of the give timestamp range.\r\n * @param _startTime Earliest acceptable timestamp (inclusive).\r\n * @param _endTime Latest acceptable timestamp (exclusive).\r\n * @dev A zero endTime value is always considered out of bounds.\r\n */\r\n function blockTimeOutOfBounds(uint256 _startTime, uint256 _endTime) private view returns (bool) {\r\n // 0 end time indicates inactive sale.\r\n return _endTime == 0 || block.timestamp < _startTime || block.timestamp >= _endTime; // solhint-disable-line not-rely-on-time\r\n }\r\n\r\n /**\r\n * Checks the sale is active and takes payment.\r\n * @param _tokenIds Token IDs to mint.\r\n * @param _amounts Amounts of tokens to mint.\r\n * @param _proof Merkle proof for allowlist minting.\r\n */\r\n function _payForActiveMint(uint256[] memory _tokenIds, uint256[] memory _amounts, bytes32[] calldata _proof)\r\n private\r\n {\r\n uint256 lastTokenId;\r\n uint256 totalCost;\r\n uint256 totalAmount;\r\n\r\n SaleDetails memory gSaleDetails = _globalSaleDetails;\r\n bool globalSaleInactive = blockTimeOutOfBounds(gSaleDetails.startTime, gSaleDetails.endTime);\r\n for (uint256 i; i < _tokenIds.length; i++) {\r\n uint256 tokenId = _tokenIds[i];\r\n // Test tokenIds ordering\r\n if (i != 0 && lastTokenId >= tokenId) {\r\n revert InvalidTokenIds();\r\n }\r\n lastTokenId = tokenId;\r\n\r\n uint256 amount = _amounts[i];\r\n\r\n // Active sale test\r\n SaleDetails memory saleDetails = _tokenSaleDetails[tokenId];\r\n bool tokenSaleInactive = blockTimeOutOfBounds(saleDetails.startTime, saleDetails.endTime);\r\n if (tokenSaleInactive) {\r\n // Prefer token sale\r\n if (globalSaleInactive) {\r\n // Both sales inactive\r\n revert SaleInactive(tokenId);\r\n }\r\n // Use global sale details\r\n requireMerkleProof(gSaleDetails.merkleRoot, _proof, msg.sender);\r\n totalCost += gSaleDetails.cost * amount;\r\n } else {\r\n // Use token sale details\r\n requireMerkleProof(saleDetails.merkleRoot, _proof, msg.sender);\r\n totalCost += saleDetails.cost * amount;\r\n }\r\n totalAmount += amount;\r\n }\r\n\r\n if (_paymentToken == address(0)) {\r\n // Paid in ETH\r\n if (msg.value != totalCost) {\r\n revert InsufficientPayment(totalCost, msg.value);\r\n }\r\n } else {\r\n // Paid in ERC20\r\n SafeERC20.safeTransferFrom(IERC20(_paymentToken), msg.sender, address(this), totalCost);\r\n }\r\n }\r\n\r\n //\r\n // Minting\r\n //\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param tokenIds Token IDs to mint.\r\n * @param amounts Amounts of tokens to mint.\r\n * @param data Data to pass if receiver is contract.\r\n * @param proof Merkle proof for allowlist minting.\r\n * @notice Sale must be active for all tokens.\r\n * @dev tokenIds must be sorted ascending without duplicates.\r\n * @dev An empty proof is supplied when no proof is required.\r\n */\r\n function mint(\r\n address to,\r\n uint256[] memory tokenIds,\r\n uint256[] memory amounts,\r\n bytes memory data,\r\n bytes32[] calldata proof\r\n )\r\n public\r\n payable\r\n {\r\n _payForActiveMint(tokenIds, amounts, proof);\r\n _batchMint(to, tokenIds, amounts, data);\r\n }\r\n\r\n /**\r\n * Mint tokens as admin.\r\n * @param to Address to mint tokens to.\r\n * @param tokenIds Token IDs to mint.\r\n * @param amounts Amounts of tokens to mint.\r\n * @param data Data to pass if receiver is contract.\r\n * @notice Only callable by mint admin.\r\n */\r\n function mintAdmin(address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data)\r\n public\r\n onlyRole(MINT_ADMIN_ROLE)\r\n {\r\n _batchMint(to, tokenIds, amounts, data);\r\n }\r\n\r\n /**\r\n * Set the global sale details.\r\n * @param cost The amount of payment tokens to accept for each token minted.\r\n * @param supplyCap The maximum number of tokens that can be minted.\r\n * @param paymentTokenAddr The ERC20 token address to accept payment in. address(0) indicates ETH.\r\n * @param startTime The start time of the sale. Tokens cannot be minted before this time.\r\n * @param endTime The end time of the sale. Tokens cannot be minted after this time.\r\n * @param merkleRoot The merkle root for allowlist minting.\r\n * @dev A zero end time indicates an inactive sale.\r\n */\r\n function setGlobalSaleDetails(\r\n uint256 cost,\r\n uint256 supplyCap,\r\n address paymentTokenAddr,\r\n uint64 startTime,\r\n uint64 endTime,\r\n bytes32 merkleRoot\r\n )\r\n public\r\n onlyRole(MINT_ADMIN_ROLE)\r\n {\r\n _paymentToken = paymentTokenAddr;\r\n _globalSaleDetails = SaleDetails(cost, startTime, endTime, merkleRoot);\r\n totalSupplyCap = supplyCap;\r\n emit GlobalSaleDetailsUpdated(cost, supplyCap, startTime, endTime, merkleRoot);\r\n }\r\n\r\n /**\r\n * Set the sale details for an individual token.\r\n * @param tokenId The token ID to set the sale details for.\r\n * @param cost The amount of payment tokens to accept for each token minted.\r\n * @param supplyCap The maximum number of tokens that can be minted.\r\n * @param startTime The start time of the sale. Tokens cannot be minted before this time.\r\n * @param endTime The end time of the sale. Tokens cannot be minted after this time.\r\n * @param merkleRoot The merkle root for allowlist minting.\r\n * @dev A zero end time indicates an inactive sale.\r\n * @notice The payment token is set globally.\r\n */\r\n function setTokenSaleDetails(\r\n uint256 tokenId,\r\n uint256 cost,\r\n uint256 supplyCap,\r\n uint64 startTime,\r\n uint64 endTime,\r\n bytes32 merkleRoot\r\n )\r\n public\r\n onlyRole(MINT_ADMIN_ROLE)\r\n {\r\n _tokenSaleDetails[tokenId] = SaleDetails(cost, startTime, endTime, merkleRoot);\r\n tokenSupplyCap[tokenId] = supplyCap;\r\n emit TokenSaleDetailsUpdated(tokenId, cost, supplyCap, startTime, endTime, merkleRoot);\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Get global sales details.\r\n * @return Sale details.\r\n * @notice Global sales details apply to all tokens.\r\n * @notice Global sales details are overriden when token sale is active.\r\n */\r\n function globalSaleDetails() external view returns (SaleDetails memory) {\r\n return _globalSaleDetails;\r\n }\r\n\r\n /**\r\n * Get token sale details.\r\n * @param tokenId Token ID to get sale details for.\r\n * @return Sale details.\r\n * @notice Token sale details override global sale details.\r\n */\r\n function tokenSaleDetails(uint256 tokenId) external view returns (SaleDetails memory) {\r\n return _tokenSaleDetails[tokenId];\r\n }\r\n\r\n /**\r\n * Get payment token.\r\n * @return Payment token address.\r\n * @notice address(0) indicates payment in ETH.\r\n */\r\n function paymentToken() external view returns (address) {\r\n return _paymentToken;\r\n }\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC1155Token, AccessControl)\r\n returns (bool)\r\n {\r\n return type(IERC1155SaleFunctions).interfaceId == interfaceId || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC1155/presets/sale/ERC1155SaleFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC1155Sale} from "@0xsequence/contracts-library/tokens/ERC1155/presets/sale/ERC1155Sale.sol";\r\nimport {IERC1155SaleFactory} from "@0xsequence/contracts-library/tokens/ERC1155/presets/sale/IERC1155SaleFactory.sol";\r\nimport {SequenceProxyFactory} from "@0xsequence/contracts-library/proxies/SequenceProxyFactory.sol";\r\n\r\n/**\r\n * Deployer of ERC-1155 Sale proxies.\r\n */\r\ncontract ERC1155SaleFactory is IERC1155SaleFactory, SequenceProxyFactory {\r\n /**\r\n * Creates an ERC-1155 Sale Factory.\r\n * @param factoryOwner The owner of the ERC-1155 Sale Factory\r\n */\r\n constructor(address factoryOwner) {\r\n ERC1155Sale impl = new ERC1155Sale();\r\n SequenceProxyFactory._initialize(address(impl), factoryOwner);\r\n }\r\n\r\n /**\r\n * Creates an ERC-1155 Sale proxy contract\r\n * @param proxyOwner The owner of the ERC-1155 Sale proxy\r\n * @param tokenOwner The owner of the ERC-1155 Sale implementation\r\n * @param name The name of the ERC-1155 Sale token\r\n * @param baseURI The base URI of the ERC-1155 Sale token\r\n * @param contractURI The contract URI of the ERC-1155 Sale token\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @return proxyAddr The address of the ERC-1155 Sale Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-1155 Sale Minter functions.\r\n */\r\n function deploy(\r\n address proxyOwner,\r\n address tokenOwner,\r\n string memory name,\r\n string memory baseURI,\r\n string memory contractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n external\r\n returns (address proxyAddr)\r\n {\r\n bytes32 salt =\r\n keccak256(abi.encodePacked(tokenOwner, name, baseURI, contractURI, royaltyReceiver, royaltyFeeNumerator));\r\n proxyAddr = _createProxy(salt, proxyOwner, "");\r\n ERC1155Sale(proxyAddr).initialize(tokenOwner, name, baseURI, contractURI, royaltyReceiver, royaltyFeeNumerator);\r\n emit ERC1155SaleDeployed(proxyAddr);\r\n return proxyAddr;\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC1155/presets/sale/IERC1155Sale.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC1155SaleFunctions {\r\n\r\n struct SaleDetails {\r\n uint256 cost;\r\n uint64 startTime;\r\n uint64 endTime; // 0 end time indicates sale inactive\r\n bytes32 merkleRoot; // Root of allowed addresses\r\n }\r\n\r\n /**\r\n * Get global sales details.\r\n * @return Sale details.\r\n * @notice Global sales details apply to all tokens.\r\n * @notice Global sales details are overriden when token sale is active.\r\n */\r\n function globalSaleDetails() external returns (SaleDetails memory);\r\n\r\n /**\r\n * Get token sale details.\r\n * @param tokenId Token ID to get sale details for.\r\n * @return Sale details.\r\n * @notice Token sale details override global sale details.\r\n */\r\n function tokenSaleDetails(uint256 tokenId) external returns (SaleDetails memory);\r\n\r\n /**\r\n * Get payment token.\r\n * @return Payment token address.\r\n * @notice address(0) indicates payment in ETH.\r\n */\r\n function paymentToken() external returns (address);\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param tokenIds Token IDs to mint.\r\n * @param amounts Amounts of tokens to mint.\r\n * @param data Data to pass if receiver is contract.\r\n * @param proof Merkle proof for allowlist minting.\r\n * @notice Sale must be active for all tokens.\r\n */\r\n function mint(\r\n address to,\r\n uint256[] memory tokenIds,\r\n uint256[] memory amounts,\r\n bytes memory data,\r\n bytes32[] calldata proof\r\n )\r\n external\r\n payable;\r\n}\r\n\r\ninterface IERC1155SaleSignals {\r\n\r\n event GlobalSaleDetailsUpdated(uint256 cost, uint256 supplyCap, uint64 startTime, uint64 endTime, bytes32 merkleRoot);\r\n event TokenSaleDetailsUpdated(uint256 tokenId, uint256 cost, uint256 supplyCap, uint64 startTime, uint64 endTime, bytes32 merkleRoot);\r\n\r\n /**\r\n * Contract already initialized.\r\n */\r\n error InvalidInitialization();\r\n\r\n /**\r\n * Sale is not active globally.\r\n */\r\n error GlobalSaleInactive();\r\n\r\n /**\r\n * Sale is not active.\r\n * @param tokenId Invalid Token ID.\r\n */\r\n error SaleInactive(uint256 tokenId);\r\n\r\n /**\r\n * Insufficient tokens for payment.\r\n * @param expected Expected amount of tokens.\r\n * @param actual Actual amount of tokens.\r\n */\r\n error InsufficientPayment(uint256 expected, uint256 actual);\r\n\r\n /**\r\n * Invalid token IDs.\r\n */\r\n error InvalidTokenIds();\r\n}\r\n\r\ninterface IERC1155Sale is IERC1155SaleFunctions, IERC1155SaleSignals {}\r\n' + }, + 'src/tokens/ERC1155/presets/sale/IERC1155SaleFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC1155SaleFactoryFunctions {\r\n /**\r\n * Creates an ERC-1155 Sale proxy contract\r\n * @param proxyOwner The owner of the ERC-1155 Sale proxy\r\n * @param tokenOwner The owner of the ERC-1155 Sale implementation\r\n * @param name The name of the ERC-1155 Sale token\r\n * @param baseURI The base URI of the ERC-1155 Sale token\r\n * @param contractURI The contract URI of the ERC-1155 Sale token\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @return proxyAddr The address of the ERC-1155 Sale Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-1155 Token Sale functions.\r\n */\r\n function deploy(\r\n address proxyOwner,\r\n address tokenOwner,\r\n string memory name,\r\n string memory baseURI,\r\n string memory contractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n external\r\n returns (address proxyAddr);\r\n}\r\n\r\ninterface IERC1155SaleFactorySignals {\r\n /**\r\n * Event emitted when a new ERC-1155 Sale proxy contract is deployed.\r\n * @param proxyAddr The address of the deployed proxy.\r\n */\r\n event ERC1155SaleDeployed(address proxyAddr);\r\n}\r\n\r\ninterface IERC1155SaleFactory is IERC1155SaleFactoryFunctions, IERC1155SaleFactorySignals {}\r\n' + }, + 'src/tokens/common/ERC2981Controlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/IERC2981Controlled.sol";\r\nimport {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";\r\nimport {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";\r\n\r\n/**\r\n * An implementation of ERC-2981 that allows updates by roles.\r\n */\r\nabstract contract ERC2981Controlled is ERC2981, AccessControl, IERC2981Controlled {\r\n bytes32 internal constant ROYALTY_ADMIN_ROLE = keccak256("ROYALTY_ADMIN_ROLE");\r\n\r\n //\r\n // Royalty\r\n //\r\n\r\n /**\r\n * Sets the royalty information that all ids in this contract will default to.\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n */\r\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyRole(ROYALTY_ADMIN_ROLE) {\r\n _setDefaultRoyalty(receiver, feeNumerator);\r\n }\r\n\r\n /**\r\n * Sets the royalty information that a given token id in this contract will use.\r\n * @param tokenId The token id to set the royalty information for\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @notice This overrides the default royalty information for this token id\r\n */\r\n function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator)\r\n external\r\n onlyRole(ROYALTY_ADMIN_ROLE)\r\n {\r\n _setTokenRoyalty(tokenId, receiver, feeNumerator);\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC2981, AccessControl)\r\n returns (bool)\r\n {\r\n return ERC2981.supportsInterface(interfaceId) || AccessControl.supportsInterface(interfaceId)\r\n || type(IERC2981Controlled).interfaceId == interfaceId || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/common/IERC2981Controlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC2981ControlledFunctions {\r\n /**\r\n * Sets the royalty information that all ids in this contract will default to.\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n */\r\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external;\r\n\r\n /**\r\n * Sets the royalty information that a given token id in this contract will use.\r\n * @param tokenId The token id to set the royalty information for\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @notice This overrides the default royalty information for this token id\r\n */\r\n function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) external;\r\n}\r\n\r\ninterface IERC2981Controlled is IERC2981ControlledFunctions {}\r\n' + }, + 'src/tokens/common/IMerkleProofSingleUse.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IMerkleProofSingleUseFunctions {\r\n\r\n /**\r\n * Checks if the given merkle proof is valid.\r\n * @param root Merkle root.\r\n * @param proof Merkle proof.\r\n * @param addr Address to check.\r\n * @return True if the proof is valid and has not yet been used by {addr}.\r\n */\r\n function checkMerkleProof(bytes32 root, bytes32[] calldata proof, address addr) external view returns (bool);\r\n}\r\n\r\ninterface IMerkleProofSingleUseSignals {\r\n\r\n /**\r\n * Thrown when the merkle proof is invalid or has already been used.\r\n * @param root Merkle root.\r\n * @param proof Merkle proof.\r\n * @param addr Address to check.\r\n */\r\n error MerkleProofInvalid(bytes32 root, bytes32[] proof, address addr);\r\n\r\n}\r\n\r\ninterface IMerkleProofSingleUse is IMerkleProofSingleUseFunctions, IMerkleProofSingleUseSignals {}\r\n' + }, + 'src/tokens/common/IWithdrawControlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IWithdrawControlledFunctions {\r\n\r\n /**\r\n * Withdraws ERC20 tokens owned by this contract.\r\n * @param token The ERC20 token address.\r\n * @param to Address to withdraw to.\r\n * @param value Amount to withdraw.\r\n */\r\n function withdrawERC20(address token, address to, uint256 value) external;\r\n\r\n /**\r\n * Withdraws ETH owned by this sale contract.\r\n * @param to Address to withdraw to.\r\n * @param value Amount to withdraw.\r\n */\r\n function withdrawETH(address to, uint256 value) external;\r\n}\r\n\r\ninterface IWithdrawControlledSignals {\r\n\r\n /**\r\n * Withdraw failed error.\r\n */\r\n error WithdrawFailed();\r\n}\r\n\r\ninterface IWithdrawControlled is IWithdrawControlledFunctions, IWithdrawControlledSignals {}\r\n' + }, + 'src/tokens/common/MerkleProofSingleUse.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IMerkleProofSingleUse} from "@0xsequence/contracts-library/tokens/common/IMerkleProofSingleUse.sol";\r\nimport {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";\r\n\r\n/**\r\n * Require single use merkle proofs per address.\r\n */\r\nabstract contract MerkleProofSingleUse is IMerkleProofSingleUse {\r\n\r\n // Stores proofs used by an address\r\n mapping(address => mapping(bytes32 => bool)) private _proofUsed;\r\n\r\n /**\r\n * Requires the given merkle proof to be valid.\r\n * @param root Merkle root.\r\n * @param proof Merkle proof.\r\n * @param addr Address to check.\r\n * @notice Fails when the proof is invalid or the proof has already been claimed by this address.\r\n * @dev This function reverts on failure.\r\n */\r\n function requireMerkleProof(bytes32 root, bytes32[] calldata proof, address addr) internal {\r\n if (root != bytes32(0)) {\r\n if (!checkMerkleProof(root, proof, addr)) {\r\n revert MerkleProofInvalid(root, proof, addr);\r\n }\r\n _proofUsed[addr][root] = true;\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the given merkle proof is valid.\r\n * @param root Merkle root.\r\n * @param proof Merkle proof.\r\n * @param addr Address to check.\r\n * @return True if the proof is valid and has not yet been used by {addr}.\r\n */\r\n function checkMerkleProof(bytes32 root, bytes32[] calldata proof, address addr) public view returns (bool) {\r\n return !_proofUsed[addr][root] && MerkleProof.verify(proof, root, keccak256(abi.encodePacked(addr)));\r\n }\r\n\r\n}\r\n' + }, + 'src/tokens/common/WithdrawControlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IWithdrawControlled} from "@0xsequence/contracts-library/tokens/common/IWithdrawControlled.sol";\r\nimport {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";\r\nimport {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";\r\n\r\n/**\r\n * An abstract contract that allows ETH and ERC20 tokens stored in the contract to be withdrawn.\r\n */\r\nabstract contract WithdrawControlled is AccessControl, IWithdrawControlled {\r\n bytes32 internal constant WITHDRAW_ROLE = keccak256("WITHDRAW_ROLE");\r\n\r\n //\r\n // Withdraw\r\n //\r\n\r\n /**\r\n * Withdraws ERC20 tokens owned by this contract.\r\n * @param token The ERC20 token address.\r\n * @param to Address to withdraw to.\r\n * @param value Amount to withdraw.\r\n * @notice Only callable by an address with the withdraw role.\r\n */\r\n function withdrawERC20(address token, address to, uint256 value) public onlyRole(WITHDRAW_ROLE) {\r\n SafeERC20.safeTransfer(IERC20(token), to, value);\r\n }\r\n\r\n /**\r\n * Withdraws ETH owned by this sale contract.\r\n * @param to Address to withdraw to.\r\n * @param value Amount to withdraw.\r\n * @notice Only callable by an address with the withdraw role.\r\n */\r\n function withdrawETH(address to, uint256 value) public onlyRole(WITHDRAW_ROLE) {\r\n (bool success,) = to.call{value: value}("");\r\n if (!success) {\r\n revert WithdrawFailed();\r\n }\r\n }\r\n}\r\n' + } + }, + settings: { + evmVersion: 'paris', + libraries: {}, + metadata: { bytecodeHash: 'ipfs' }, + optimizer: { enabled: true, runs: 20000 }, + remappings: [ + ':@0xsequence/contracts-library/=src/', + ':@0xsequence/erc-1155/=node_modules/@0xsequence/erc-1155/', + ':@0xsequence/erc20-meta-token/=node_modules/@0xsequence/erc20-meta-token/', + ':@openzeppelin/=node_modules/@openzeppelin/', + ':ds-test/=lib/forge-std/lib/ds-test/src/', + ':erc721a-upgradeable/=node_modules/erc721a-upgradeable/', + ':erc721a/=node_modules/erc721a/', + ':forge-std/=lib/forge-std/src/', + ':murky/=lib/murky/src/', + ':openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/' + ], + viaIR: true, + outputSelection: { + '*': { + '*': ['evm.bytecode', 'evm.deployedBytecode', 'devdoc', 'userdoc', 'metadata', 'abi'] + } + } + } + } +} diff --git a/scripts/factories/token_library/ERC20MinterFactory.ts b/scripts/factories/token_library/ERC20MinterFactory.ts new file mode 100644 index 0000000..9400795 --- /dev/null +++ b/scripts/factories/token_library/ERC20MinterFactory.ts @@ -0,0 +1,282 @@ +import type { EtherscanVerificationRequest } from '@0xsequence/solidity-deployer' +import { ContractFactory, ethers } from 'ethers' + +// https://github.com/0xsequence/contracts-library/blob/5e0017b81cc3099e60704eaf4a50b64e79fe706c/src/tokens/ERC20/presets/minter/ERC20TokenMinterFactory.sol + +const abi = [ + { + inputs: [ + { + internalType: 'address', + name: 'factoryOwner', + type: 'address' + } + ], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'proxyAddr', + type: 'address' + } + ], + name: 'ERC20TokenMinterDeployed', + 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' + }, + { + inputs: [], + name: 'beacon', + outputs: [ + { + internalType: 'contract UpgradeableBeacon', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'proxyOwner', + type: 'address' + }, + { + internalType: 'address', + name: 'tokenOwner', + type: 'address' + }, + { internalType: 'string', name: 'name', type: 'string' }, + { internalType: 'string', name: 'symbol', type: 'string' }, + { internalType: 'uint8', name: 'decimals', type: 'uint8' } + ], + name: 'deploy', + outputs: [{ internalType: 'address', name: 'proxyAddr', type: 'address' }], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [], + name: 'owner', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'implementation', + type: 'address' + } + ], + name: 'upgradeBeacon', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + } +] + +export class ERC20MinterFactory extends ContractFactory { + constructor(signer: ethers.Signer) { + super( + abi, + '0x608034610121576001600160401b0390601f61493838819003918201601f191683019291908484118385101761010b57816020928492604096875283398101031261012157516001600160a01b0380821682036101215761005f33610126565b8251936125d494858101958187108388111761010b57612364823980600096039086f0908115610101578451916105ee808401928311848410176100ed5791848492602094611d76853916815203019085f080156100e0576100d39394501660018060a01b03196001541617600155610126565b51611c08908161016e8239f35b50505051903d90823e3d90fd5b634e487b7160e01b88526041600452602488fd5b84513d87823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b600080546001600160a01b039283166001600160a01b03198216811783559216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a356fe6040608081526004908136101561001557600080fd5b600091823560e01c806303e29ab7146103b3578381631bce4583146102e95750806359659e9014610296578063715018a6146101f65780638da5cb5b146101a15763f2fde38b1461006557600080fd5b3461019d5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019d5761009c6107e1565b906100a5610902565b73ffffffffffffffffffffffffffffffffffffffff80921692831561011a575050600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b90602060849251917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b5050346101f257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f25773ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b5080fd5b833461029357807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126102935761022d610902565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b5050346101f257817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101f25760209073ffffffffffffffffffffffffffffffffffffffff600154169051908152f35b929050346103af5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126103af576103236107e1565b61032b610902565b73ffffffffffffffffffffffffffffffffffffffff8060015416803b156103ab57859283602492865197889586947f3659cfe600000000000000000000000000000000000000000000000000000000865216908401525af19081156103a257506103925750f35b61039b90610809565b6102935780f35b513d84823e3d90fd5b8580fd5b5050fd5b50903461019d577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc9260a084360112610293576103ee6107e1565b9360249081359473ffffffffffffffffffffffffffffffffffffffff95868116928382036103ab5767ffffffffffffffff976044358981116106cf57610437903690860161088d565b6064358a81116107dd5761044e903690870161088d565b916084359b8c9560ff87168097036107d9578b5160209e8f916104fe603582858101947fffffffffffffffffffffffffffffffffffffffff000000000000000000000000809860601b1686527fff000000000000000000000000000000000000000000000000000000000000008c8c6104d0815180928c603489019101610981565b84016104e5825180938c603485019101610981565b019160f81b16603482015203601581018452018261084c565b519020918d519e8f928301928310908311176107ae578f8f908f938f60689361056695610556928489528252600154885198899687019a8b52828c60601b169087015260601b16605485015251809285850190610981565b810103604881018452018261084c565b5190208b516111eb908f61057c8382018361084c565b8282528101916109e8833980511561075157518492918df5169b8c156106f45782600154168d3b156106f0578a938c8f92948f8c9583976105fb9251998a98899788967fcf7a1d7700000000000000000000000000000000000000000000000000000000885216908601528401526060604484015260648301906109a4565b03925af180156106e6576106d3575b50893b156106cf579161066a9161065b899796959460808c519a8b998a997ff6d2ee86000000000000000000000000000000000000000000000000000000008b528a015288015260848701906109a4565b918583030160448601526109a4565b906064830152038183885af180156106c5576106b1575b50507f809bee537d8b8f0b1cf61aa9c6e6c3f216f4978e0ab86473e56ee142627282af838251848152a151908152f35b6106bb8291610809565b6102935780610681565b83513d84823e3d90fd5b8780fd5b6106df90989198610809565b963861060a565b8a513d8b823e3d90fd5b8b80fd5b505060648660198a8f8e51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152fd5b5050506064878e8b818f51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152fd5b8b8d60418c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8a80fd5b8880fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361080457565b600080fd5b67ffffffffffffffff811161081d57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761081d57604052565b81601f820112156108045780359067ffffffffffffffff821161081d57604051926108e060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116018561084c565b8284526020838301011161080457816000926020809301838601378301015290565b73ffffffffffffffffffffffffffffffffffffffff60005416330361092357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60005b8381106109945750506000910152565b8181015183820152602001610984565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6020936109e081518092818752878088019101610981565b011601019056fe60808060405234610016576111cf908161001c8239f35b600080fdfe604060808152366103825773ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000917fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000843516146100c057600484517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b6100c8611192565b60049136831161037e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261037e578235916101088361067f565b602435926101158461067f565b60443567ffffffffffffffff811161037a57610135839136908801610789565b941692156103525761014791166107e3565b803b156102cf578451907f5c60da1b000000000000000000000000000000000000000000000000000000009384835260209687848381865afa9384156102a657889461019d9189916102b2575b503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab575b610242575b8361023c6107d0565b80519101f35b8592839182525afa9182156102a65761026a9392610277575b506102646109b1565b91610a21565b5038808083818080610233565b610298919250843d861161029f575b610290818361070e565b810190610902565b903861025b565b503d610286565b61091a565b508661022e565b6102c99150863d881161029f57610290818361070e565b38610194565b60848360208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b8487517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8380fd5b73ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000907fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833516146104395760046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b610441611192565b60049236841161067b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067b5783356104808161067f565b6024359161048d8361067f565b60443567ffffffffffffffff8111610677576104ad829136908901610789565b9316931561064e576104bf91166107e3565b813b156105ca576040517f5c60da1b000000000000000000000000000000000000000000000000000000009283825260209586838281855afa9283156102a65787936105149188916105b357503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905560405194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab57610242578361023c6107d0565b6102c99150853d871161029f57610290818361070e565b6084846020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b856040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8280fd5b73ffffffffffffffffffffffffffffffffffffffff81160361069d57565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff8211176106ed57604052565b6106a2565b6040810190811067ffffffffffffffff8211176106ed57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106ed57604052565b67ffffffffffffffff81116106ed57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f8201121561069d578035906107a08261074f565b926107ae604051948561070e565b8284526020838301011161069d57816000926020809301838601378301015290565b604051906107dd826106d1565b60008252565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61039081547f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f604080519373ffffffffffffffffffffffffffffffffffffffff9081851686521693846020820152a1811561087e577fffffffffffffffffffffffff000000000000000000000000000000000000000016179055565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b9081602091031261069d57516109178161067f565b90565b6040513d6000823e3d90fd5b1561092d57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201527f73206e6f74206120636f6e7472616374000000000000000000000000000000006064820152fd5b604051906060820182811067ffffffffffffffff8211176106ed57604052602782527f206661696c6564000000000000000000000000000000000000000000000000006040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6000806109179493602081519101845af43d15610a60573d91610a438361074f565b92610a51604051948561070e565b83523d6000602085013e610acd565b606091610acd565b15610a6f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b91929015610aed5750815115610ae1575090565b610917903b1515610a68565b825190915015610b005750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b848110610b7d575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201610b3c565b610bee610bd57fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b3303610d14576000357fffffffff00000000000000000000000000000000000000000000000000000000167f3659cfe6000000000000000000000000000000000000000000000000000000008103610c515750610c49610f0f565b602081519101f35b7f4f1ef286000000000000000000000000000000000000000000000000000000008103610c865750610c81611083565b610c49565b7f8f283970000000000000000000000000000000000000000000000000000000008103610cb65750610c81610ec5565b7ff851a440000000000000000000000000000000000000000000000000000000008103610ce65750610c81610dfd565b7f5c60da1b0000000000000000000000000000000000000000000000000000000003610d1457610c81610e53565b610d1c610d3b565b6000808092368280378136915af43d82803e15610d37573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541680610df8575060206004917fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505416604051928380927f5c60da1b0000000000000000000000000000000000000000000000000000000082525afa9081156102a657600091610de0575090565b610917915060203d811161029f57610290818361070e565b905090565b610e05611192565b73ffffffffffffffffffffffffffffffffffffffff7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103541660405190602082015260208152610917816106f2565b610e5b611192565b610e63610d3b565b73ffffffffffffffffffffffffffffffffffffffff6040519116602082015260208152610917816106f2565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc602091011261069d576004356109178161067f565b610ecd611192565b3660041161069d57610efc73ffffffffffffffffffffffffffffffffffffffff610ef636610e8f565b166107e3565b604051610f08816106d1565b6000815290565b610f17611192565b3660041161069d5773ffffffffffffffffffffffffffffffffffffffff610f3d36610e8f565b1660405190610f4b826106d1565b60008252803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2815115801590610ff7575b610fe3575b5050604051610f08816106d1565b610fef916102646109b1565b503880610fd5565b506000610fd0565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152fd5b3660041161069d5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261069d576004356110c18161067f565b60243567ffffffffffffffff811161069d576110f673ffffffffffffffffffffffffffffffffffffffff913690600401610789565b9116803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061118a57610fe3575050604051610f08816106d1565b506001610fd0565b3461069d5756fea264697066735822122019f840d2ec21d6e6c6d650eef546ce8fd590e6d8042a04516b47dd55a17345c664736f6c63430008130033a26469706673582212207dfb014dfb16b10f5845469d08971fb4f276d9f237d7742a824378782a929dfb64736f6c6343000813003360803461011a57601f6105ee38819003918201601f19168301916001600160401b0383118484101761011f5780849260209460405283398101031261011a57516001600160a01b03808216919082820361011a576000549160018060a01b0319923384821617600055604051923391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a33b156100b2575060015416176001556040516104b890816101368239f35b62461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b6000803560e01c80633659cfe6146102ce5780635c60da1b1461027c578063715018a6146101e05780638da5cb5b1461018f5763f2fde38b1461005457600080fd5b3461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610188576100ad610403565b8115610104578254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b80fd5b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57610217610403565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff81169081810361018857610328610403565b3b1561037f57807fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8280a280f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff60005416330361042457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea2646970667358221220dc365b16a2b6643d361d2ca2ef711f783ae4b4503a5f52631ea9ce48e88aa6da64736f6c6343000813003360c060405234620002f85762000014620002fd565b6200001e620002fd565b8151906001600160401b0390818311620001f8576003908154906001948583811c9316968715620002ed575b60209788851014620002d7578190601f9485811162000281575b5088908583116001146200021a576000926200020e575b505060001982861b1c191690861b1783555b8051938411620001f85760049586548681811c91168015620001ed575b82821014620001d8578381116200018d575b50809285116001146200011f575093839491849260009562000113575b50501b92600019911b1c19161790555b336080523360a0526040516122b29081620003228239608051816101b7015260a051816101860152f35b015193503880620000d9565b92919084601f1981168860005285600020956000905b8983831062000172575050501062000157575b50505050811b019055620000e9565b01519060f884600019921b161c191690553880808062000148565b85870151895590970196948501948893509081019062000135565b87600052816000208480880160051c820192848910620001ce575b0160051c019087905b828110620001c1575050620000bc565b60008155018790620001b1565b92508192620001a8565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000aa565b634e487b7160e01b600052604160045260246000fd5b0151905038806200007b565b90889350601f19831691876000528a6000209260005b8c8282106200026a575050841162000251575b505050811b0183556200008d565b015160001983881b60f8161c1916905538808062000243565b8385015186558c9790950194938401930162000230565b90915085600052886000208580850160051c8201928b8610620002cd575b918a91869594930160051c01915b828110620002bd57505062000064565b600081558594508a9101620002ad565b925081926200029f565b634e487b7160e01b600052602260045260246000fd5b92607f16926200004a565b600080fd5b60405190602082016001600160401b03811183821017620001f8576040526000825256fe608060408181526004908136101561001657600080fd5b600092833560e01c90816301ffc9a71461166b5750806306fdde03146115c1578063095ea7b31461159757806318160ddd1461157857806323b872dd14611486578063248a9ca31461145b5780632f2ff15d14611385578063313ce5671461136357806336568abe1461129c578063395093511461124057806340c10f191461101e5780635a44621514610a2f57806370a08231146109ec57806391d148541461099957806395d89b411461089a578063a217fddf1461087f578063a457c2d714610798578063a9059cbb14610767578063d547741f1461072a578063dd62ed3e146106d05763f6d2ee861461010b57600080fd5b346106cc5760806003193601126106cc57610124611774565b67ffffffffffffffff926024358481116106c857610145903690830161184b565b936044358181116106c45761015d903690840161184b565b946064359560ff87168097036106c05773ffffffffffffffffffffffffffffffffffffffff93847f00000000000000000000000000000000000000000000000000000000000000001633148015906106b1575b61067b57847f00000000000000000000000000000000000000000000000000000000000000001633148015906106a2575b61067b57825184811161064f57806101fa600654612109565b94601f958681116105e3575b50602090868311600114610544578c92610539575b50506000198260011b9260031b1c1916176006555b815193841161050d5750908291610248600754612109565b82811161049e575b5060209183116001146103ff5788926103f4575b50506000198260011b9260031b1c1916176007555b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009060089482865416178555858052600560205283862092169182865260205260ff8386205416156103ab575b6101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff8554161784557f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a692838652600560205280862083875260205260ff81872054161561035f575b84547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff16620100001785558580f35b600190848752600560205280872084885260205286209182541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8580a438808080610330565b84805260056020528285208286526020528285206001828254161790553382867f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a46102c6565b015190503880610264565b600789527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016895b818110610486575090846001959493921061046d575b505050811b01600755610279565b015160001960f88460031b161c1916905538808061045f565b92936020600181928786015181550195019301610449565b90919250600789527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888380860160051c82019260208710610504575b94869594939291940160051c01905b8181106104f65750610250565b8a81558594506001016104e9565b925081926104da565b8860416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b01519050388061021b565b60068d527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168d5b8181106105cb57509084600195949392106105b2575b505050811b01600655610230565b015160001960f88460031b161c191690553880806105a4565b9293602060018192878601518155019501930161058e565b90915060068c527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f8680850160051c82019260208610610646575b9085949392910160051c01905b8181106106385750610206565b8d815584935060010161062b565b9250819261061e565b60248a6041847f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b86517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b5060ff60085460081c166101e1565b5060ff60085460101c166101b0565b8780fd5b8680fd5b8580fd5b8280fd5b838234610726578060031936011261072657806020926106ee611774565b6106f661179c565b73ffffffffffffffffffffffffffffffffffffffff91821683526001865283832091168252845220549051908152f35b5080fd5b50346106cc57806003193601126106cc57610764913561075f600161074d61179c565b938387526005602052862001546118c0565b611aff565b80f35b838234610726578060031936011261072657602090610791610787611774565b6024359033611bdd565b5160018152f35b50913461087c578260031936011261087c576107b2611774565b918360243592338152600160205281812073ffffffffffffffffffffffffffffffffffffffff861682526020522054908282106107f9576020856107918585038733611dec565b60849060208651917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152fd5b80fd5b83823461072657816003193601126107265751908152602090f35b838234610726578160031936011261072657805190826007546108bc81612109565b8085529160019180831690811561095357506001146108f6575b5050506108e8826108f294038361180a565b519182918261172a565b0390f35b9450600785527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6885b82861061093b575050506108e88260206108f295820101946108d6565b8054602087870181019190915290950194810161091e565b6108f29750869350602092506108e89491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b820101946108d6565b5090346106cc57816003193601126106cc578160209360ff926109ba61179c565b903582526005865273ffffffffffffffffffffffffffffffffffffffff83832091168252855220541690519015158152f35b838234610726576020600319360112610726578060209273ffffffffffffffffffffffffffffffffffffffff610a20611774565b16815280845220549051908152f35b5082903461072657806003193601126107265767ffffffffffffffff90833582811161101a57610a62903690860161184b565b90602480358481116106c857610a7b903690880161184b565b9585805260209260058452808720338852845260ff818820541615610da457508351858111610d795780610ab0600654612109565b95601f96878111610d0e575b508590878311600114610c6f578992610c64575b50506000198260011b9260031b1c1916176006555b8651948511610c3a575050610afb600754612109565b828111610bdb575b5080918311600114610b3c57508293829392610b31575b50506000198260011b9260031b1c19161760075580f35b015190508380610b1a565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0831694600785527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6889285905b878210610bc3575050836001959610610baa575b505050811b0160075580f35b015160001960f88460031b161c19169055838080610b9e565b80600185968294968601518155019501930190610b8a565b600785527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6888380860160051c820192848710610c31575b0160051c01905b818110610c265750610b03565b858155600101610c19565b92508192610c12565b604186917f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b015190508980610ad0565b60068a527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168a5b88828210610cf8575050908460019594939210610cdf575b505050811b01600655610ae5565b015160001960f88460031b161c19169055898080610cd1565b6001859682939686015181550195019301610cb9565b909150600689527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f8780850160051c820192888610610d70575b9085949392910160051c01905b818110610d625750610abc565b8a8155849350600101610d55565b92508192610d48565b50604186917f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b91868491610db133611fa1565b85519183610dbe846117bf565b60428452858401946060368737845115610fef5760308653845190600191821015610fc45790607860218701536041915b818311610f1c57505050610ec15750610ebd938693610e8f93610e80604894610e4b9a519a857f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008d978801528251928391603789019101611707565b8401917f206973206d697373696e6720726f6c6520000000000000000000000000000000603784015251809386840190611707565b0103602881018752018561180a565b519283927f08c379a0000000000000000000000000000000000000000000000000000000008452830161172a565b0390fd5b925050508160649451937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015610f99577f3031323334353637383961626364656600000000000000000000000000000000901a610f598589611f61565b53891c928015610f6e57600019019190610def565b848260118c7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b858360328d7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8060328a7f4e487b710000000000000000000000000000000000000000000000000000000087945252fd5b90506032877f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8380fd5b5090346106cc57816003193601126106cc57611038611774565b906024928335917f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a69384875260209460058652838820338952865260ff848920541615611144575073ffffffffffffffffffffffffffffffffffffffff169485156110ea575050918185936110d07fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef94600254611ba1565b60025585855284835280852082815401905551908152a380f35b601f908560649451937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b85915086889161115333611fa1565b9091865192611161846117bf565b60428452858401946060368737845115610fef5760308653845190600191821015610fc45790607860218701536041915b8183116111ee57505050610ec15750610ebd938693610e8f93610e80604894610e4b9a519a857f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008d978801528251928391603789019101611707565b909192600f81166010811015610f99577f3031323334353637383961626364656600000000000000000000000000000000901a61122b8589611f61565b53891c928015610f6e57600019019190611192565b838234610726578060031936011261072657610791602092611295611263611774565b913381526001865284812073ffffffffffffffffffffffffffffffffffffffff84168252865284602435912054611ba1565b9033611dec565b509190346107265782600319360112610726576112b761179c565b903373ffffffffffffffffffffffffffffffffffffffff8316036112e057906107649135611aff565b60849060208551917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b83823461072657816003193601126107265760209060ff600854169051908152f35b5090346106cc57816003193601126106cc5735906113a161179c565b9082845260056020526113b9600182862001546118c0565b828452600560205273ffffffffffffffffffffffffffffffffffffffff81852092169182855260205260ff8185205416156113f2578380f35b8284526005602052808420828552602052832060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a43880808380f35b5090346106cc5760206003193601126106cc5781602093600192358152600585522001549051908152f35b50919034610726576060600319360112610726576114a2611774565b6114aa61179c565b91846044359473ffffffffffffffffffffffffffffffffffffffff84168152600160205281812033825260205220549060001982036114f2575b602086610791878787611bdd565b84821061151b57509183916115106020969561079195033383611dec565b9193948193506114e4565b60649060208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b8382346107265781600319360112610726576020906002549051908152f35b8382346107265780600319360112610726576020906107916115b7611774565b6024359033611dec565b838234610726578160031936011261072657805190826006546115e381612109565b80855291600191808316908115610953575060011461160e575050506108e8826108f294038361180a565b9450600685527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f5b828610611653575050506108e88260206108f295820101946108d6565b80546020878701810191909152909501948101611636565b849084346106cc5760206003193601126106cc57357fffffffff00000000000000000000000000000000000000000000000000000000811680820361101a57602093507f1a856d0c00000000000000000000000000000000000000000000000000000000149081156116f6575b81156116e6575b5015158152f35b6116f0915061215c565b836116df565b90506117018161215c565b906116d8565b60005b83811061171a5750506000910152565b818101518382015260200161170a565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6040936020845261176d8151809281602088015260208888019101611707565b0116010190565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361179757565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361179757565b6080810190811067ffffffffffffffff8211176117db57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176117db57604052565b81601f820112156117975780359067ffffffffffffffff82116117db576040519261189e60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116018561180a565b8284526020838301011161179757816000926020809301838601378301015290565b600081815260209060058252604092838220338352835260ff8483205416156118e95750505050565b6118f233611fa1565b8451916118fe836117bf565b60428352848301936060368637835115611ad25760308553835190600191821015611ad25790607860218601536041915b818311611a25575050506119c957610e4b9385936119999361198a604894610ebd995198857f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008b978801528251928391603789019101611707565b0103602881018552018361180a565b519182917f08c379a00000000000000000000000000000000000000000000000000000000083526004830161172a565b6064848651907f08c379a000000000000000000000000000000000000000000000000000000000825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015611aa5577f3031323334353637383961626364656600000000000000000000000000000000901a611a628588611f61565b5360041c928015611a785760001901919061192f565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526032600452fd5b90600091808352600560205273ffffffffffffffffffffffffffffffffffffffff6040842092169182845260205260ff604084205416611b3e57505050565b808352600560205260408320828452602052604083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b91908201809211611bae57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff809116918215611d685716918215611ce457600082815280602052604081205491808310611c6057604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff809116918215611ede5716918215611e5a5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b60846040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b908151811015611f72570160200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b604051906060820182811067ffffffffffffffff8211176117db57604052602a8252602082016040368237825115611f7257603090538151600190811015611f7257607860218401536029905b80821161205c575050611ffe5790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f811660108110156120db577f3031323334353637383961626364656600000000000000000000000000000000901a6120988486611f61565b5360041c9180156120ad576000190190611fee565b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b602460007f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b90600182811c92168015612152575b602083101461212357565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691612118565b7fffffffff000000000000000000000000000000000000000000000000000000008116907f36372b070000000000000000000000000000000000000000000000000000000082149182156121db575b5081156121ca575b81156121bd575090565b6121c79150612205565b90565b90506121d581612205565b906121b3565b7fa219a02500000000000000000000000000000000000000000000000000000000149150386121ab565b7fffffffff00000000000000000000000000000000000000000000000000000000167f7965db0b000000000000000000000000000000000000000000000000000000008114908115612255575090565b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150149056fea2646970667358221220e6492a8c60418e73d24c98e53ebfc98f80e8c843aad807636d82d4b8227b595c64736f6c63430008130033', + signer + ) + } +} + +export const ERC20MINTERFACTORY_VERIFICATION: Omit = { + contractToVerify: 'src/tokens/ERC20/presets/minter/ERC20TokenMinterFactory.sol:ERC20TokenMinterFactory', + version: 'v0.8.19+commit.7dd6d404', + compilerInput: { + language: 'Solidity', + sources: { + 'node_modules/@openzeppelin/contracts/access/AccessControl.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IAccessControl.sol";\nimport "../utils/Context.sol";\nimport "../utils/Strings.sol";\nimport "../utils/introspection/ERC165.sol";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn\'t allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role\'s admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n "AccessControl: account ",\n Strings.toHexString(account),\n " is missing role ",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role\'s admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function\'s\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), "AccessControl: can only renounce roles for self");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn\'t perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``\'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/access/IAccessControl.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + 'node_modules/@openzeppelin/contracts/access/Ownable.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/Context.sol";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), "Ownable: caller is not the owner");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), "Ownable: new owner is the zero address");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.9._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport "../beacon/IBeacon.sol";\nimport "../../interfaces/IERC1967.sol";\nimport "../../interfaces/draft-IERC1822.sol";\nimport "../../utils/Address.sol";\nimport "../../utils/StorageSlot.sol";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");\n } catch {\n revert("ERC1967Upgrade: new implementation is not UUPS");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), "ERC1967: new admin is the zero address");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256(\'eip1967.proxy.beacon\')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n "ERC1967: beacon implementation is not a contract"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/Proxy.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IBeacon.sol";\nimport "../../access/Ownable.sol";\nimport "../../utils/Address.sol";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n constructor(address implementation_) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract");\n _implementation = newImplementation;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IERC20.sol";\nimport "./extensions/IERC20Metadata.sol";\nimport "../../utils/Context.sol";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn\'t required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``\'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), "ERC20: transfer from the zero address");\n require(to != address(0), "ERC20: transfer to the zero address");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), "ERC20: mint to the zero address");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), "ERC20: burn from the zero address");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, "ERC20: burn amount exceeds balance");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), "ERC20: approve from the zero address");\n require(spender != address(0), "ERC20: approve to the zero address");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, "ERC20: insufficient allowance");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``\'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``\'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``\'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``\'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n' + }, + 'node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + 'node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport "../IERC20.sol";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Address.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn\'t rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity\'s `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, "Address: low-level call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, "Address: insufficient balance for call");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, "Address: low-level static call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, "Address: low-level delegate call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), "Address: call to non-contract");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn\'t, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Context.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Create2.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Create2.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as \'counterfactual interactions\'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(\n uint256 amount,\n bytes32 salt,\n bytes memory bytecode\n ) internal returns (address addr) {\n require(address(this).balance >= amount, "Create2: insufficient balance");\n require(bytecode.length != 0, "Create2: bytecode length is zero");\n /// @solidity memory-safe-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), "Create2: Failed on deploy");\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract\'s address, returns the same value as {computeAddress}.\n */\n function computeAddress(\n bytes32 salt,\n bytes32 bytecodeHash,\n address deployer\n ) internal pure returns (address addr) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40) // Get free memory pointer\n\n // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... |\n // |-------------------|---------------------------------------------------------------------------|\n // | bytecodeHash | CCCCCCCCCCCCC...CC |\n // | salt | BBBBBBBBBBBBB...BB |\n // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA |\n // | 0xFF | FF |\n // |-------------------|---------------------------------------------------------------------------|\n // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |\n // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |\n\n mstore(add(ptr, 0x40), bytecodeHash)\n mstore(add(ptr, 0x20), salt)\n mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes\n let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff\n mstore8(start, 0xff)\n addr := keccak256(start, 85)\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/StorageSlot.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Strings.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport "./math/Math.sol";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = "0123456789abcdef";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = "0";\n buffer[1] = "x";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, "Strings: hex length insufficient");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IERC165.sol";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/math/Math.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + 'src/proxies/SequenceProxyFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {\r\n TransparentUpgradeableBeaconProxy,\r\n ITransparentUpgradeableBeaconProxy\r\n} from "./TransparentUpgradeableBeaconProxy.sol";\r\n\r\nimport {Create2} from "@openzeppelin/contracts/utils/Create2.sol";\r\nimport {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";\r\nimport {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";\r\n\r\n/**\r\n * An proxy factory that deploys upgradeable beacon proxies.\r\n * @dev The factory owner is able to upgrade the beacon implementation.\r\n * @dev Proxy deployers are able to override the beacon reference with their own.\r\n */\r\nabstract contract SequenceProxyFactory is Ownable {\r\n UpgradeableBeacon public beacon;\r\n\r\n /**\r\n * Initialize a Sequence Proxy Factory.\r\n * @param implementation The initial beacon implementation.\r\n * @param factoryOwner The owner of the factory.\r\n */\r\n function _initialize(address implementation, address factoryOwner) internal {\r\n beacon = new UpgradeableBeacon(implementation);\r\n Ownable._transferOwnership(factoryOwner);\r\n }\r\n\r\n /**\r\n * Deploys and initializes a new proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @param _data The initialization data.\r\n * @return proxyAddress The address of the deployed proxy.\r\n */\r\n function _createProxy(bytes32 _salt, address _proxyOwner, bytes memory _data) internal returns (address proxyAddress) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes memory bytecode = type(TransparentUpgradeableBeaconProxy).creationCode;\r\n\r\n proxyAddress = Create2.deploy(0, saltedHash, bytecode);\r\n ITransparentUpgradeableBeaconProxy(payable(proxyAddress)).initialize(_proxyOwner, address(beacon), _data);\r\n }\r\n\r\n /**\r\n * Computes the address of a proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @return proxy The expected address of the deployed proxy.\r\n */\r\n function _computeProxyAddress(bytes32 _salt, address _proxyOwner, bytes memory _data) internal view returns (address) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes32 bytecodeHash = keccak256(type(TransparentUpgradeableBeaconProxy).creationCode);\r\n\r\n return Create2.computeAddress(saltedHash, bytecodeHash);\r\n }\r\n\r\n /**\r\n * Upgrades the beacon implementation.\r\n * @param implementation The new beacon implementation.\r\n */\r\n function upgradeBeacon(address implementation) public onlyOwner {\r\n beacon.upgradeTo(implementation);\r\n }\r\n}\r\n' + }, + 'src/proxies/TransparentUpgradeableBeaconProxy.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {BeaconProxy, Proxy} from "./openzeppelin/BeaconProxy.sol";\r\nimport {TransparentUpgradeableProxy, ERC1967Proxy} from "./openzeppelin/TransparentUpgradeableProxy.sol";\r\n\r\ninterface ITransparentUpgradeableBeaconProxy {\r\n function initialize(address admin, address beacon, bytes memory data) external;\r\n}\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * @dev As the underlying proxy implementation (TransparentUpgradeableProxy) allows the admin to call the implementation,\r\n * care must be taken to avoid proxy selector collisions. Implementation selectors must not conflict with the proxy selectors.\r\n * See https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * The proxy selectors are:\r\n * - 0xcf7a1d77: initialize\r\n * - 0x3659cfe6: upgradeTo (from TransparentUpgradeableProxy)\r\n * - 0x4f1ef286: upgradeToAndCall (from TransparentUpgradeableProxy)\r\n * - 0x8f283970: changeAdmin (from TransparentUpgradeableProxy)\r\n * - 0xf851a440: admin (from TransparentUpgradeableProxy)\r\n * - 0x5c60da1b: implementation (from TransparentUpgradeableProxy)\r\n */\r\ncontract TransparentUpgradeableBeaconProxy is TransparentUpgradeableProxy, BeaconProxy {\r\n /**\r\n * Decode the initialization data from the msg.data and call the initialize function.\r\n */\r\n function _dispatchInitialize() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n (address admin, address beacon, bytes memory data) = abi.decode(msg.data[4:], (address, address, bytes));\r\n initialize(admin, beacon, data);\r\n\r\n return "";\r\n }\r\n\r\n function initialize(address admin, address beacon, bytes memory data) internal {\r\n if (_admin() != address(0)) {\r\n // Redundant call. This function can only be called when the admin is not set.\r\n revert InvalidInitialization();\r\n }\r\n _changeAdmin(admin);\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n\r\n /**\r\n * @dev If the admin is not set, the fallback function is used to initialize the proxy.\r\n * @dev If the admin is set, the fallback function is used to delegatecall the implementation.\r\n */\r\n function _fallback() internal override (TransparentUpgradeableProxy, Proxy) {\r\n if (_getAdmin() == address(0)) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableBeaconProxy.initialize.selector) {\r\n ret = _dispatchInitialize();\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n }\r\n // When the admin is not set, the fallback function is used to initialize the proxy.\r\n revert InvalidInitialization();\r\n }\r\n TransparentUpgradeableProxy._fallback();\r\n }\r\n\r\n /**\r\n * Returns the current implementation address.\r\n * @dev This is the implementation address set by the admin, or the beacon implementation.\r\n */\r\n function _implementation() internal view override (ERC1967Proxy, BeaconProxy) returns (address) {\r\n address implementation = ERC1967Proxy._implementation();\r\n if (implementation != address(0)) {\r\n return implementation;\r\n }\r\n return BeaconProxy._implementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/BeaconProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\r\n *\r\n * The beacon address is stored in storage slot `uint256(keccak256(\'eip1967.proxy.beacon\')) - 1`, so that it doesn\'t\r\n * conflict with the storage layout of the implementation behind the proxy.\r\n *\r\n * _Available since v3.4._\r\n */\r\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current beacon address.\r\n */\r\n function _beacon() internal view virtual returns (address) {\r\n return _getBeacon();\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation address of the associated beacon.\r\n */\r\n function _implementation() internal view virtual override returns (address) {\r\n return IBeacon(_getBeacon()).implementation();\r\n }\r\n\r\n /**\r\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\r\n *\r\n * If `data` is nonempty, it\'s used as data in a delegate call to the implementation returned by the beacon.\r\n *\r\n * Requirements:\r\n *\r\n * - `beacon` must be a contract.\r\n * - The implementation returned by `beacon` must be a contract.\r\n */\r\n function _setBeacon(address beacon, bytes memory data) internal virtual {\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/ERC1967Proxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\r\n * implementation address that can be changed. This address is stored in storage in the location specified by\r\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn\'t conflict with the storage layout of the\r\n * implementation behind the proxy.\r\n */\r\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current implementation address.\r\n */\r\n function _implementation() internal view virtual override returns (address impl) {\r\n return ERC1967Upgrade._getImplementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/TransparentUpgradeableProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\r\n\r\n/// @notice This implementation is a copy of OpenZeppelin\'s with the following changes:\r\n/// - Pragma updated\r\n/// - Imports updated\r\n/// - Constructor removed\r\n/// - Allows admin to call implementation\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "./ERC1967Proxy.sol";\r\n\r\n/**\r\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\r\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\r\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\r\n * include them in the ABI so this interface must be used to interact with it.\r\n */\r\ninterface ITransparentUpgradeableProxy is IERC1967 {\r\n function admin() external view returns (address);\r\n\r\n function implementation() external view returns (address);\r\n\r\n function changeAdmin(address) external;\r\n\r\n function upgradeTo(address) external;\r\n\r\n function upgradeToAndCall(address, bytes memory) external payable;\r\n}\r\n\r\n/**\r\n * @dev This contract implements a proxy that is upgradeable by an admin.\r\n *\r\n * Unlike the original OpenZeppelin implementation, this contract does not prevent the admin from calling the implementation.\r\n * This potentially exposes the admin to a proxy selector attack. See\r\n * https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * When using this contract, you must ensure that the implementation function selectors do not clash with the proxy selectors.\r\n * The proxy selectors are:\r\n * - 0x3659cfe6: upgradeTo\r\n * - 0x4f1ef286: upgradeToAndCall\r\n * - 0x8f283970: changeAdmin\r\n * - 0xf851a440: admin\r\n * - 0x5c60da1b: implementation\r\n *\r\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\r\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\r\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\r\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\r\n * implementation.\r\n *\r\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\r\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\r\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\r\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\r\n */\r\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\r\n /**\r\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\r\n *\r\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\r\n * implementation provides a function with the same selector.\r\n */\r\n modifier ifAdmin() {\r\n if (msg.sender == _getAdmin()) {\r\n _;\r\n } else {\r\n _fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\r\n */\r\n function _fallback() internal virtual override {\r\n if (msg.sender == _getAdmin()) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\r\n ret = _dispatchUpgradeTo();\r\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\r\n ret = _dispatchUpgradeToAndCall();\r\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\r\n ret = _dispatchChangeAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\r\n ret = _dispatchAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\r\n ret = _dispatchImplementation();\r\n } else {\r\n // Call implementation\r\n return super._fallback();\r\n }\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n } else {\r\n super._fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\r\n */\r\n function _dispatchAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address admin = _getAdmin();\r\n return abi.encode(admin);\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\r\n */\r\n function _dispatchImplementation() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address implementation = _implementation();\r\n return abi.encode(implementation);\r\n }\r\n\r\n /**\r\n * @dev Changes the admin of the proxy.\r\n *\r\n * Emits an {AdminChanged} event.\r\n */\r\n function _dispatchChangeAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newAdmin = abi.decode(msg.data[4:], (address));\r\n _changeAdmin(newAdmin);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy.\r\n */\r\n function _dispatchUpgradeTo() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newImplementation = abi.decode(msg.data[4:], (address));\r\n _upgradeToAndCall(newImplementation, bytes(""), false);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\r\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\r\n * proxied contract.\r\n */\r\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\r\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\r\n _upgradeToAndCall(newImplementation, data, true);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\r\n */\r\n function _admin() internal view virtual returns (address) {\r\n return _getAdmin();\r\n }\r\n\r\n /**\r\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\r\n * emulate some proxy functions being non-payable while still allowing value to pass through.\r\n */\r\n function _requireZeroValue() internal {\r\n require(msg.value == 0);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC20/ERC20Token.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";\r\nimport {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";\r\nimport {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";\r\nimport {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * A standard base implementation of ERC-20 for use in Sequence library contracts.\r\n */\r\nabstract contract ERC20Token is ERC20, AccessControl {\r\n\r\n string internal _tokenName;\r\n string internal _tokenSymbol;\r\n uint8 private _tokenDecimals;\r\n\r\n address private immutable _initializer;\r\n bool private _initialized;\r\n\r\n constructor() ERC20("", "") {\r\n _initializer = msg.sender;\r\n }\r\n\r\n /**\r\n * Initialize contract.\r\n * @param owner The owner of the contract\r\n * @param tokenName Name of the token\r\n * @param tokenSymbol Symbol of the token\r\n * @param tokenDecimals Number of decimals\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function initialize(address owner, string memory tokenName, string memory tokenSymbol, uint8 tokenDecimals) public virtual {\r\n if (msg.sender != _initializer || _initialized) {\r\n revert InvalidInitialization();\r\n }\r\n\r\n _tokenName = tokenName;\r\n _tokenSymbol = tokenSymbol;\r\n _tokenDecimals = tokenDecimals;\r\n\r\n _setupRole(DEFAULT_ADMIN_ROLE, owner);\r\n\r\n _initialized = true;\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\r\n return interfaceId == type(IERC20).interfaceId || interfaceId == type(IERC20Metadata).interfaceId\r\n || AccessControl.supportsInterface(interfaceId) || super.supportsInterface(interfaceId);\r\n }\r\n\r\n //\r\n // ERC20 Overrides\r\n //\r\n\r\n /**\r\n * Override the ERC20 name function.\r\n */\r\n function name() public view override returns (string memory) {\r\n return _tokenName;\r\n }\r\n\r\n /**\r\n * Override the ERC20 symbol function.\r\n */\r\n function symbol() public view override returns (string memory) {\r\n return _tokenSymbol;\r\n }\r\n\r\n /**\r\n * Override the ERC20 decimals function.\r\n */\r\n function decimals() public view override returns (uint8) {\r\n return _tokenDecimals;\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC20/presets/minter/ERC20TokenMinter.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC20Token} from "@0xsequence/contracts-library/tokens/ERC20/ERC20Token.sol";\r\nimport {\r\n IERC20TokenMinter,\r\n IERC20TokenMinterFunctions\r\n} from "@0xsequence/contracts-library/tokens/ERC20/presets/minter/IERC20TokenMinter.sol";\r\n\r\n/**\r\n * A ready made implementation of ERC-20 capable of minting when role provided.\r\n */\r\ncontract ERC20TokenMinter is ERC20Token, IERC20TokenMinter {\r\n bytes32 internal constant MINTER_ROLE = keccak256("MINTER_ROLE");\r\n\r\n address private immutable _initializer;\r\n bool private _initialized;\r\n\r\n constructor() {\r\n _initializer = msg.sender;\r\n }\r\n\r\n /**\r\n * Initialize contract.\r\n * @param owner The owner of the contract\r\n * @param tokenName Name of the token\r\n * @param tokenSymbol Symbol of the token\r\n * @param tokenDecimals Number of decimals\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function initialize(address owner, string memory tokenName, string memory tokenSymbol, uint8 tokenDecimals)\r\n public\r\n virtual\r\n override\r\n {\r\n if (msg.sender != _initializer || _initialized) {\r\n revert InvalidInitialization();\r\n }\r\n\r\n ERC20Token.initialize(owner, tokenName, tokenSymbol, tokenDecimals);\r\n\r\n _setupRole(MINTER_ROLE, owner);\r\n\r\n _initialized = true;\r\n }\r\n\r\n //\r\n // Minting\r\n //\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param amount Amount of tokens to mint.\r\n * @notice This function can only be called by a minter.\r\n */\r\n function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) {\r\n _mint(to, amount);\r\n }\r\n\r\n //\r\n // Admin\r\n //\r\n\r\n /**\r\n * Set name and symbol of token.\r\n * @param tokenName Name of token.\r\n * @param tokenSymbol Symbol of token.\r\n */\r\n function setNameAndSymbol(string memory tokenName, string memory tokenSymbol)\r\n external\r\n onlyRole(DEFAULT_ADMIN_ROLE)\r\n {\r\n _tokenName = tokenName;\r\n _tokenSymbol = tokenSymbol;\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\r\n return type(IERC20TokenMinterFunctions).interfaceId == interfaceId || ERC20Token.supportsInterface(interfaceId)\r\n || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC20/presets/minter/ERC20TokenMinterFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC20TokenMinter} from "@0xsequence/contracts-library/tokens/ERC20/presets/minter/ERC20TokenMinter.sol";\r\nimport {IERC20TokenMinterFactory} from\r\n "@0xsequence/contracts-library/tokens/ERC20/presets/minter/IERC20TokenMinterFactory.sol";\r\nimport {SequenceProxyFactory} from "@0xsequence/contracts-library/proxies/SequenceProxyFactory.sol";\r\n\r\n/**\r\n * Deployer of ERC-20 Token Minter proxies.\r\n */\r\ncontract ERC20TokenMinterFactory is IERC20TokenMinterFactory, SequenceProxyFactory {\r\n /**\r\n * Creates an ERC-20 Token Minter Factory.\r\n * @param factoryOwner The owner of the ERC-20 Token Minter Factory\r\n */\r\n constructor(address factoryOwner) {\r\n ERC20TokenMinter impl = new ERC20TokenMinter();\r\n SequenceProxyFactory._initialize(address(impl), factoryOwner);\r\n }\r\n\r\n /**\r\n * Creates an ERC-20 Token Minter proxy.\r\n * @param proxyOwner The owner of the ERC-20 Token Minter proxy\r\n * @param tokenOwner The owner of the ERC-20 Token Minter implementation\r\n * @param name The name of the ERC-20 Token Minter proxy\r\n * @param symbol The symbol of the ERC-20 Token Minter proxy\r\n * @param decimals The decimals of the ERC-20 Token Minter proxy\r\n * @return proxyAddr The address of the ERC-20 Token Minter Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-20 Token Minter functions.\r\n */\r\n function deploy(address proxyOwner, address tokenOwner, string memory name, string memory symbol, uint8 decimals)\r\n external\r\n returns (address proxyAddr)\r\n {\r\n bytes32 salt = keccak256(abi.encodePacked(tokenOwner, name, symbol, decimals));\r\n proxyAddr = _createProxy(salt, proxyOwner, "");\r\n ERC20TokenMinter(proxyAddr).initialize(tokenOwner, name, symbol, decimals);\r\n emit ERC20TokenMinterDeployed(proxyAddr);\r\n return proxyAddr;\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC20/presets/minter/IERC20TokenMinter.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC20TokenMinterFunctions {\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param amount Amount of tokens to mint.\r\n */\r\n function mint(address to, uint256 amount) external;\r\n\r\n /**\r\n * Set name and symbol of token.\r\n * @param tokenName Name of token.\r\n * @param tokenSymbol Symbol of token.\r\n */\r\n function setNameAndSymbol(string memory tokenName, string memory tokenSymbol) external;\r\n}\r\n\r\ninterface IERC20TokenMinterSignals {\r\n\r\n /**\r\n * Invalid initialization error.\r\n */\r\n error InvalidInitialization();\r\n}\r\n\r\ninterface IERC20TokenMinter is IERC20TokenMinterSignals {}\r\n' + }, + 'src/tokens/ERC20/presets/minter/IERC20TokenMinterFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC20TokenMinterFactoryFunctions {\r\n /**\r\n * Creates an ERC-20 Token Minter proxy.\r\n * @param proxyOwner The owner of the ERC-20 Token Minter proxy\r\n * @param tokenOwner The owner of the ERC-20 Token Minter implementation\r\n * @param name The name of the ERC-20 Token Minter proxy\r\n * @param symbol The symbol of the ERC-20 Token Minter proxy\r\n * @param decimals The decimals of the ERC-20 Token Minter proxy\r\n * @return proxyAddr The address of the ERC-20 Token Minter Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-20 Token Minter functions.\r\n */\r\n function deploy(address proxyOwner, address tokenOwner, string memory name, string memory symbol, uint8 decimals)\r\n external\r\n returns (address proxyAddr);\r\n}\r\n\r\ninterface IERC20TokenMinterFactorySignals {\r\n /**\r\n * Event emitted when a new ERC-20 Token Minter proxy contract is deployed.\r\n * @param proxyAddr The address of the deployed proxy.\r\n */\r\n event ERC20TokenMinterDeployed(address proxyAddr);\r\n}\r\n\r\ninterface IERC20TokenMinterFactory is IERC20TokenMinterFactoryFunctions, IERC20TokenMinterFactorySignals {}\r\n' + } + }, + settings: { + evmVersion: 'paris', + libraries: {}, + metadata: { bytecodeHash: 'ipfs' }, + optimizer: { enabled: true, runs: 20000 }, + remappings: [ + ':@0xsequence/contracts-library/=src/', + ':@0xsequence/erc-1155/=node_modules/@0xsequence/erc-1155/', + ':@0xsequence/erc20-meta-token/=node_modules/@0xsequence/erc20-meta-token/', + ':@openzeppelin/=node_modules/@openzeppelin/', + ':ds-test/=lib/forge-std/lib/ds-test/src/', + ':erc721a-upgradeable/=node_modules/erc721a-upgradeable/', + ':erc721a/=node_modules/erc721a/', + ':forge-std/=lib/forge-std/src/', + ':murky/=lib/murky/src/', + ':openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/' + ], + viaIR: true, + outputSelection: { + '*': { + '*': ['evm.bytecode', 'evm.deployedBytecode', 'devdoc', 'userdoc', 'metadata', 'abi'] + } + } + } + } +} diff --git a/scripts/factories/token_library/ERC721MinterFactory.ts b/scripts/factories/token_library/ERC721MinterFactory.ts new file mode 100644 index 0000000..10e636d --- /dev/null +++ b/scripts/factories/token_library/ERC721MinterFactory.ts @@ -0,0 +1,347 @@ +import type { EtherscanVerificationRequest } from '@0xsequence/solidity-deployer' +import { ContractFactory, ethers } from 'ethers' + +// https://github.com/0xsequence/contracts-library/blob/5e0017b81cc3099e60704eaf4a50b64e79fe706c/src/tokens/ERC721/presets/minter/ERC721TokenMinterFactory.sol + +const abi = [ + { + inputs: [ + { + internalType: 'address', + name: 'factoryOwner', + type: 'address' + } + ], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'proxyAddr', + type: 'address' + } + ], + name: 'ERC721TokenMinterDeployed', + 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' + }, + { + inputs: [], + name: 'beacon', + outputs: [ + { + internalType: 'contract UpgradeableBeacon', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'proxyOwner', + type: 'address' + }, + { + internalType: 'address', + name: 'tokenOwner', + type: 'address' + }, + { + internalType: 'string', + name: 'name', + type: 'string' + }, + { + internalType: 'string', + name: 'symbol', + type: 'string' + }, + { + internalType: 'string', + name: 'baseURI', + type: 'string' + }, + { + internalType: 'string', + name: 'contractURI', + type: 'string' + }, + { + internalType: 'address', + name: 'royaltyReceiver', + type: 'address' + }, + { + internalType: 'uint96', + name: 'royaltyFeeNumerator', + type: 'uint96' + } + ], + name: 'deploy', + outputs: [ + { + internalType: 'address', + name: 'proxyAddr', + type: 'address' + } + ], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address' + } + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'implementation', + type: 'address' + } + ], + name: 'upgradeBeacon', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + } +] + +export class ERC721MinterFactory extends ContractFactory { + constructor(signer: ethers.Signer) { + super( + abi, + '0x608034610125576001600160401b0390601f6200607638819003918201601f191683019291908484118385101761010f57816020928492604096875283398101031261012557516001600160a01b038082168203610125576100603361012a565b825193613b4494858101958187108388111761010f5762002532823980600096039086f0908115610105578451916105ee808401928311848410176100f1579184849260209462001f44853916815203019085f080156100e4576100d69394501660018060a01b0319600154161760015561012a565b51611dd29081620001728239f35b50505051903d90823e3d90fd5b634e487b7160e01b88526041600452602488fd5b84513d87823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b600080546001600160a01b039283166001600160a01b03198216811783559216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a356fe6080604052600436101561001257600080fd5b6000803560e01c80631bce45831461092057806325a570b8146102d857806359659e9014610286578063715018a6146101e95780638da5cb5b146101985763f2fde38b1461005f57600080fd5b346101955760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610195576100966109df565b61009e610acc565b73ffffffffffffffffffffffffffffffffffffffff80911690811561011157600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b80fd5b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101955773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557610220610acc565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b5034610195576101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610195576103116109df565b73ffffffffffffffffffffffffffffffffffffffff60243516602435036109135760443567ffffffffffffffff811161091c57610352903690600401610a57565b9060643567ffffffffffffffff81116107fd57610373903690600401610a57565b9060843567ffffffffffffffff811161091857610394903690600401610a57565b9260a43567ffffffffffffffff811161090f576103b5903690600401610a57565b9073ffffffffffffffffffffffffffffffffffffffff60c4351660c43503610913576bffffffffffffffffffffffff60e4351660e4350361090f5760405160208101907fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060243560601b1682526104e360548451838a8a60349361043f8186860160208d01610b4b565b83016104548251809360208885019101610b4b565b016104688251809360208785019101610b4b565b0188519061047c8285830160208d01610b4b565b017fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060c43560601b16838201527fffffffffffffffffffffffff000000000000000000000000000000000000000060e43560a01b1660488201520390810184520182610a16565b519020946040519586602081011067ffffffffffffffff6020890111176108e057602087016040528787526001547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006040519160208301938452818860601b16604084015260601b16605482015261057a6068828a5161056a818d60208686019101610b4b565b8101036048810184520182610a16565b519020604051906111eb6105916020820184610a16565b8083526020830190610bb282398251156108825773ffffffffffffffffffffffffffffffffffffffff9251908af51695861561082457879473ffffffffffffffffffffffffffffffffffffffff6001541691883b1561082057869161064c73ffffffffffffffffffffffffffffffffffffffff9260405195869485947fcf7a1d770000000000000000000000000000000000000000000000000000000086521660048501526024840152606060448401526064830190610b6e565b0381838b5af1908115610815578591610801575b5050853b156107fd576106d1926107316107619261070160405198899788977f98dd69c800000000000000000000000000000000000000000000000000000000895273ffffffffffffffffffffffffffffffffffffffff6024351660048a015260e060248a015260e4890190610b6e565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc888303016044890152610b6e565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc868303016064870152610b6e565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc848303016084850152610b6e565b73ffffffffffffffffffffffffffffffffffffffff60c4351660a48301526bffffffffffffffffffffffff60e4351660c4830152038183865af180156107f2576107da575b6020827fa0b12af9d82735529d3b42a160f48b81a53ef6d07e44088f64b457b0ec8e215e82604051838152a1604051908152f35b6107e48391610a02565b6107ee57816107a6565b5080fd5b6040513d85823e3d90fd5b8380fd5b61080a90610a02565b6107fd578338610660565b6040513d87823e3d90fd5b8680fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8580fd5b600080fd5b8480fd5b8280fd5b50346101955760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610195576109586109df565b610960610acc565b8173ffffffffffffffffffffffffffffffffffffffff806001541692833b1561091c576024908360405195869485937f3659cfe60000000000000000000000000000000000000000000000000000000085521660048401525af180156109d4576109c8575080f35b6109d190610a02565b80f35b6040513d84823e3d90fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361091357565b67ffffffffffffffff81116108e057604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176108e057604052565b81601f820112156109135780359067ffffffffffffffff82116108e05760405192610aaa60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160185610a16565b8284526020838301011161091357816000926020809301838601378301015290565b73ffffffffffffffffffffffffffffffffffffffff600054163303610aed57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60005b838110610b5e5750506000910152565b8181015183820152602001610b4e565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610baa81518092818752878088019101610b4b565b011601019056fe60808060405234610016576111cf908161001c8239f35b600080fdfe604060808152366103825773ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000917fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000843516146100c057600484517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b6100c8611192565b60049136831161037e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261037e578235916101088361067f565b602435926101158461067f565b60443567ffffffffffffffff811161037a57610135839136908801610789565b941692156103525761014791166107e3565b803b156102cf578451907f5c60da1b000000000000000000000000000000000000000000000000000000009384835260209687848381865afa9384156102a657889461019d9189916102b2575b503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab575b610242575b8361023c6107d0565b80519101f35b8592839182525afa9182156102a65761026a9392610277575b506102646109b1565b91610a21565b5038808083818080610233565b610298919250843d861161029f575b610290818361070e565b810190610902565b903861025b565b503d610286565b61091a565b508661022e565b6102c99150863d881161029f57610290818361070e565b38610194565b60848360208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b8487517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8380fd5b73ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000907fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833516146104395760046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b610441611192565b60049236841161067b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067b5783356104808161067f565b6024359161048d8361067f565b60443567ffffffffffffffff8111610677576104ad829136908901610789565b9316931561064e576104bf91166107e3565b813b156105ca576040517f5c60da1b000000000000000000000000000000000000000000000000000000009283825260209586838281855afa9283156102a65787936105149188916105b357503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905560405194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab57610242578361023c6107d0565b6102c99150853d871161029f57610290818361070e565b6084846020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b856040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8280fd5b73ffffffffffffffffffffffffffffffffffffffff81160361069d57565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff8211176106ed57604052565b6106a2565b6040810190811067ffffffffffffffff8211176106ed57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106ed57604052565b67ffffffffffffffff81116106ed57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f8201121561069d578035906107a08261074f565b926107ae604051948561070e565b8284526020838301011161069d57816000926020809301838601378301015290565b604051906107dd826106d1565b60008252565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61039081547f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f604080519373ffffffffffffffffffffffffffffffffffffffff9081851686521693846020820152a1811561087e577fffffffffffffffffffffffff000000000000000000000000000000000000000016179055565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b9081602091031261069d57516109178161067f565b90565b6040513d6000823e3d90fd5b1561092d57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201527f73206e6f74206120636f6e7472616374000000000000000000000000000000006064820152fd5b604051906060820182811067ffffffffffffffff8211176106ed57604052602782527f206661696c6564000000000000000000000000000000000000000000000000006040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6000806109179493602081519101845af43d15610a60573d91610a438361074f565b92610a51604051948561070e565b83523d6000602085013e610acd565b606091610acd565b15610a6f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b91929015610aed5750815115610ae1575090565b610917903b1515610a68565b825190915015610b005750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b848110610b7d575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201610b3c565b610bee610bd57fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b3303610d14576000357fffffffff00000000000000000000000000000000000000000000000000000000167f3659cfe6000000000000000000000000000000000000000000000000000000008103610c515750610c49610f0f565b602081519101f35b7f4f1ef286000000000000000000000000000000000000000000000000000000008103610c865750610c81611083565b610c49565b7f8f283970000000000000000000000000000000000000000000000000000000008103610cb65750610c81610ec5565b7ff851a440000000000000000000000000000000000000000000000000000000008103610ce65750610c81610dfd565b7f5c60da1b0000000000000000000000000000000000000000000000000000000003610d1457610c81610e53565b610d1c610d3b565b6000808092368280378136915af43d82803e15610d37573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541680610df8575060206004917fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505416604051928380927f5c60da1b0000000000000000000000000000000000000000000000000000000082525afa9081156102a657600091610de0575090565b610917915060203d811161029f57610290818361070e565b905090565b610e05611192565b73ffffffffffffffffffffffffffffffffffffffff7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103541660405190602082015260208152610917816106f2565b610e5b611192565b610e63610d3b565b73ffffffffffffffffffffffffffffffffffffffff6040519116602082015260208152610917816106f2565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc602091011261069d576004356109178161067f565b610ecd611192565b3660041161069d57610efc73ffffffffffffffffffffffffffffffffffffffff610ef636610e8f565b166107e3565b604051610f08816106d1565b6000815290565b610f17611192565b3660041161069d5773ffffffffffffffffffffffffffffffffffffffff610f3d36610e8f565b1660405190610f4b826106d1565b60008252803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2815115801590610ff7575b610fe3575b5050604051610f08816106d1565b610fef916102646109b1565b503880610fd5565b506000610fd0565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152fd5b3660041161069d5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261069d576004356110c18161067f565b60243567ffffffffffffffff811161069d576110f673ffffffffffffffffffffffffffffffffffffffff913690600401610789565b9116803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061118a57610fe3575050604051610f08816106d1565b506001610fd0565b3461069d5756fea264697066735822122019f840d2ec21d6e6c6d650eef546ce8fd590e6d8042a04516b47dd55a17345c664736f6c63430008130033a2646970667358221220b7f707f8b0e60fbb86583a35d52566907ef651225f80956724e38670ea43069d64736f6c6343000813003360803461011a57601f6105ee38819003918201601f19168301916001600160401b0383118484101761011f5780849260209460405283398101031261011a57516001600160a01b03808216919082820361011a576000549160018060a01b0319923384821617600055604051923391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a33b156100b2575060015416176001556040516104b890816101368239f35b62461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b6000803560e01c80633659cfe6146102ce5780635c60da1b1461027c578063715018a6146101e05780638da5cb5b1461018f5763f2fde38b1461005457600080fd5b3461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610188576100ad610403565b8115610104578254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b80fd5b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57610217610403565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff81169081810361018857610328610403565b3b1561037f57807fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8280a280f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff60005416330361042457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea2646970667358221220dc365b16a2b6643d361d2ca2ef711f783ae4b4503a5f52631ea9ce48e88aa6da64736f6c6343000813003360a060405234620002dc5762000014620002e1565b6200001e620002e1565b8151906001600160401b0390818311620001ee57600254906001938483811c9316958615620002d1575b60209687851014620001cd578190601f948581116200027a575b508790858311600114620002105760009262000204575b5050600019600383901b1c191690851b176002555b8051928311620001ee5760039485548581811c91168015620001e3575b82821014620001cd5783811162000182575b50809284116001146200011857509282939183926000946200010c575b50501b9160001990841b1c19161790555b600080553360805260405161383e9081620003068239608051816133c50152f35b015192503880620000da565b919083601f1981168760005284600020946000905b888383106200016757505050106200014e575b505050811b019055620000eb565b015160001983861b60f8161c1916905538808062000140565b8587015188559096019594850194879350908101906200012d565b86600052816000208480870160051c820192848810620001c3575b0160051c019086905b828110620001b6575050620000bd565b60008155018690620001a6565b925081926200019d565b634e487b7160e01b600052602260045260246000fd5b90607f1690620000ab565b634e487b7160e01b600052604160045260246000fd5b01519050388062000079565b90879350601f198316916002600052896000209260005b8b82821062000263575050841162000249575b505050811b016002556200008e565b015160001960f88460031b161c191690553880806200023a565b8385015186558b9790950194938401930162000227565b9091506002600052876000208580850160051c8201928a8610620002c7575b918991869594930160051c01915b828110620002b757505062000062565b60008155859450899101620002a7565b9250819262000299565b92607f169262000048565b600080fd5b60405190602082016001600160401b03811183821017620001ee576040526000825256fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a71461022757806304634d8d1461022257806306fdde031461021d578063081812fc14610218578063095ea7b31461021357806318160ddd1461020e57806323b872dd14610209578063248a9ca3146102045780632a55205a146101ff5780632f2ff15d146101fa57806336568abe146101f557806340c10f19146101f057806342842e0e146101eb5780635944c753146101e65780635a446215146101e15780635bbb2177146101dc5780636352211e146101d757806370a08231146101d25780637e518ec8146101cd5780638462151c146101c857806391d14854146101c3578063938e3d7b146101be57806395d89b41146101b957806398dd69c8146101b457806399a2557a146101af578063a217fddf146101aa578063a22cb465146101a5578063b88d4fde146101a0578063c23dc68f1461019b578063c87b56dd14610196578063d547741f14610191578063e8a3d4851461018c5763e985e9c51461018757600080fd5b611add565b611a36565b6119f7565b61187d565b61180b565b6117b0565b6116e1565b6116c5565b61168d565b6115ef565b611548565b611449565b6113e9565b611315565b6111db565b611185565b611149565b6110e3565b610f19565b610ca7565b610c84565b610b36565b610a70565b610956565b610885565b610856565b610844565b6107df565b6106c0565b610646565b610547565b6104a7565b61025b565b7fffffffff0000000000000000000000000000000000000000000000000000000081160361025657565b600080fd5b34610256576020600319360112610256576102dd60043561027b8161022c565b7fffffffff000000000000000000000000000000000000000000000000000000008116807f40c10f1900000000000000000000000000000000000000000000000000000000149182156102e1575b505060405190151581529081906020820190565b0390f35b7fc21b8f2800000000000000000000000000000000000000000000000000000000821492509082156103de575b821561034d575b50811561033c575b811561032c575b5038806102c9565b61033691506136d3565b38610324565b9050610347816136d3565b9061031d565b9091507f01ffc9a70000000000000000000000000000000000000000000000000000000081149081156103b4575b811561038a575b509038610315565b7f5b5e139f0000000000000000000000000000000000000000000000000000000091501438610382565b7f80ac58cd000000000000000000000000000000000000000000000000000000008114915061037b565b7f8446a79e000000000000000000000000000000000000000000000000000000008114925061030e565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361025657565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361025657565b60a4359073ffffffffffffffffffffffffffffffffffffffff8216820361025657565b604435906bffffffffffffffffffffffff8216820361025657565b60c435906bffffffffffffffffffffffff8216820361025657565b34610256576040600319360112610256576104c0610408565b6024356bffffffffffffffffffffffff81168103610256576104e9916104e4611b4d565b6135fb565b005b60005b8381106104fe5750506000910152565b81810151838201526020016104ee565b90601f19601f60209361052c815180928187528780880191016104eb565b0116010190565b90602061054492818152019061050e565b90565b3461025657600080600319360112610643576040519080600c5461056a81612ee0565b808552916001918083169081156105fb57506001146105a0575b6102dd8561059481870382610e79565b60405191829182610533565b9250600c83527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b8284106105e3575050508101602001610594826102dd610584565b805460208587018101919091529093019281016105c8565b8695506102dd969350602092506105949491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b8201019293610584565b80fd5b3461025657602060031936011261025657600435610663816126a0565b15610696576000526006602052602073ffffffffffffffffffffffffffffffffffffffff60406000205416604051908152f35b60046040517fcf4700e4000000000000000000000000000000000000000000000000000000008152fd5b6040600319360112610256576106d4610408565b60243573ffffffffffffffffffffffffffffffffffffffff806106f683612601565b1690813303610776575b600083815260066020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87161790559316907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b81600052600760205260ff6107af3360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166107005760046040517fcfb3b942000000000000000000000000000000000000000000000000000000008152fd5b346102565760006003193601126102565760206000546001549003604051908152f35b60031960609101126102565773ffffffffffffffffffffffffffffffffffffffff90600435828116810361025657916024359081168103610256579060443590565b6104e961085036610802565b916126e2565b3461025657602060031936011261025657600435600052600a6020526020600160406000200154604051908152f35b346102565760406003193601126102565760043560005260096020526040600020604051906108b382610e3c565b549073ffffffffffffffffffffffffffffffffffffffff82169182825260a01c60208201529015610948575b61091f6127106109036bffffffffffffffffffffffff602085015116602435612206565b04915173ffffffffffffffffffffffffffffffffffffffff1690565b6040805173ffffffffffffffffffffffffffffffffffffffff9290921682526020820192909252f35b506109516121a4565b6108df565b346102565760406003193601126102565760043561097261042b565b600091808352600a60205261098d6001604085200154611cf1565b808352600a60205260ff6109c483604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b5416156109cf578280f35b808352600a602052610a0482604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b3461025657604060031936011261025657610a8961042b565b3373ffffffffffffffffffffffffffffffffffffffff821603610ab2576104e9906004356120c6565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b3461025657604060031936011261025657610b4f610408565b60243590610b5b611c47565b6000918254918115610c5a57610b918173ffffffffffffffffffffffffffffffffffffffff166000526005602052604060002090565b680100000000000000018302815401905573ffffffffffffffffffffffffffffffffffffffff600191169181811460e11b4260a01b178317610bdd856000526004602052604060002090565b55830192817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91808588858180a4015b848103610c4b5750505015610c2157815580f35b60046040517f2e076300000000000000000000000000000000000000000000000000000000008152fd5b8083918588858180a401610c0d565b60046040517fb562e8dd000000000000000000000000000000000000000000000000000000008152fd5b6104e9610c9036610802565b9060405192610c9e84610e5d565b60008452612963565b3461025657606060031936011261025657610cc061042b565b610cc8610471565b90610cd1611b4d565b610ced6127106bffffffffffffffffffffffff84161115613570565b73ffffffffffffffffffffffffffffffffffffffff811615610daf57610d4c6104e992610d37610d1b610e9c565b73ffffffffffffffffffffffffffffffffffffffff9094168452565b6bffffffffffffffffffffffff166020830152565b610d626004356000526009602052604060002090565b815160209092015160a01b7fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610e5857604052565b610e0d565b6020810190811067ffffffffffffffff821117610e5857604052565b90601f601f19910116810190811067ffffffffffffffff821117610e5857604052565b60405190610ea982610e3c565b565b67ffffffffffffffff8111610e5857601f01601f191660200190565b929192610ed382610eab565b91610ee16040519384610e79565b829481845281830111610256578281602093846000960137010152565b9080601f830112156102565781602061054493359101610ec7565b346102565760406003193601126102565767ffffffffffffffff60043581811161025657610f4b903690600401610efe565b9060243581811161025657610f64903690600401610efe565b90610f6d611c9c565b8251908111610e5857610f8a81610f85600c54612ee0565b612f33565b602080601f8311600114610fcb575081906104e994600092610fc0575b50506000198260011b9260031b1c191617600c556130f7565b015190503880610fa7565b600c6000529193601f1985167fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7936000905b82821061103e5750509160019391866104e9979410611025575b505050811b01600c556130f7565b015160001960f88460031b161c19169055388080611017565b80600186978294978701518155019601940190610ffd565b6020908160408183019282815285518094520193019160005b82811061107d575050505090565b90919293826080826110d7600194895162ffffff6060809273ffffffffffffffffffffffffffffffffffffffff815116855267ffffffffffffffff6020820151166020860152604081015115156040860152015116910152565b0195019392910161106f565b346102565760206003193601126102565767ffffffffffffffff6004358181116102565736602382011215610256578060040135918211610256573660248360051b83010111610256576102dd91602461113d9201612cba565b60405191829182611056565b3461025657602060031936011261025657602073ffffffffffffffffffffffffffffffffffffffff61117c600435612601565b16604051908152f35b346102565760206003193601126102565760206111a86111a3610408565b6125a0565b604051908152f35b6020600319820112610256576004359067ffffffffffffffff82116102565761054491600401610efe565b34610256576111e9366111b0565b6111f1611c9c565b805167ffffffffffffffff8111610e585761121681611211600b54612ee0565b612fa4565b602080601f831160011461125357508192600092611248575b50506000198260011b9260031b1c191617600b55600080f35b01519050388061122f565b90601f19831693611286600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db990565b926000905b8682106112c257505083600195106112a9575b505050811b01600b55005b015160001960f88460031b161c1916905538808061129e565b8060018596829496860151815501950193019061128b565b6020908160408183019282815285518094520193019160005b828110611301575050505090565b8351855293810193928101926001016112f3565b346102565760206003193601126102565761132e610408565b60008061133a836125a0565b9161134483612d4a565b9361134d612b88565b5073ffffffffffffffffffffffffffffffffffffffff90811691835b85850361137e57604051806102dd89826112da565b61138781612c0c565b60408101516113e0575173ffffffffffffffffffffffffffffffffffffffff168381166113d7575b5060019084848416146113c3575b01611369565b806113d1838801978a612ca6565b526113bd565b915060016113af565b506001906113bd565b3461025657604060031936011261025657602060ff61143d61140961042b565b600435600052600a845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166040519015158152f35b3461025657611457366111b0565b61145f611c9c565b805167ffffffffffffffff8111610e58576114848161147f600e54612ee0565b613015565b602080601f83116001146114c1575081926000926114b6575b50506000198260011b9260031b1c191617600e55600080f35b01519050388061149d565b90601f198316936114f4600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd90565b926000905b8682106115305750508360019510611517575b505050811b01600e55005b015160001960f88460031b161c1916905538808061150c565b806001859682949686015181550195019301906114f9565b3461025657600080600319360112610643576040519080600d5461156b81612ee0565b808552916001918083169081156105fb5750600114611594576102dd8561059481870382610e79565b9250600d83527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b8284106115d7575050508101602001610594826102dd610584565b805460208587018101919091529093019281016115bc565b346102565760e060031936011261025657611608610408565b67ffffffffffffffff906024358281116102565761162a903690600401610efe565b60443583811161025657611642903690600401610efe565b6064358481116102565761165a903690600401610efe565b608435948511610256576116756104e9953690600401610efe565b9161167e61044e565b9361168761048c565b956133a8565b34610256576060600319360112610256576102dd6116b96116ac610408565b6044359060243590612d7b565b604051918291826112da565b3461025657600060031936011261025657602060405160008152f35b34610256576040600319360112610256576116fa610408565b602435908115158092036102565773ffffffffffffffffffffffffffffffffffffffff903360005260076020526117558160406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff851617905560405192835216907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b6080600319360112610256576117c4610408565b6117cc61042b565b6064359167ffffffffffffffff83116102565736602384011215610256576118016104e9933690602481600401359101610ec7565b9160443591612963565b34610256576020600319360112610256576080611829600435612bbe565b61187b604051809262ffffff6060809273ffffffffffffffffffffffffffffffffffffffff815116855267ffffffffffffffff6020820151166020860152604081015115156040860152015116910152565bf35b34610256576020806003193601126102565760043561189b816126a0565b156119cd576040519082826000600b546118b481612ee0565b8084529060019081811690811561198d575060011461192e575b50506118dc92500383610e79565b81511561191b576102dd9261190d6118f661059493612b3f565b611907604051958694850190611dd3565b90611dd3565b03601f198101835282610e79565b5050506102dd61192961221e565b610594565b90939150600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9936000915b8183106119755750879450508201016118dc386118ce565b8554888401850152948501948794509183019161195d565b90506118dc9593507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201018592386118ce565b60046040517fa14c4b50000000000000000000000000000000000000000000000000000000008152fd5b34610256576040600319360112610256576104e9600435611a1661042b565b9080600052600a602052611a31600160406000200154611cf1565b6120c6565b3461025657600080600319360112610643576040519080600e54611a5981612ee0565b808552916001918083169081156105fb5750600114611a82576102dd8561059481870382610e79565b9250600e83527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd5b828410611ac5575050508101602001610594826102dd610584565b80546020858701810191909152909301928101611aaa565b3461025657604060031936011261025657602060ff61143d611afd610408565b73ffffffffffffffffffffffffffffffffffffffff611b1a61042b565b91166000526007845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b3360009081527f4a209273c9c71eac8bee506e444418998f8f452896d49b4edfa61f22f2a2bd27602052604090205460ff1615611b8657565b611c436048611c11611b973361232c565b61190d611ba26123c9565b6040519485937f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006020860152611be28151809260206037890191016104eb565b84017f206973206d697373696e6720726f6c652000000000000000000000000000000060378201520190611dd3565b6040519182917f08c379a000000000000000000000000000000000000000000000000000000000835260048301610533565b0390fd5b3360009081527faa1d7351356c4ddc11907b1ee0660f579cfdf507235af2ae01ecd22a4b7ceaae602052604090205460ff1615611c8057565b611c436048611c11611c913361232c565b61190d611ba2612466565b3360009081527f2de00acba1f3dd4b00004fa31871eaf6bd23564af8ed1bbe52ac31593862e4a2602052604090205460ff1615611cd557565b611c436048611c11611ce63361232c565b61190d611ba2612503565b80600052600a60205260ff611d2a3360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541615611d345750565b611d3d3361232c565b611d45612231565b916030611d518461228c565b536078611d5d84612299565b5360415b60018111611d8057611c436048611c118561190d88611ba288156122c7565b90600f8116906010821015611dce577f3031323334353637383961626364656600000000000000000000000000000000611dc9921a611dbf84876122a9565b5360041c916122ba565b611d61565b61225d565b90611de6602092828151948592016104eb565b0190565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3602052604081205460ff1615611e3b575050565b808052600a602052611e7082604083209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f2de00acba1f3dd4b00004fa31871eaf6bd23564af8ed1bbe52ac31593862e4a2602052604081207fe02a0315b383857ac496e9d2b2546a699afaeb4e5e83a1fdef64376d0b74e5a59060ff905b541615611f4e57505050565b808252600a602052611f8383604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f4a209273c9c71eac8bee506e444418998f8f452896d49b4edfa61f22f2a2bd27602052604081207f6db4061a20ca83a3be756ee172bd37a029093ac5afe4ce968c6d5435b43cb0119060ff90611f42565b73ffffffffffffffffffffffffffffffffffffffff811660009081527faa1d7351356c4ddc11907b1ee0660f579cfdf507235af2ae01ecd22a4b7ceaae602052604081207f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a69060ff90611f42565b600090808252600a60205260ff61210084604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541661210b57505050565b808252600a60205261214083604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b604051906121b182610e3c565b60085473ffffffffffffffffffffffffffffffffffffffff8116835260a01c6020830152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181029291811591840414171561221957565b6121d7565b6040519061222b82610e5d565b60008252565b604051906080820182811067ffffffffffffffff821117610e5857604052604282526060366020840137565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b805115611dce5760200190565b805160011015611dce5760210190565b908151811015611dce570160200190565b8015612219576000190190565b156122ce57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906060820182811067ffffffffffffffff821117610e5857604052602a8252604036602084013760306123618361228c565b53607861236d83612299565b536029905b60018211612385576105449150156122c7565b600f8116906010821015611dce577f30313233343536373839616263646566000000000000000000000000000000006123c3921a611dbf84866122a9565b90612372565b7f6db4061a20ca83a3be756ee172bd37a029093ac5afe4ce968c6d5435b43cb0116123f2612231565b9060306123fe8361228c565b53607861240a83612299565b536041905b60018211612422576105449150156122c7565b600f8116906010821015611dce577f3031323334353637383961626364656600000000000000000000000000000000612460921a611dbf84866122a9565b9061240f565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661248f612231565b90603061249b8361228c565b5360786124a783612299565b536041905b600182116124bf576105449150156122c7565b600f8116906010821015611dce577f30313233343536373839616263646566000000000000000000000000000000006124fd921a611dbf84866122a9565b906124ac565b7fe02a0315b383857ac496e9d2b2546a699afaeb4e5e83a1fdef64376d0b74e5a561252c612231565b9060306125388361228c565b53607861254483612299565b536041905b6001821161255c576105449150156122c7565b600f8116906010821015611dce577f303132333435363738396162636465660000000000000000000000000000000061259a921a611dbf84866122a9565b90612549565b73ffffffffffffffffffffffffffffffffffffffff1680156125d757600052600560205267ffffffffffffffff6040600020541690565b60046040517f8f4eb604000000000000000000000000000000000000000000000000000000008152fd5b60008181548110612637575b60046040517fdf2d9b42000000000000000000000000000000000000000000000000000000008152fd5b815260049060209180835260409283832054947c01000000000000000000000000000000000000000000000000000000008616156126775750505061260d565b93929190935b851561268b57505050505090565b6000190180835281855283832054955061267d565b600054811090816126af575090565b905060005260046020527c0100000000000000000000000000000000000000000000000000000000604060002054161590565b906126ec83612601565b73ffffffffffffffffffffffffffffffffffffffff8084169283828416036129395760008681526006602052604090208054909261274a73ffffffffffffffffffffffffffffffffffffffff881633908114908414171590565b1590565b6128aa575b8216958615612880576127ba9361278c92612876575b5073ffffffffffffffffffffffffffffffffffffffff166000526005602052604060002090565b805460001901905573ffffffffffffffffffffffffffffffffffffffff166000526005602052604060002090565b805460010190557c0200000000000000000000000000000000000000000000000000000000804260a01b8517176127fb866000526004602052604060002090565b5581161561282c575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b60018401612844816000526004602052604060002090565b5415612851575b50612804565b600054811461284b5761286e906000526004602052604060002090565b55388061284b565b6000905538612765565b60046040517fea553b34000000000000000000000000000000000000000000000000000000008152fd5b61290a612746612903336128de8b73ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b9073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b5460ff1690565b1561274f5760046040517f59c896be000000000000000000000000000000000000000000000000000000008152fd5b60046040517fa1148100000000000000000000000000000000000000000000000000000000008152fd5b9291906129718282866126e2565b803b61297e575b50505050565b61298793612a40565b156129955738808080612978565b60046040517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b9081602091031261025657516105448161022c565b9092610544949360809373ffffffffffffffffffffffffffffffffffffffff80921684521660208301526040820152816060820152019061050e565b3d15612a3b573d90612a2182610eab565b91612a2f6040519384610e79565b82523d6000602084013e565b606090565b92602091612a9793600073ffffffffffffffffffffffffffffffffffffffff6040518097819682957f150b7a02000000000000000000000000000000000000000000000000000000009b8c855233600486016129d4565b0393165af160009181612b0f575b50612ae957612ab2612a10565b80519081612ae45760046040517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b612b3191925060203d8111612b38575b612b298183610e79565b8101906129bf565b9038612aa5565b503d612b1f565b9060405160a08101604052600019608082019360008552935b0192600a90818106603001855304928315612b765760001990612b58565b9250608083601f199203019201918252565b604051906080820182811067ffffffffffffffff821117610e585760405260006060838281528260208201528260408201520152565b612bc6612b88565b50612bcf612b88565b600054821015612c075750612be381612c0c565b6040810151612c075750612c0261054491612bfc612b88565b50612601565b612c27565b905090565b612c14612b88565b5060005260046020526105446040600020545b90612c30612b88565b9173ffffffffffffffffffffffffffffffffffffffff8116835267ffffffffffffffff8160a01c1660208401527c010000000000000000000000000000000000000000000000000000000081161515604084015260e81c6060830152565b67ffffffffffffffff8111610e585760051b60200190565b8051821015611dce5760209160051b010190565b612cc382612c8e565b91612cd16040519384610e79565b808352601f19612ce082612c8e565b0160005b818110612d3357505060005b818103612cfd5750505090565b81811015611dce5780612d1760019260051b850135612bbe565b612d218287612ca6565b52612d2c8186612ca6565b5001612cf0565b602090612d3e612b88565b82828801015201612ce4565b90612d5482612c8e565b612d616040519182610e79565b828152601f19612d718294612c8e565b0190602036910137565b9082811015612eb6576000918254808511612eae575b50612d9b816125a0565b84831015612ea757828503818110612e9f575b505b612db981612d4a565b958115612e9757612dc984612bbe565b918594604093612dde61274686830151151590565b612e78575b505b8781141580612e6e575b15612e6157612dfd81612c0c565b80850151612e58575173ffffffffffffffffffffffffffffffffffffffff90811680612e4f575b509081600192871690881614612e3b575b01612de5565b80612e49838a01998c612ca6565b52612e35565b96506001612e24565b50600190612e35565b5050959450505050815290565b5081871415612def565b5173ffffffffffffffffffffffffffffffffffffffff16955038612de3565b945050505050565b905038612dae565b5082612db0565b935038612d91565b60046040517f32c1995a000000000000000000000000000000000000000000000000000000008152fd5b90600182811c92168015612f29575b6020831014612efa57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691612eef565b601f8111612f3f575050565b600090600c82527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7906020601f850160051c83019410612f9a575b601f0160051c01915b828110612f8f57505050565b818155600101612f83565b9092508290612f7a565b601f8111612fb0575050565b600090600b82527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9906020601f850160051c8301941061300b575b601f0160051c01915b82811061300057505050565b818155600101612ff4565b9092508290612feb565b601f8111613021575050565b600090600e82527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd906020601f850160051c8301941061307c575b601f0160051c01915b82811061307157505050565b818155600101613065565b909250829061305c565b601f8111613092575050565b600090600d82527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5906020601f850160051c830194106130ed575b601f0160051c01915b8281106130e257505050565b8181556001016130d6565b90925082906130cd565b90815167ffffffffffffffff8111610e585761311d81613118600d54612ee0565b613086565b602080601f8311600114613158575081929360009261314d575b50506000198260011b9260031b1c191617600d55565b015190503880613137565b90601f1983169461318b600d6000527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb590565b926000905b8782106131c85750508360019596106131af575b505050811b01600d55565b015160001960f88460031b161c191690553880806131a4565b80600185968294968601518155019501930190613190565b90815167ffffffffffffffff8111610e585761320181611211600b54612ee0565b602080601f831160011461323c5750819293600092613231575b50506000198260011b9260031b1c191617600b55565b01519050388061321b565b90601f1983169461326f600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db990565b926000905b8782106132ac575050836001959610613293575b505050811b01600b55565b015160001960f88460031b161c19169055388080613288565b80600185968294968601518155019501930190613274565b90815167ffffffffffffffff8111610e58576132e58161147f600e54612ee0565b602080601f83116001146133205750819293600092613315575b50506000198260011b9260031b1c191617600e55565b0151905038806132ff565b90601f19831694613353600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd90565b926000905b878210613390575050836001959610613377575b505050811b01600e55565b015160001960f88460031b161c1916905538808061336c565b80600185968294968601518155019501930190613358565b95949392919073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000163314801590613564575b61353a5780519067ffffffffffffffff8211610e585761341482610f85600c54612ee0565b60209081601f84116001146134b757509361345d61346794846134879b9a9895613462956134829b99600092610fc05750506000198260011b9260031b1c191617600c556130f7565b6131e0565b6132c4565b61347084611dea565b61347984611ed8565b6104e484611fea565b612058565b610ea960017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600f541617600f55565b600c6000529190601f1984167fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7936000905b82821061352257505094600185613462956134829b999561345d956134879f9e9c996134679b1061102557505050811b01600c556130f7565b806001869782949787015181550196019401906134e9565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b5060ff600f54166133ef565b1561357757565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff83169161362e612710841115613570565b16918215613675577fffffffffffffffffffffffff000000000000000000000000000000000000000091602060405161366681610e3c565b858152015260a01b1617600855565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152fd5b6136dc81613791565b90811561372a575b81156136ff575b81156136f5575090565b610544915061373b565b7fffffffff0000000000000000000000000000000000000000000000000000000081161591506136eb565b90506137358161373b565b906136e4565b7f7965db0b000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082161490811561378b575090565b61054491505b7fffffffff00000000000000000000000000000000000000000000000000000000167f2a55205a0000000000000000000000000000000000000000000000000000000081149081156137e1575090565b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150149056fea2646970667358221220f03d4dcfa8e722f6c0f34832aa991be3e5afcbddeb42991b394707f910ded1a764736f6c63430008130033', + signer + ) + } +} + +export const ERC721MINTERFACTORY_VERIFICATION: Omit = { + contractToVerify: 'src/tokens/ERC721/presets/minter/ERC721TokenMinterFactory.sol:ERC721TokenMinterFactory', + version: 'v0.8.19+commit.7dd6d404', + compilerInput: { + language: 'Solidity', + sources: { + 'node_modules/@openzeppelin/contracts/access/AccessControl.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IAccessControl.sol";\nimport "../utils/Context.sol";\nimport "../utils/Strings.sol";\nimport "../utils/introspection/ERC165.sol";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn\'t allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role\'s admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n "AccessControl: account ",\n Strings.toHexString(account),\n " is missing role ",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role\'s admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function\'s\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), "AccessControl: can only renounce roles for self");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn\'t perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``\'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/access/IAccessControl.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + 'node_modules/@openzeppelin/contracts/access/Ownable.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/Context.sol";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), "Ownable: caller is not the owner");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), "Ownable: new owner is the zero address");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.9._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/IERC2981.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/introspection/IERC165.sol";\n\n/**\n * @dev Interface for the NFT Royalty Standard.\n *\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\n *\n * _Available since v4.5._\n */\ninterface IERC2981 is IERC165 {\n /**\n * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\n * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\n */\n function royaltyInfo(uint256 tokenId, uint256 salePrice)\n external\n view\n returns (address receiver, uint256 royaltyAmount);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport "../beacon/IBeacon.sol";\nimport "../../interfaces/IERC1967.sol";\nimport "../../interfaces/draft-IERC1822.sol";\nimport "../../utils/Address.sol";\nimport "../../utils/StorageSlot.sol";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");\n } catch {\n revert("ERC1967Upgrade: new implementation is not UUPS");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), "ERC1967: new admin is the zero address");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256(\'eip1967.proxy.beacon\')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n "ERC1967: beacon implementation is not a contract"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/Proxy.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IBeacon.sol";\nimport "../../access/Ownable.sol";\nimport "../../utils/Address.sol";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n constructor(address implementation_) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract");\n _implementation = newImplementation;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/token/common/ERC2981.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport "../../interfaces/IERC2981.sol";\nimport "../../utils/introspection/ERC165.sol";\n\n/**\n * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.\n *\n * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for\n * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.\n *\n * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the\n * fee is specified in basis points by default.\n *\n * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See\n * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to\n * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.\n *\n * _Available since v4.5._\n */\nabstract contract ERC2981 is IERC2981, ERC165 {\n struct RoyaltyInfo {\n address receiver;\n uint96 royaltyFraction;\n }\n\n RoyaltyInfo private _defaultRoyaltyInfo;\n mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @inheritdoc IERC2981\n */\n function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {\n RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];\n\n if (royalty.receiver == address(0)) {\n royalty = _defaultRoyaltyInfo;\n }\n\n uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();\n\n return (royalty.receiver, royaltyAmount);\n }\n\n /**\n * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a\n * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an\n * override.\n */\n function _feeDenominator() internal pure virtual returns (uint96) {\n return 10000;\n }\n\n /**\n * @dev Sets the royalty information that all ids in this contract will default to.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {\n require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");\n require(receiver != address(0), "ERC2981: invalid receiver");\n\n _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Removes default royalty information.\n */\n function _deleteDefaultRoyalty() internal virtual {\n delete _defaultRoyaltyInfo;\n }\n\n /**\n * @dev Sets the royalty information for a specific token id, overriding the global default.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setTokenRoyalty(\n uint256 tokenId,\n address receiver,\n uint96 feeNumerator\n ) internal virtual {\n require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");\n require(receiver != address(0), "ERC2981: Invalid parameters");\n\n _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Resets royalty information for the token id back to the global default.\n */\n function _resetTokenRoyalty(uint256 tokenId) internal virtual {\n delete _tokenRoyaltyInfo[tokenId];\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Address.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn\'t rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity\'s `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, "Address: low-level call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, "Address: insufficient balance for call");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, "Address: low-level static call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, "Address: low-level delegate call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), "Address: call to non-contract");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn\'t, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Context.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Create2.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Create2.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as \'counterfactual interactions\'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(\n uint256 amount,\n bytes32 salt,\n bytes memory bytecode\n ) internal returns (address addr) {\n require(address(this).balance >= amount, "Create2: insufficient balance");\n require(bytecode.length != 0, "Create2: bytecode length is zero");\n /// @solidity memory-safe-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), "Create2: Failed on deploy");\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract\'s address, returns the same value as {computeAddress}.\n */\n function computeAddress(\n bytes32 salt,\n bytes32 bytecodeHash,\n address deployer\n ) internal pure returns (address addr) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40) // Get free memory pointer\n\n // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... |\n // |-------------------|---------------------------------------------------------------------------|\n // | bytecodeHash | CCCCCCCCCCCCC...CC |\n // | salt | BBBBBBBBBBBBB...BB |\n // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA |\n // | 0xFF | FF |\n // |-------------------|---------------------------------------------------------------------------|\n // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |\n // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |\n\n mstore(add(ptr, 0x40), bytecodeHash)\n mstore(add(ptr, 0x20), salt)\n mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes\n let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff\n mstore8(start, 0xff)\n addr := keccak256(start, 85)\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/StorageSlot.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Strings.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport "./math/Math.sol";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = "0123456789abcdef";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = "0";\n buffer[1] = "x";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, "Strings: hex length insufficient");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IERC165.sol";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/math/Math.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + 'node_modules/erc721a/contracts/ERC721A.sol': { + content: + "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.3\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport './IERC721A.sol';\n\n/**\n * @dev Interface of ERC721 token receiver.\n */\ninterface ERC721A__IERC721Receiver {\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n\n/**\n * @title ERC721A\n *\n * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)\n * Non-Fungible Token Standard, including the Metadata extension.\n * Optimized for lower gas during batch mints.\n *\n * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)\n * starting from `_startTokenId()`.\n *\n * Assumptions:\n *\n * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.\n * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).\n */\ncontract ERC721A is IERC721A {\n // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).\n struct TokenApprovalRef {\n address value;\n }\n\n // =============================================================\n // CONSTANTS\n // =============================================================\n\n // Mask of an entry in packed address data.\n uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;\n\n // The bit position of `numberMinted` in packed address data.\n uint256 private constant _BITPOS_NUMBER_MINTED = 64;\n\n // The bit position of `numberBurned` in packed address data.\n uint256 private constant _BITPOS_NUMBER_BURNED = 128;\n\n // The bit position of `aux` in packed address data.\n uint256 private constant _BITPOS_AUX = 192;\n\n // Mask of all 256 bits in packed address data except the 64 bits for `aux`.\n uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;\n\n // The bit position of `startTimestamp` in packed ownership.\n uint256 private constant _BITPOS_START_TIMESTAMP = 160;\n\n // The bit mask of the `burned` bit in packed ownership.\n uint256 private constant _BITMASK_BURNED = 1 << 224;\n\n // The bit position of the `nextInitialized` bit in packed ownership.\n uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;\n\n // The bit mask of the `nextInitialized` bit in packed ownership.\n uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;\n\n // The bit position of `extraData` in packed ownership.\n uint256 private constant _BITPOS_EXTRA_DATA = 232;\n\n // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.\n uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;\n\n // The mask of the lower 160 bits for addresses.\n uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;\n\n // The maximum `quantity` that can be minted with {_mintERC2309}.\n // This limit is to prevent overflows on the address data entries.\n // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}\n // is required to cause an overflow, which is unrealistic.\n uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;\n\n // The `Transfer` event signature is given by:\n // `keccak256(bytes(\"Transfer(address,address,uint256)\"))`.\n bytes32 private constant _TRANSFER_EVENT_SIGNATURE =\n 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n\n // =============================================================\n // STORAGE\n // =============================================================\n\n // The next token ID to be minted.\n uint256 private _currentIndex;\n\n // The number of tokens burned.\n uint256 private _burnCounter;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to ownership details\n // An empty struct value does not necessarily mean the token is unowned.\n // See {_packedOwnershipOf} implementation for details.\n //\n // Bits Layout:\n // - [0..159] `addr`\n // - [160..223] `startTimestamp`\n // - [224] `burned`\n // - [225] `nextInitialized`\n // - [232..255] `extraData`\n mapping(uint256 => uint256) private _packedOwnerships;\n\n // Mapping owner address to address data.\n //\n // Bits Layout:\n // - [0..63] `balance`\n // - [64..127] `numberMinted`\n // - [128..191] `numberBurned`\n // - [192..255] `aux`\n mapping(address => uint256) private _packedAddressData;\n\n // Mapping from token ID to approved address.\n mapping(uint256 => TokenApprovalRef) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n // =============================================================\n // CONSTRUCTOR\n // =============================================================\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n _currentIndex = _startTokenId();\n }\n\n // =============================================================\n // TOKEN COUNTING OPERATIONS\n // =============================================================\n\n /**\n * @dev Returns the starting token ID.\n * To change the starting token ID, please override this function.\n */\n function _startTokenId() internal view virtual returns (uint256) {\n return 0;\n }\n\n /**\n * @dev Returns the next token ID to be minted.\n */\n function _nextTokenId() internal view virtual returns (uint256) {\n return _currentIndex;\n }\n\n /**\n * @dev Returns the total number of tokens in existence.\n * Burned tokens will reduce the count.\n * To get the total number of tokens minted, please see {_totalMinted}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n // Counter underflow is impossible as _burnCounter cannot be incremented\n // more than `_currentIndex - _startTokenId()` times.\n unchecked {\n return _currentIndex - _burnCounter - _startTokenId();\n }\n }\n\n /**\n * @dev Returns the total amount of tokens minted in the contract.\n */\n function _totalMinted() internal view virtual returns (uint256) {\n // Counter underflow is impossible as `_currentIndex` does not decrement,\n // and it is initialized to `_startTokenId()`.\n unchecked {\n return _currentIndex - _startTokenId();\n }\n }\n\n /**\n * @dev Returns the total number of tokens burned.\n */\n function _totalBurned() internal view virtual returns (uint256) {\n return _burnCounter;\n }\n\n // =============================================================\n // ADDRESS DATA OPERATIONS\n // =============================================================\n\n /**\n * @dev Returns the number of tokens in `owner`'s account.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n if (owner == address(0)) revert BalanceQueryForZeroAddress();\n return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n /**\n * Returns the number of tokens minted by `owner`.\n */\n function _numberMinted(address owner) internal view returns (uint256) {\n return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n /**\n * Returns the number of tokens burned by or on behalf of `owner`.\n */\n function _numberBurned(address owner) internal view returns (uint256) {\n return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n /**\n * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).\n */\n function _getAux(address owner) internal view returns (uint64) {\n return uint64(_packedAddressData[owner] >> _BITPOS_AUX);\n }\n\n /**\n * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).\n * If there are multiple variables, please pack them into a uint64.\n */\n function _setAux(address owner, uint64 aux) internal virtual {\n uint256 packed = _packedAddressData[owner];\n uint256 auxCasted;\n // Cast `aux` with assembly to avoid redundant masking.\n assembly {\n auxCasted := aux\n }\n packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);\n _packedAddressData[owner] = packed;\n }\n\n // =============================================================\n // IERC165\n // =============================================================\n\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30000 gas.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // The interface IDs are constants representing the first 4 bytes\n // of the XOR of all function selectors in the interface.\n // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)\n // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)\n return\n interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.\n interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.\n interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.\n }\n\n // =============================================================\n // IERC721Metadata\n // =============================================================\n\n /**\n * @dev Returns the token collection name.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, it can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return '';\n }\n\n // =============================================================\n // OWNERSHIPS OPERATIONS\n // =============================================================\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n return address(uint160(_packedOwnershipOf(tokenId)));\n }\n\n /**\n * @dev Gas spent here starts off proportional to the maximum mint batch size.\n * It gradually moves to O(1) as tokens get transferred around over time.\n */\n function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {\n return _unpackedOwnership(_packedOwnershipOf(tokenId));\n }\n\n /**\n * @dev Returns the unpacked `TokenOwnership` struct at `index`.\n */\n function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {\n return _unpackedOwnership(_packedOwnerships[index]);\n }\n\n /**\n * @dev Initializes the ownership slot minted at `index` for efficiency purposes.\n */\n function _initializeOwnershipAt(uint256 index) internal virtual {\n if (_packedOwnerships[index] == 0) {\n _packedOwnerships[index] = _packedOwnershipOf(index);\n }\n }\n\n /**\n * Returns the packed ownership data of `tokenId`.\n */\n function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {\n uint256 curr = tokenId;\n\n unchecked {\n if (_startTokenId() <= curr)\n if (curr < _currentIndex) {\n uint256 packed = _packedOwnerships[curr];\n // If not burned.\n if (packed & _BITMASK_BURNED == 0) {\n // Invariant:\n // There will always be an initialized ownership slot\n // (i.e. `ownership.addr != address(0) && ownership.burned == false`)\n // before an unintialized ownership slot\n // (i.e. `ownership.addr == address(0) && ownership.burned == false`)\n // Hence, `curr` will not underflow.\n //\n // We can directly compare the packed value.\n // If the address is zero, packed will be zero.\n while (packed == 0) {\n packed = _packedOwnerships[--curr];\n }\n return packed;\n }\n }\n }\n revert OwnerQueryForNonexistentToken();\n }\n\n /**\n * @dev Returns the unpacked `TokenOwnership` struct from `packed`.\n */\n function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {\n ownership.addr = address(uint160(packed));\n ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);\n ownership.burned = packed & _BITMASK_BURNED != 0;\n ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);\n }\n\n /**\n * @dev Packs ownership data into a single uint256.\n */\n function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {\n assembly {\n // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.\n owner := and(owner, _BITMASK_ADDRESS)\n // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.\n result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))\n }\n }\n\n /**\n * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.\n */\n function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {\n // For branchless setting of the `nextInitialized` flag.\n assembly {\n // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.\n result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))\n }\n }\n\n // =============================================================\n // APPROVAL OPERATIONS\n // =============================================================\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the\n * zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) public payable virtual override {\n address owner = ownerOf(tokenId);\n\n if (_msgSenderERC721A() != owner)\n if (!isApprovedForAll(owner, _msgSenderERC721A())) {\n revert ApprovalCallerNotOwnerNorApproved();\n }\n\n _tokenApprovals[tokenId].value = to;\n emit Approval(owner, to, tokenId);\n }\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();\n\n return _tokenApprovals[tokenId].value;\n }\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom}\n * for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _operatorApprovals[_msgSenderERC721A()][operator] = approved;\n emit ApprovalForAll(_msgSenderERC721A(), operator, approved);\n }\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted. See {_mint}.\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return\n _startTokenId() <= tokenId &&\n tokenId < _currentIndex && // If within bounds,\n _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.\n }\n\n /**\n * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.\n */\n function _isSenderApprovedOrOwner(\n address approvedAddress,\n address owner,\n address msgSender\n ) private pure returns (bool result) {\n assembly {\n // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.\n owner := and(owner, _BITMASK_ADDRESS)\n // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.\n msgSender := and(msgSender, _BITMASK_ADDRESS)\n // `msgSender == owner || msgSender == approvedAddress`.\n result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))\n }\n }\n\n /**\n * @dev Returns the storage slot and value for the approved address of `tokenId`.\n */\n function _getApprovedSlotAndAddress(uint256 tokenId)\n private\n view\n returns (uint256 approvedAddressSlot, address approvedAddress)\n {\n TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];\n // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.\n assembly {\n approvedAddressSlot := tokenApproval.slot\n approvedAddress := sload(approvedAddressSlot)\n }\n }\n\n // =============================================================\n // TRANSFER OPERATIONS\n // =============================================================\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token\n * by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public payable virtual override {\n uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();\n\n (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);\n\n // The nested ifs save around 20+ gas over a compound boolean condition.\n if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))\n if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();\n\n if (to == address(0)) revert TransferToZeroAddress();\n\n _beforeTokenTransfers(from, to, tokenId, 1);\n\n // Clear approvals from the previous owner.\n assembly {\n if approvedAddress {\n // This is equivalent to `delete _tokenApprovals[tokenId]`.\n sstore(approvedAddressSlot, 0)\n }\n }\n\n // Underflow of the sender's balance is impossible because we check for\n // ownership above and the recipient's balance can't realistically overflow.\n // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.\n unchecked {\n // We can directly increment and decrement the balances.\n --_packedAddressData[from]; // Updates: `balance -= 1`.\n ++_packedAddressData[to]; // Updates: `balance += 1`.\n\n // Updates:\n // - `address` to the next owner.\n // - `startTimestamp` to the timestamp of transfering.\n // - `burned` to `false`.\n // - `nextInitialized` to `true`.\n _packedOwnerships[tokenId] = _packOwnershipData(\n to,\n _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)\n );\n\n // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .\n if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {\n uint256 nextTokenId = tokenId + 1;\n // If the next slot's address is zero and not burned (i.e. packed value is zero).\n if (_packedOwnerships[nextTokenId] == 0) {\n // If the next slot is within bounds.\n if (nextTokenId != _currentIndex) {\n // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.\n _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n }\n }\n }\n }\n\n emit Transfer(from, to, tokenId);\n _afterTokenTransfers(from, to, tokenId, 1);\n }\n\n /**\n * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public payable virtual override {\n safeTransferFrom(from, to, tokenId, '');\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token\n * by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement\n * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) public payable virtual override {\n transferFrom(from, to, tokenId);\n if (to.code.length != 0)\n if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {\n revert TransferToNonERC721ReceiverImplementer();\n }\n }\n\n /**\n * @dev Hook that is called before a set of serially-ordered token IDs\n * are about to be transferred. This includes minting.\n * And also called before burning one token.\n *\n * `startTokenId` - the first token ID to be transferred.\n * `quantity` - the amount to be transferred.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, `tokenId` will be burned by `from`.\n * - `from` and `to` are never both zero.\n */\n function _beforeTokenTransfers(\n address from,\n address to,\n uint256 startTokenId,\n uint256 quantity\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after a set of serially-ordered token IDs\n * have been transferred. This includes minting.\n * And also called after one token has been burned.\n *\n * `startTokenId` - the first token ID to be transferred.\n * `quantity` - the amount to be transferred.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been\n * transferred to `to`.\n * - When `from` is zero, `tokenId` has been minted for `to`.\n * - When `to` is zero, `tokenId` has been burned by `from`.\n * - `from` and `to` are never both zero.\n */\n function _afterTokenTransfers(\n address from,\n address to,\n uint256 startTokenId,\n uint256 quantity\n ) internal virtual {}\n\n /**\n * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.\n *\n * `from` - Previous owner of the given token ID.\n * `to` - Target address that will receive the token.\n * `tokenId` - Token ID to be transferred.\n * `_data` - Optional data to send along with the call.\n *\n * Returns whether the call correctly returned the expected magic value.\n */\n function _checkContractOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) private returns (bool) {\n try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (\n bytes4 retval\n ) {\n return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert TransferToNonERC721ReceiverImplementer();\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n }\n\n // =============================================================\n // MINT OPERATIONS\n // =============================================================\n\n /**\n * @dev Mints `quantity` tokens and transfers them to `to`.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `quantity` must be greater than 0.\n *\n * Emits a {Transfer} event for each mint.\n */\n function _mint(address to, uint256 quantity) internal virtual {\n uint256 startTokenId = _currentIndex;\n if (quantity == 0) revert MintZeroQuantity();\n\n _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n // Overflows are incredibly unrealistic.\n // `balance` and `numberMinted` have a maximum limit of 2**64.\n // `tokenId` has a maximum limit of 2**256.\n unchecked {\n // Updates:\n // - `balance += quantity`.\n // - `numberMinted += quantity`.\n //\n // We can directly add to the `balance` and `numberMinted`.\n _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);\n\n // Updates:\n // - `address` to the owner.\n // - `startTimestamp` to the timestamp of minting.\n // - `burned` to `false`.\n // - `nextInitialized` to `quantity == 1`.\n _packedOwnerships[startTokenId] = _packOwnershipData(\n to,\n _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)\n );\n\n uint256 toMasked;\n uint256 end = startTokenId + quantity;\n\n // Use assembly to loop and emit the `Transfer` event for gas savings.\n // The duplicated `log4` removes an extra check and reduces stack juggling.\n // The assembly, together with the surrounding Solidity code, have been\n // delicately arranged to nudge the compiler into producing optimized opcodes.\n assembly {\n // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.\n toMasked := and(to, _BITMASK_ADDRESS)\n // Emit the `Transfer` event.\n log4(\n 0, // Start of data (0, since no data).\n 0, // End of data (0, since no data).\n _TRANSFER_EVENT_SIGNATURE, // Signature.\n 0, // `address(0)`.\n toMasked, // `to`.\n startTokenId // `tokenId`.\n )\n\n // The `iszero(eq(,))` check ensures that large values of `quantity`\n // that overflows uint256 will make the loop run out of gas.\n // The compiler will optimize the `iszero` away for performance.\n for {\n let tokenId := add(startTokenId, 1)\n } iszero(eq(tokenId, end)) {\n tokenId := add(tokenId, 1)\n } {\n // Emit the `Transfer` event. Similar to above.\n log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)\n }\n }\n if (toMasked == 0) revert MintToZeroAddress();\n\n _currentIndex = end;\n }\n _afterTokenTransfers(address(0), to, startTokenId, quantity);\n }\n\n /**\n * @dev Mints `quantity` tokens and transfers them to `to`.\n *\n * This function is intended for efficient minting only during contract creation.\n *\n * It emits only one {ConsecutiveTransfer} as defined in\n * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),\n * instead of a sequence of {Transfer} event(s).\n *\n * Calling this function outside of contract creation WILL make your contract\n * non-compliant with the ERC721 standard.\n * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309\n * {ConsecutiveTransfer} event is only permissible during contract creation.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `quantity` must be greater than 0.\n *\n * Emits a {ConsecutiveTransfer} event.\n */\n function _mintERC2309(address to, uint256 quantity) internal virtual {\n uint256 startTokenId = _currentIndex;\n if (to == address(0)) revert MintToZeroAddress();\n if (quantity == 0) revert MintZeroQuantity();\n if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();\n\n _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n // Overflows are unrealistic due to the above check for `quantity` to be below the limit.\n unchecked {\n // Updates:\n // - `balance += quantity`.\n // - `numberMinted += quantity`.\n //\n // We can directly add to the `balance` and `numberMinted`.\n _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);\n\n // Updates:\n // - `address` to the owner.\n // - `startTimestamp` to the timestamp of minting.\n // - `burned` to `false`.\n // - `nextInitialized` to `quantity == 1`.\n _packedOwnerships[startTokenId] = _packOwnershipData(\n to,\n _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)\n );\n\n emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);\n\n _currentIndex = startTokenId + quantity;\n }\n _afterTokenTransfers(address(0), to, startTokenId, quantity);\n }\n\n /**\n * @dev Safely mints `quantity` tokens and transfers them to `to`.\n *\n * Requirements:\n *\n * - If `to` refers to a smart contract, it must implement\n * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.\n * - `quantity` must be greater than 0.\n *\n * See {_mint}.\n *\n * Emits a {Transfer} event for each mint.\n */\n function _safeMint(\n address to,\n uint256 quantity,\n bytes memory _data\n ) internal virtual {\n _mint(to, quantity);\n\n unchecked {\n if (to.code.length != 0) {\n uint256 end = _currentIndex;\n uint256 index = end - quantity;\n do {\n if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {\n revert TransferToNonERC721ReceiverImplementer();\n }\n } while (index < end);\n // Reentrancy protection.\n if (_currentIndex != end) revert();\n }\n }\n }\n\n /**\n * @dev Equivalent to `_safeMint(to, quantity, '')`.\n */\n function _safeMint(address to, uint256 quantity) internal virtual {\n _safeMint(to, quantity, '');\n }\n\n // =============================================================\n // BURN OPERATIONS\n // =============================================================\n\n /**\n * @dev Equivalent to `_burn(tokenId, false)`.\n */\n function _burn(uint256 tokenId) internal virtual {\n _burn(tokenId, false);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId, bool approvalCheck) internal virtual {\n uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n address from = address(uint160(prevOwnershipPacked));\n\n (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);\n\n if (approvalCheck) {\n // The nested ifs save around 20+ gas over a compound boolean condition.\n if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))\n if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();\n }\n\n _beforeTokenTransfers(from, address(0), tokenId, 1);\n\n // Clear approvals from the previous owner.\n assembly {\n if approvedAddress {\n // This is equivalent to `delete _tokenApprovals[tokenId]`.\n sstore(approvedAddressSlot, 0)\n }\n }\n\n // Underflow of the sender's balance is impossible because we check for\n // ownership above and the recipient's balance can't realistically overflow.\n // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.\n unchecked {\n // Updates:\n // - `balance -= 1`.\n // - `numberBurned += 1`.\n //\n // We can directly decrement the balance, and increment the number burned.\n // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.\n _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;\n\n // Updates:\n // - `address` to the last owner.\n // - `startTimestamp` to the timestamp of burning.\n // - `burned` to `true`.\n // - `nextInitialized` to `true`.\n _packedOwnerships[tokenId] = _packOwnershipData(\n from,\n (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)\n );\n\n // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .\n if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {\n uint256 nextTokenId = tokenId + 1;\n // If the next slot's address is zero and not burned (i.e. packed value is zero).\n if (_packedOwnerships[nextTokenId] == 0) {\n // If the next slot is within bounds.\n if (nextTokenId != _currentIndex) {\n // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.\n _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n }\n }\n }\n }\n\n emit Transfer(from, address(0), tokenId);\n _afterTokenTransfers(from, address(0), tokenId, 1);\n\n // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.\n unchecked {\n _burnCounter++;\n }\n }\n\n // =============================================================\n // EXTRA DATA OPERATIONS\n // =============================================================\n\n /**\n * @dev Directly sets the extra data for the ownership data `index`.\n */\n function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {\n uint256 packed = _packedOwnerships[index];\n if (packed == 0) revert OwnershipNotInitializedForExtraData();\n uint256 extraDataCasted;\n // Cast `extraData` with assembly to avoid redundant masking.\n assembly {\n extraDataCasted := extraData\n }\n packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);\n _packedOwnerships[index] = packed;\n }\n\n /**\n * @dev Called during each token transfer to set the 24bit `extraData` field.\n * Intended to be overridden by the cosumer contract.\n *\n * `previousExtraData` - the value of `extraData` before transfer.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, `tokenId` will be burned by `from`.\n * - `from` and `to` are never both zero.\n */\n function _extraData(\n address from,\n address to,\n uint24 previousExtraData\n ) internal view virtual returns (uint24) {}\n\n /**\n * @dev Returns the next extra data for the packed ownership data.\n * The returned result is shifted into position.\n */\n function _nextExtraData(\n address from,\n address to,\n uint256 prevOwnershipPacked\n ) private view returns (uint256) {\n uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);\n return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;\n }\n\n // =============================================================\n // OTHER OPERATIONS\n // =============================================================\n\n /**\n * @dev Returns the message sender (defaults to `msg.sender`).\n *\n * If you are writing GSN compatible contracts, you need to override this function.\n */\n function _msgSenderERC721A() internal view virtual returns (address) {\n return msg.sender;\n }\n\n /**\n * @dev Converts a uint256 to its ASCII string decimal representation.\n */\n function _toString(uint256 value) internal pure virtual returns (string memory str) {\n assembly {\n // The maximum value of a uint256 contains 78 digits (1 byte per digit), but\n // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.\n // We will need 1 word for the trailing zeros padding, 1 word for the length,\n // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.\n let m := add(mload(0x40), 0xa0)\n // Update the free memory pointer to allocate.\n mstore(0x40, m)\n // Assign the `str` to the end.\n str := sub(m, 0x20)\n // Zeroize the slot after the string.\n mstore(str, 0)\n\n // Cache the end of the memory to calculate the length later.\n let end := str\n\n // We write the string from rightmost digit to leftmost digit.\n // The following is essentially a do-while loop that also handles the zero case.\n // prettier-ignore\n for { let temp := value } 1 {} {\n str := sub(str, 1)\n // Write the character to the pointer.\n // The ASCII index of the '0' character is 48.\n mstore8(str, add(48, mod(temp, 10)))\n // Keep dividing `temp` until zero.\n temp := div(temp, 10)\n // prettier-ignore\n if iszero(temp) { break }\n }\n\n let length := sub(end, str)\n // Move the pointer 32 bytes leftwards to make room for the length.\n str := sub(str, 0x20)\n // Store the length.\n mstore(str, length)\n }\n }\n}\n" + }, + 'node_modules/erc721a/contracts/IERC721A.sol': { + content: + "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.3\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\n/**\n * @dev Interface of ERC721A.\n */\ninterface IERC721A {\n /**\n * The caller must own the token or be an approved operator.\n */\n error ApprovalCallerNotOwnerNorApproved();\n\n /**\n * The token does not exist.\n */\n error ApprovalQueryForNonexistentToken();\n\n /**\n * Cannot query the balance for the zero address.\n */\n error BalanceQueryForZeroAddress();\n\n /**\n * Cannot mint to the zero address.\n */\n error MintToZeroAddress();\n\n /**\n * The quantity of tokens minted must be more than zero.\n */\n error MintZeroQuantity();\n\n /**\n * The token does not exist.\n */\n error OwnerQueryForNonexistentToken();\n\n /**\n * The caller must own the token or be an approved operator.\n */\n error TransferCallerNotOwnerNorApproved();\n\n /**\n * The token must be owned by `from`.\n */\n error TransferFromIncorrectOwner();\n\n /**\n * Cannot safely transfer to a contract that does not implement the\n * ERC721Receiver interface.\n */\n error TransferToNonERC721ReceiverImplementer();\n\n /**\n * Cannot transfer to the zero address.\n */\n error TransferToZeroAddress();\n\n /**\n * The token does not exist.\n */\n error URIQueryForNonexistentToken();\n\n /**\n * The `quantity` minted with ERC2309 exceeds the safety limit.\n */\n error MintERC2309QuantityExceedsLimit();\n\n /**\n * The `extraData` cannot be set on an unintialized ownership slot.\n */\n error OwnershipNotInitializedForExtraData();\n\n // =============================================================\n // STRUCTS\n // =============================================================\n\n struct TokenOwnership {\n // The address of the owner.\n address addr;\n // Stores the start time of ownership with minimal overhead for tokenomics.\n uint64 startTimestamp;\n // Whether the token has been burned.\n bool burned;\n // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.\n uint24 extraData;\n }\n\n // =============================================================\n // TOKEN COUNTERS\n // =============================================================\n\n /**\n * @dev Returns the total number of tokens in existence.\n * Burned tokens will reduce the count.\n * To get the total number of tokens minted, please see {_totalMinted}.\n */\n function totalSupply() external view returns (uint256);\n\n // =============================================================\n // IERC165\n // =============================================================\n\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n // =============================================================\n // IERC721\n // =============================================================\n\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables\n * (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in `owner`'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`,\n * checking first that contract recipients are aware of the ERC721 protocol\n * to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move\n * this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement\n * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external payable;\n\n /**\n * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external payable;\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom}\n * whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token\n * by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external payable;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the\n * zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external payable;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom}\n * for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n // =============================================================\n // IERC721Metadata\n // =============================================================\n\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n\n // =============================================================\n // IERC2309\n // =============================================================\n\n /**\n * @dev Emitted when tokens in `fromTokenId` to `toTokenId`\n * (inclusive) is transferred from `from` to `to`, as defined in the\n * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.\n *\n * See {_mintERC2309} for more details.\n */\n event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);\n}\n" + }, + 'node_modules/erc721a/contracts/extensions/ERC721AQueryable.sol': { + content: + "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.3\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport './IERC721AQueryable.sol';\nimport '../ERC721A.sol';\n\n/**\n * @title ERC721AQueryable.\n *\n * @dev ERC721A subclass with convenience query functions.\n */\nabstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {\n /**\n * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.\n *\n * If the `tokenId` is out of bounds:\n *\n * - `addr = address(0)`\n * - `startTimestamp = 0`\n * - `burned = false`\n * - `extraData = 0`\n *\n * If the `tokenId` is burned:\n *\n * - `addr =
`\n * - `startTimestamp = `\n * - `burned = true`\n * - `extraData = `\n *\n * Otherwise:\n *\n * - `addr =
`\n * - `startTimestamp = `\n * - `burned = false`\n * - `extraData = `\n */\n function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) {\n TokenOwnership memory ownership;\n if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) {\n return ownership;\n }\n ownership = _ownershipAt(tokenId);\n if (ownership.burned) {\n return ownership;\n }\n return _ownershipOf(tokenId);\n }\n\n /**\n * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.\n * See {ERC721AQueryable-explicitOwnershipOf}\n */\n function explicitOwnershipsOf(uint256[] calldata tokenIds)\n external\n view\n virtual\n override\n returns (TokenOwnership[] memory)\n {\n unchecked {\n uint256 tokenIdsLength = tokenIds.length;\n TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);\n for (uint256 i; i != tokenIdsLength; ++i) {\n ownerships[i] = explicitOwnershipOf(tokenIds[i]);\n }\n return ownerships;\n }\n }\n\n /**\n * @dev Returns an array of token IDs owned by `owner`,\n * in the range [`start`, `stop`)\n * (i.e. `start <= tokenId < stop`).\n *\n * This function allows for tokens to be queried if the collection\n * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.\n *\n * Requirements:\n *\n * - `start < stop`\n */\n function tokensOfOwnerIn(\n address owner,\n uint256 start,\n uint256 stop\n ) external view virtual override returns (uint256[] memory) {\n unchecked {\n if (start >= stop) revert InvalidQueryRange();\n uint256 tokenIdsIdx;\n uint256 stopLimit = _nextTokenId();\n // Set `start = max(start, _startTokenId())`.\n if (start < _startTokenId()) {\n start = _startTokenId();\n }\n // Set `stop = min(stop, stopLimit)`.\n if (stop > stopLimit) {\n stop = stopLimit;\n }\n uint256 tokenIdsMaxLength = balanceOf(owner);\n // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,\n // to cater for cases where `balanceOf(owner)` is too big.\n if (start < stop) {\n uint256 rangeLength = stop - start;\n if (rangeLength < tokenIdsMaxLength) {\n tokenIdsMaxLength = rangeLength;\n }\n } else {\n tokenIdsMaxLength = 0;\n }\n uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);\n if (tokenIdsMaxLength == 0) {\n return tokenIds;\n }\n // We need to call `explicitOwnershipOf(start)`,\n // because the slot at `start` may not be initialized.\n TokenOwnership memory ownership = explicitOwnershipOf(start);\n address currOwnershipAddr;\n // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.\n // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.\n if (!ownership.burned) {\n currOwnershipAddr = ownership.addr;\n }\n for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {\n ownership = _ownershipAt(i);\n if (ownership.burned) {\n continue;\n }\n if (ownership.addr != address(0)) {\n currOwnershipAddr = ownership.addr;\n }\n if (currOwnershipAddr == owner) {\n tokenIds[tokenIdsIdx++] = i;\n }\n }\n // Downsize the array to fit.\n assembly {\n mstore(tokenIds, tokenIdsIdx)\n }\n return tokenIds;\n }\n }\n\n /**\n * @dev Returns an array of token IDs owned by `owner`.\n *\n * This function scans the ownership mapping and is O(`totalSupply`) in complexity.\n * It is meant to be called off-chain.\n *\n * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into\n * multiple smaller scans if the collection is large enough to cause\n * an out-of-gas error (10K collections should be fine).\n */\n function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) {\n unchecked {\n uint256 tokenIdsIdx;\n address currOwnershipAddr;\n uint256 tokenIdsLength = balanceOf(owner);\n uint256[] memory tokenIds = new uint256[](tokenIdsLength);\n TokenOwnership memory ownership;\n for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {\n ownership = _ownershipAt(i);\n if (ownership.burned) {\n continue;\n }\n if (ownership.addr != address(0)) {\n currOwnershipAddr = ownership.addr;\n }\n if (currOwnershipAddr == owner) {\n tokenIds[tokenIdsIdx++] = i;\n }\n }\n return tokenIds;\n }\n }\n}\n" + }, + 'node_modules/erc721a/contracts/extensions/IERC721AQueryable.sol': { + content: + "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.3\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport '../IERC721A.sol';\n\n/**\n * @dev Interface of ERC721AQueryable.\n */\ninterface IERC721AQueryable is IERC721A {\n /**\n * Invalid query range (`start` >= `stop`).\n */\n error InvalidQueryRange();\n\n /**\n * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.\n *\n * If the `tokenId` is out of bounds:\n *\n * - `addr = address(0)`\n * - `startTimestamp = 0`\n * - `burned = false`\n * - `extraData = 0`\n *\n * If the `tokenId` is burned:\n *\n * - `addr =
`\n * - `startTimestamp = `\n * - `burned = true`\n * - `extraData = `\n *\n * Otherwise:\n *\n * - `addr =
`\n * - `startTimestamp = `\n * - `burned = false`\n * - `extraData = `\n */\n function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);\n\n /**\n * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.\n * See {ERC721AQueryable-explicitOwnershipOf}\n */\n function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);\n\n /**\n * @dev Returns an array of token IDs owned by `owner`,\n * in the range [`start`, `stop`)\n * (i.e. `start <= tokenId < stop`).\n *\n * This function allows for tokens to be queried if the collection\n * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.\n *\n * Requirements:\n *\n * - `start < stop`\n */\n function tokensOfOwnerIn(\n address owner,\n uint256 start,\n uint256 stop\n ) external view returns (uint256[] memory);\n\n /**\n * @dev Returns an array of token IDs owned by `owner`.\n *\n * This function scans the ownership mapping and is O(`totalSupply`) in complexity.\n * It is meant to be called off-chain.\n *\n * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into\n * multiple smaller scans if the collection is large enough to cause\n * an out-of-gas error (10K collections should be fine).\n */\n function tokensOfOwner(address owner) external view returns (uint256[] memory);\n}\n" + }, + 'src/proxies/SequenceProxyFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {\r\n TransparentUpgradeableBeaconProxy,\r\n ITransparentUpgradeableBeaconProxy\r\n} from "./TransparentUpgradeableBeaconProxy.sol";\r\n\r\nimport {Create2} from "@openzeppelin/contracts/utils/Create2.sol";\r\nimport {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";\r\nimport {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";\r\n\r\n/**\r\n * An proxy factory that deploys upgradeable beacon proxies.\r\n * @dev The factory owner is able to upgrade the beacon implementation.\r\n * @dev Proxy deployers are able to override the beacon reference with their own.\r\n */\r\nabstract contract SequenceProxyFactory is Ownable {\r\n UpgradeableBeacon public beacon;\r\n\r\n /**\r\n * Initialize a Sequence Proxy Factory.\r\n * @param implementation The initial beacon implementation.\r\n * @param factoryOwner The owner of the factory.\r\n */\r\n function _initialize(address implementation, address factoryOwner) internal {\r\n beacon = new UpgradeableBeacon(implementation);\r\n Ownable._transferOwnership(factoryOwner);\r\n }\r\n\r\n /**\r\n * Deploys and initializes a new proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @param _data The initialization data.\r\n * @return proxyAddress The address of the deployed proxy.\r\n */\r\n function _createProxy(bytes32 _salt, address _proxyOwner, bytes memory _data) internal returns (address proxyAddress) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes memory bytecode = type(TransparentUpgradeableBeaconProxy).creationCode;\r\n\r\n proxyAddress = Create2.deploy(0, saltedHash, bytecode);\r\n ITransparentUpgradeableBeaconProxy(payable(proxyAddress)).initialize(_proxyOwner, address(beacon), _data);\r\n }\r\n\r\n /**\r\n * Computes the address of a proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @return proxy The expected address of the deployed proxy.\r\n */\r\n function _computeProxyAddress(bytes32 _salt, address _proxyOwner, bytes memory _data) internal view returns (address) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes32 bytecodeHash = keccak256(type(TransparentUpgradeableBeaconProxy).creationCode);\r\n\r\n return Create2.computeAddress(saltedHash, bytecodeHash);\r\n }\r\n\r\n /**\r\n * Upgrades the beacon implementation.\r\n * @param implementation The new beacon implementation.\r\n */\r\n function upgradeBeacon(address implementation) public onlyOwner {\r\n beacon.upgradeTo(implementation);\r\n }\r\n}\r\n' + }, + 'src/proxies/TransparentUpgradeableBeaconProxy.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {BeaconProxy, Proxy} from "./openzeppelin/BeaconProxy.sol";\r\nimport {TransparentUpgradeableProxy, ERC1967Proxy} from "./openzeppelin/TransparentUpgradeableProxy.sol";\r\n\r\ninterface ITransparentUpgradeableBeaconProxy {\r\n function initialize(address admin, address beacon, bytes memory data) external;\r\n}\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * @dev As the underlying proxy implementation (TransparentUpgradeableProxy) allows the admin to call the implementation,\r\n * care must be taken to avoid proxy selector collisions. Implementation selectors must not conflict with the proxy selectors.\r\n * See https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * The proxy selectors are:\r\n * - 0xcf7a1d77: initialize\r\n * - 0x3659cfe6: upgradeTo (from TransparentUpgradeableProxy)\r\n * - 0x4f1ef286: upgradeToAndCall (from TransparentUpgradeableProxy)\r\n * - 0x8f283970: changeAdmin (from TransparentUpgradeableProxy)\r\n * - 0xf851a440: admin (from TransparentUpgradeableProxy)\r\n * - 0x5c60da1b: implementation (from TransparentUpgradeableProxy)\r\n */\r\ncontract TransparentUpgradeableBeaconProxy is TransparentUpgradeableProxy, BeaconProxy {\r\n /**\r\n * Decode the initialization data from the msg.data and call the initialize function.\r\n */\r\n function _dispatchInitialize() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n (address admin, address beacon, bytes memory data) = abi.decode(msg.data[4:], (address, address, bytes));\r\n initialize(admin, beacon, data);\r\n\r\n return "";\r\n }\r\n\r\n function initialize(address admin, address beacon, bytes memory data) internal {\r\n if (_admin() != address(0)) {\r\n // Redundant call. This function can only be called when the admin is not set.\r\n revert InvalidInitialization();\r\n }\r\n _changeAdmin(admin);\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n\r\n /**\r\n * @dev If the admin is not set, the fallback function is used to initialize the proxy.\r\n * @dev If the admin is set, the fallback function is used to delegatecall the implementation.\r\n */\r\n function _fallback() internal override (TransparentUpgradeableProxy, Proxy) {\r\n if (_getAdmin() == address(0)) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableBeaconProxy.initialize.selector) {\r\n ret = _dispatchInitialize();\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n }\r\n // When the admin is not set, the fallback function is used to initialize the proxy.\r\n revert InvalidInitialization();\r\n }\r\n TransparentUpgradeableProxy._fallback();\r\n }\r\n\r\n /**\r\n * Returns the current implementation address.\r\n * @dev This is the implementation address set by the admin, or the beacon implementation.\r\n */\r\n function _implementation() internal view override (ERC1967Proxy, BeaconProxy) returns (address) {\r\n address implementation = ERC1967Proxy._implementation();\r\n if (implementation != address(0)) {\r\n return implementation;\r\n }\r\n return BeaconProxy._implementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/BeaconProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\r\n *\r\n * The beacon address is stored in storage slot `uint256(keccak256(\'eip1967.proxy.beacon\')) - 1`, so that it doesn\'t\r\n * conflict with the storage layout of the implementation behind the proxy.\r\n *\r\n * _Available since v3.4._\r\n */\r\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current beacon address.\r\n */\r\n function _beacon() internal view virtual returns (address) {\r\n return _getBeacon();\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation address of the associated beacon.\r\n */\r\n function _implementation() internal view virtual override returns (address) {\r\n return IBeacon(_getBeacon()).implementation();\r\n }\r\n\r\n /**\r\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\r\n *\r\n * If `data` is nonempty, it\'s used as data in a delegate call to the implementation returned by the beacon.\r\n *\r\n * Requirements:\r\n *\r\n * - `beacon` must be a contract.\r\n * - The implementation returned by `beacon` must be a contract.\r\n */\r\n function _setBeacon(address beacon, bytes memory data) internal virtual {\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/ERC1967Proxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\r\n * implementation address that can be changed. This address is stored in storage in the location specified by\r\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn\'t conflict with the storage layout of the\r\n * implementation behind the proxy.\r\n */\r\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current implementation address.\r\n */\r\n function _implementation() internal view virtual override returns (address impl) {\r\n return ERC1967Upgrade._getImplementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/TransparentUpgradeableProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\r\n\r\n/// @notice This implementation is a copy of OpenZeppelin\'s with the following changes:\r\n/// - Pragma updated\r\n/// - Imports updated\r\n/// - Constructor removed\r\n/// - Allows admin to call implementation\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "./ERC1967Proxy.sol";\r\n\r\n/**\r\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\r\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\r\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\r\n * include them in the ABI so this interface must be used to interact with it.\r\n */\r\ninterface ITransparentUpgradeableProxy is IERC1967 {\r\n function admin() external view returns (address);\r\n\r\n function implementation() external view returns (address);\r\n\r\n function changeAdmin(address) external;\r\n\r\n function upgradeTo(address) external;\r\n\r\n function upgradeToAndCall(address, bytes memory) external payable;\r\n}\r\n\r\n/**\r\n * @dev This contract implements a proxy that is upgradeable by an admin.\r\n *\r\n * Unlike the original OpenZeppelin implementation, this contract does not prevent the admin from calling the implementation.\r\n * This potentially exposes the admin to a proxy selector attack. See\r\n * https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * When using this contract, you must ensure that the implementation function selectors do not clash with the proxy selectors.\r\n * The proxy selectors are:\r\n * - 0x3659cfe6: upgradeTo\r\n * - 0x4f1ef286: upgradeToAndCall\r\n * - 0x8f283970: changeAdmin\r\n * - 0xf851a440: admin\r\n * - 0x5c60da1b: implementation\r\n *\r\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\r\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\r\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\r\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\r\n * implementation.\r\n *\r\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\r\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\r\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\r\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\r\n */\r\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\r\n /**\r\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\r\n *\r\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\r\n * implementation provides a function with the same selector.\r\n */\r\n modifier ifAdmin() {\r\n if (msg.sender == _getAdmin()) {\r\n _;\r\n } else {\r\n _fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\r\n */\r\n function _fallback() internal virtual override {\r\n if (msg.sender == _getAdmin()) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\r\n ret = _dispatchUpgradeTo();\r\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\r\n ret = _dispatchUpgradeToAndCall();\r\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\r\n ret = _dispatchChangeAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\r\n ret = _dispatchAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\r\n ret = _dispatchImplementation();\r\n } else {\r\n // Call implementation\r\n return super._fallback();\r\n }\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n } else {\r\n super._fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\r\n */\r\n function _dispatchAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address admin = _getAdmin();\r\n return abi.encode(admin);\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\r\n */\r\n function _dispatchImplementation() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address implementation = _implementation();\r\n return abi.encode(implementation);\r\n }\r\n\r\n /**\r\n * @dev Changes the admin of the proxy.\r\n *\r\n * Emits an {AdminChanged} event.\r\n */\r\n function _dispatchChangeAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newAdmin = abi.decode(msg.data[4:], (address));\r\n _changeAdmin(newAdmin);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy.\r\n */\r\n function _dispatchUpgradeTo() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newImplementation = abi.decode(msg.data[4:], (address));\r\n _upgradeToAndCall(newImplementation, bytes(""), false);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\r\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\r\n * proxied contract.\r\n */\r\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\r\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\r\n _upgradeToAndCall(newImplementation, data, true);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\r\n */\r\n function _admin() internal view virtual returns (address) {\r\n return _getAdmin();\r\n }\r\n\r\n /**\r\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\r\n * emulate some proxy functions being non-payable while still allowing value to pass through.\r\n */\r\n function _requireZeroValue() internal {\r\n require(msg.value == 0);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC721/ERC721Token.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {\r\n ERC721AQueryable, IERC721AQueryable, ERC721A, IERC721A\r\n} from "erc721a/contracts/extensions/ERC721AQueryable.sol";\r\nimport {ERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/ERC2981Controlled.sol";\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * A standard base implementation of ERC-721 for use in Sequence library contracts.\r\n */\r\nabstract contract ERC721Token is ERC721AQueryable, ERC2981Controlled {\r\n bytes32 internal constant METADATA_ADMIN_ROLE = keccak256("METADATA_ADMIN_ROLE");\r\n\r\n string private _tokenBaseURI;\r\n string private _tokenName;\r\n string private _tokenSymbol;\r\n string private _contractURI;\r\n\r\n /**\r\n * Deploy contract.\r\n */\r\n constructor() ERC721A("", "") {}\r\n\r\n /**\r\n * Initialize contract.\r\n * @param owner The owner of the contract\r\n * @param tokenName Name of the token\r\n * @param tokenSymbol Symbol of the token\r\n * @param tokenBaseURI Base URI of the token\r\n * @param tokenContractURI Contract URI of the token\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function _initialize(\r\n address owner,\r\n string memory tokenName,\r\n string memory tokenSymbol,\r\n string memory tokenBaseURI,\r\n string memory tokenContractURI\r\n )\r\n internal\r\n {\r\n _tokenName = tokenName;\r\n _tokenSymbol = tokenSymbol;\r\n _tokenBaseURI = tokenBaseURI;\r\n _contractURI = tokenContractURI;\r\n\r\n _setupRole(DEFAULT_ADMIN_ROLE, owner);\r\n _setupRole(METADATA_ADMIN_ROLE, owner);\r\n _setupRole(ROYALTY_ADMIN_ROLE, owner);\r\n }\r\n\r\n //\r\n // Metadata\r\n //\r\n\r\n /**\r\n * Set name and symbol of token.\r\n * @param tokenName Name of token.\r\n * @param tokenSymbol Symbol of token.\r\n */\r\n function setNameAndSymbol(string memory tokenName, string memory tokenSymbol)\r\n external\r\n onlyRole(METADATA_ADMIN_ROLE)\r\n {\r\n _tokenName = tokenName;\r\n _tokenSymbol = tokenSymbol;\r\n }\r\n\r\n /**\r\n * Update the base URI of token\'s URI.\r\n * @param tokenBaseURI New base URI of token\'s URI\r\n */\r\n function setBaseMetadataURI(string memory tokenBaseURI) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _tokenBaseURI = tokenBaseURI;\r\n }\r\n\r\n /**\r\n * Update the contract URI of token\'s URI.\r\n * @param tokenContractURI New contract URI of token\'s URI\r\n * @notice Refer to https://docs.opensea.io/docs/contract-level-metadata\r\n */\r\n function setContractURI(string memory tokenContractURI) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _contractURI = tokenContractURI;\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Get the contract URI of token\'s URI.\r\n * @return Contract URI of token\'s URI\r\n * @notice Refer to https://docs.opensea.io/docs/contract-level-metadata\r\n */\r\n function contractURI() public view returns (string memory) {\r\n return _contractURI;\r\n }\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC721A, IERC721A, ERC2981Controlled)\r\n returns (bool)\r\n {\r\n return interfaceId == type(IERC721A).interfaceId || interfaceId == type(IERC721AQueryable).interfaceId\r\n || ERC721A.supportsInterface(interfaceId) || ERC2981Controlled.supportsInterface(interfaceId)\r\n || super.supportsInterface(interfaceId);\r\n }\r\n\r\n //\r\n // ERC721A Overrides\r\n //\r\n\r\n /**\r\n * Override the ERC721A baseURI function.\r\n */\r\n function _baseURI() internal view override returns (string memory) {\r\n return _tokenBaseURI;\r\n }\r\n\r\n /**\r\n * Override the ERC721A name function.\r\n */\r\n function name() public view override (ERC721A, IERC721A) returns (string memory) {\r\n return _tokenName;\r\n }\r\n\r\n /**\r\n * Override the ERC721A symbol function.\r\n */\r\n function symbol() public view override (ERC721A, IERC721A) returns (string memory) {\r\n return _tokenSymbol;\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC721/presets/minter/ERC721TokenMinter.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC721Token} from "@0xsequence/contracts-library/tokens/ERC721/ERC721Token.sol";\r\nimport {\r\n IERC721TokenMinter,\r\n IERC721TokenMinterFunctions\r\n} from "@0xsequence/contracts-library/tokens/ERC721/presets/minter/IERC721TokenMinter.sol";\r\n\r\n/**\r\n * An implementation of ERC-721 capable of minting when role provided.\r\n */\r\ncontract ERC721TokenMinter is ERC721Token, IERC721TokenMinter {\r\n bytes32 internal constant MINTER_ROLE = keccak256("MINTER_ROLE");\r\n\r\n address private immutable _initializer;\r\n bool private _initialized;\r\n\r\n /**\r\n * Deploy contract.\r\n */\r\n constructor() ERC721Token() {\r\n _initializer = msg.sender;\r\n }\r\n\r\n /**\r\n * Initialize contract.\r\n * @param owner The owner of the contract\r\n * @param tokenName Name of the token\r\n * @param tokenSymbol Symbol of the token\r\n * @param tokenBaseURI Base URI of the token\r\n * @param tokenContractURI Contract URI of the token\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function initialize(\r\n address owner,\r\n string memory tokenName,\r\n string memory tokenSymbol,\r\n string memory tokenBaseURI,\r\n string memory tokenContractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n public\r\n virtual\r\n {\r\n if (msg.sender != _initializer || _initialized) {\r\n revert InvalidInitialization();\r\n }\r\n\r\n ERC721Token._initialize(owner, tokenName, tokenSymbol, tokenBaseURI, tokenContractURI);\r\n _setDefaultRoyalty(royaltyReceiver, royaltyFeeNumerator);\r\n\r\n _setupRole(MINTER_ROLE, owner);\r\n\r\n _initialized = true;\r\n }\r\n\r\n //\r\n // Minting\r\n //\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param amount Amount of tokens to mint.\r\n */\r\n function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) {\r\n _mint(to, amount);\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\r\n return type(IERC721TokenMinterFunctions).interfaceId == interfaceId || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC721/presets/minter/ERC721TokenMinterFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IERC721TokenMinterFactory} from\r\n "@0xsequence/contracts-library/tokens/ERC721/presets/minter/IERC721TokenMinterFactory.sol";\r\nimport {ERC721TokenMinter} from "@0xsequence/contracts-library/tokens/ERC721/presets/minter/ERC721TokenMinter.sol";\r\nimport {SequenceProxyFactory} from "@0xsequence/contracts-library/proxies/SequenceProxyFactory.sol";\r\n\r\n/**\r\n * Deployer of ERC-721 Token Minter proxies.\r\n */\r\ncontract ERC721TokenMinterFactory is IERC721TokenMinterFactory, SequenceProxyFactory {\r\n /**\r\n * Creates an ERC-721 Token Minter Factory.\r\n * @param factoryOwner The owner of the ERC-721 Token Minter Factory\r\n */\r\n constructor(address factoryOwner) {\r\n ERC721TokenMinter impl = new ERC721TokenMinter();\r\n SequenceProxyFactory._initialize(address(impl), factoryOwner);\r\n }\r\n\r\n /**\r\n * Creates an ERC-721 Token Minter proxy.\r\n * @param proxyOwner The owner of the ERC-721 Token Minter proxy\r\n * @param tokenOwner The owner of the ERC-721 Token Minter implementation\r\n * @param name The name of the ERC-721 Token Minter proxy\r\n * @param symbol The symbol of the ERC-721 Token Minter proxy\r\n * @param baseURI The base URI of the ERC-721 Token Minter proxy\r\n * @param contractURI The contract URI of the ERC-721 Token Minter proxy\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @return proxyAddr The address of the ERC-721 Token Minter Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-721 Token Minter functions.\r\n */\r\n function deploy(\r\n address proxyOwner,\r\n address tokenOwner,\r\n string memory name,\r\n string memory symbol,\r\n string memory baseURI,\r\n string memory contractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n external\r\n returns (address proxyAddr)\r\n {\r\n bytes32 salt =\r\n keccak256(abi.encodePacked(tokenOwner, name, symbol, baseURI, contractURI, royaltyReceiver, royaltyFeeNumerator));\r\n proxyAddr = _createProxy(salt, proxyOwner, "");\r\n ERC721TokenMinter(proxyAddr).initialize(tokenOwner, name, symbol, baseURI, contractURI, royaltyReceiver, royaltyFeeNumerator);\r\n emit ERC721TokenMinterDeployed(proxyAddr);\r\n return proxyAddr;\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC721/presets/minter/IERC721TokenMinter.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC721TokenMinterFunctions {\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param amount Amount of tokens to mint.\r\n */\r\n function mint(address to, uint256 amount) external;\r\n}\r\n\r\ninterface IERC721TokenMinterSignals {\r\n /**\r\n * Invalid initialization error.\r\n */\r\n error InvalidInitialization();\r\n}\r\n\r\ninterface IERC721TokenMinter is IERC721TokenMinterFunctions, IERC721TokenMinterSignals {}\r\n' + }, + 'src/tokens/ERC721/presets/minter/IERC721TokenMinterFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC721TokenMinterFactoryFunctions {\r\n /**\r\n * Creates an ERC-721 Token Minter proxy.\r\n * @param proxyOwner The owner of the ERC-721 Token Minter proxy\r\n * @param tokenOwner The owner of the ERC-721 Token Minter implementation\r\n * @param name The name of the ERC-721 Token Minter proxy\r\n * @param symbol The symbol of the ERC-721 Token Minter proxy\r\n * @param baseURI The base URI of the ERC-721 Token Minter proxy\r\n * @param contractURI The contract URI of the ERC-721 Token Minter proxy\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @return proxyAddr The address of the ERC-721 Token Minter Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-721 Token Minter functions.\r\n */\r\n function deploy(\r\n address proxyOwner,\r\n address tokenOwner,\r\n string memory name,\r\n string memory symbol,\r\n string memory baseURI,\r\n string memory contractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n external\r\n returns (address proxyAddr);\r\n}\r\n\r\ninterface IERC721TokenMinterFactorySignals {\r\n /**\r\n * Event emitted when a new ERC-721 Token Minter proxy contract is deployed.\r\n * @param proxyAddr The address of the deployed proxy.\r\n */\r\n event ERC721TokenMinterDeployed(address proxyAddr);\r\n}\r\n\r\ninterface IERC721TokenMinterFactory is IERC721TokenMinterFactoryFunctions, IERC721TokenMinterFactorySignals {}\r\n' + }, + 'src/tokens/common/ERC2981Controlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/IERC2981Controlled.sol";\r\nimport {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";\r\nimport {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";\r\n\r\n/**\r\n * An implementation of ERC-2981 that allows updates by roles.\r\n */\r\nabstract contract ERC2981Controlled is ERC2981, AccessControl, IERC2981Controlled {\r\n bytes32 internal constant ROYALTY_ADMIN_ROLE = keccak256("ROYALTY_ADMIN_ROLE");\r\n\r\n //\r\n // Royalty\r\n //\r\n\r\n /**\r\n * Sets the royalty information that all ids in this contract will default to.\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n */\r\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyRole(ROYALTY_ADMIN_ROLE) {\r\n _setDefaultRoyalty(receiver, feeNumerator);\r\n }\r\n\r\n /**\r\n * Sets the royalty information that a given token id in this contract will use.\r\n * @param tokenId The token id to set the royalty information for\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @notice This overrides the default royalty information for this token id\r\n */\r\n function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator)\r\n external\r\n onlyRole(ROYALTY_ADMIN_ROLE)\r\n {\r\n _setTokenRoyalty(tokenId, receiver, feeNumerator);\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC2981, AccessControl)\r\n returns (bool)\r\n {\r\n return ERC2981.supportsInterface(interfaceId) || AccessControl.supportsInterface(interfaceId)\r\n || type(IERC2981Controlled).interfaceId == interfaceId || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/common/IERC2981Controlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC2981ControlledFunctions {\r\n /**\r\n * Sets the royalty information that all ids in this contract will default to.\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n */\r\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external;\r\n\r\n /**\r\n * Sets the royalty information that a given token id in this contract will use.\r\n * @param tokenId The token id to set the royalty information for\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @notice This overrides the default royalty information for this token id\r\n */\r\n function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) external;\r\n}\r\n\r\ninterface IERC2981Controlled is IERC2981ControlledFunctions {}\r\n' + } + }, + settings: { + evmVersion: 'paris', + libraries: {}, + metadata: { bytecodeHash: 'ipfs' }, + optimizer: { enabled: true, runs: 20000 }, + remappings: [ + ':@0xsequence/contracts-library/=src/', + ':@0xsequence/erc-1155/=node_modules/@0xsequence/erc-1155/', + ':@0xsequence/erc20-meta-token/=node_modules/@0xsequence/erc20-meta-token/', + ':@openzeppelin/=node_modules/@openzeppelin/', + ':ds-test/=lib/forge-std/lib/ds-test/src/', + ':erc721a-upgradeable/=node_modules/erc721a-upgradeable/', + ':erc721a/=node_modules/erc721a/', + ':forge-std/=lib/forge-std/src/', + ':murky/=lib/murky/src/', + ':openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/' + ], + viaIR: true, + outputSelection: { + '*': { + '*': ['evm.bytecode', 'evm.deployedBytecode', 'devdoc', 'userdoc', 'metadata', 'abi'] + } + } + } + } +} diff --git a/scripts/factories/token_library/ERC721SaleFactory.ts b/scripts/factories/token_library/ERC721SaleFactory.ts new file mode 100644 index 0000000..b172a6c --- /dev/null +++ b/scripts/factories/token_library/ERC721SaleFactory.ts @@ -0,0 +1,379 @@ +import type { EtherscanVerificationRequest } from '@0xsequence/solidity-deployer' +import { ContractFactory, ethers } from 'ethers' + +// https://github.com/0xsequence/contracts-library/blob/5e0017b81cc3099e60704eaf4a50b64e79fe706c/src/tokens/ERC721/presets/sale/ERC721SaleFactory.sol + +const abi = [ + { + inputs: [ + { + internalType: 'address', + name: 'factoryOwner', + type: 'address' + } + ], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'proxyAddr', + type: 'address' + } + ], + name: 'ERC721SaleDeployed', + 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' + }, + { + inputs: [], + name: 'beacon', + outputs: [ + { + internalType: 'contract UpgradeableBeacon', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'proxyOwner', + type: 'address' + }, + { + internalType: 'address', + name: 'tokenOwner', + type: 'address' + }, + { + internalType: 'string', + name: 'name', + type: 'string' + }, + { + internalType: 'string', + name: 'symbol', + type: 'string' + }, + { + internalType: 'string', + name: 'baseURI', + type: 'string' + }, + { + internalType: 'string', + name: 'contractURI', + type: 'string' + }, + { + internalType: 'address', + name: 'royaltyReceiver', + type: 'address' + }, + { + internalType: 'uint96', + name: 'royaltyFeeNumerator', + type: 'uint96' + } + ], + name: 'deploy', + outputs: [ + { + internalType: 'address', + name: 'proxyAddr', + type: 'address' + } + ], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [], + name: 'owner', + outputs: [ + { + internalType: 'address', + name: '', + type: 'address' + } + ], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'newOwner', + type: 'address' + } + ], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'implementation', + type: 'address' + } + ], + name: 'upgradeBeacon', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + } +] + +export class ERC721SaleFactory extends ContractFactory { + constructor(signer: ethers.Signer) { + super( + abi, + '0x608034610125576001600160401b0390601f62006d6538819003918201601f191683019291908484118385101761010f57816020928492604096875283398101031261012557516001600160a01b038082168203610125576100603361012a565b82519361483394858101958187108388111761010f5762002532823980600096039086f0908115610105578451916105ee808401928311848410176100f1579184849260209462001f44853916815203019085f080156100e4576100d69394501660018060a01b0319600154161760015561012a565b51611dd29081620001728239f35b50505051903d90823e3d90fd5b634e487b7160e01b88526041600452602488fd5b84513d87823e3d90fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b600080546001600160a01b039283166001600160a01b03198216811783559216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a356fe6080604052600436101561001257600080fd5b6000803560e01c80631bce45831461092057806325a570b8146102d857806359659e9014610286578063715018a6146101e95780638da5cb5b146101985763f2fde38b1461005f57600080fd5b346101955760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610195576100966109df565b61009e610acc565b73ffffffffffffffffffffffffffffffffffffffff80911690811561011157600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b80fd5b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101955773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557610220610acc565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461019557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019557602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b5034610195576101007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610195576103116109df565b73ffffffffffffffffffffffffffffffffffffffff60243516602435036109135760443567ffffffffffffffff811161091c57610352903690600401610a57565b9060643567ffffffffffffffff81116107fd57610373903690600401610a57565b9060843567ffffffffffffffff811161091857610394903690600401610a57565b9260a43567ffffffffffffffff811161090f576103b5903690600401610a57565b9073ffffffffffffffffffffffffffffffffffffffff60c4351660c43503610913576bffffffffffffffffffffffff60e4351660e4350361090f5760405160208101907fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060243560601b1682526104e360548451838a8a60349361043f8186860160208d01610b4b565b83016104548251809360208885019101610b4b565b016104688251809360208785019101610b4b565b0188519061047c8285830160208d01610b4b565b017fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060c43560601b16838201527fffffffffffffffffffffffff000000000000000000000000000000000000000060e43560a01b1660488201520390810184520182610a16565b519020946040519586602081011067ffffffffffffffff6020890111176108e057602087016040528787526001547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000006040519160208301938452818860601b16604084015260601b16605482015261057a6068828a5161056a818d60208686019101610b4b565b8101036048810184520182610a16565b519020604051906111eb6105916020820184610a16565b8083526020830190610bb282398251156108825773ffffffffffffffffffffffffffffffffffffffff9251908af51695861561082457879473ffffffffffffffffffffffffffffffffffffffff6001541691883b1561082057869161064c73ffffffffffffffffffffffffffffffffffffffff9260405195869485947fcf7a1d770000000000000000000000000000000000000000000000000000000086521660048501526024840152606060448401526064830190610b6e565b0381838b5af1908115610815578591610801575b5050853b156107fd576106d1926107316107619261070160405198899788977f98dd69c800000000000000000000000000000000000000000000000000000000895273ffffffffffffffffffffffffffffffffffffffff6024351660048a015260e060248a015260e4890190610b6e565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc888303016044890152610b6e565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc868303016064870152610b6e565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc848303016084850152610b6e565b73ffffffffffffffffffffffffffffffffffffffff60c4351660a48301526bffffffffffffffffffffffff60e4351660c4830152038183865af180156107f2576107da575b6020827fe3fc4d8c7984f762222579e0c4564a72a74f96cde3f6bae2751d01108c6ec24082604051838152a1604051908152f35b6107e48391610a02565b6107ee57816107a6565b5080fd5b6040513d85823e3d90fd5b8380fd5b61080a90610a02565b6107fd578338610660565b6040513d87823e3d90fd5b8680fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8580fd5b600080fd5b8480fd5b8280fd5b50346101955760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610195576109586109df565b610960610acc565b8173ffffffffffffffffffffffffffffffffffffffff806001541692833b1561091c576024908360405195869485937f3659cfe60000000000000000000000000000000000000000000000000000000085521660048401525af180156109d4576109c8575080f35b6109d190610a02565b80f35b6040513d84823e3d90fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361091357565b67ffffffffffffffff81116108e057604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176108e057604052565b81601f820112156109135780359067ffffffffffffffff82116108e05760405192610aaa60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160185610a16565b8284526020838301011161091357816000926020809301838601378301015290565b73ffffffffffffffffffffffffffffffffffffffff600054163303610aed57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b60005b838110610b5e5750506000910152565b8181015183820152602001610b4e565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f602093610baa81518092818752878088019101610b4b565b011601019056fe60808060405234610016576111cf908161001c8239f35b600080fdfe604060808152366103825773ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000917fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000843516146100c057600484517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b6100c8611192565b60049136831161037e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261037e578235916101088361067f565b602435926101158461067f565b60443567ffffffffffffffff811161037a57610135839136908801610789565b941692156103525761014791166107e3565b803b156102cf578451907f5c60da1b000000000000000000000000000000000000000000000000000000009384835260209687848381865afa9384156102a657889461019d9189916102b2575b503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab575b610242575b8361023c6107d0565b80519101f35b8592839182525afa9182156102a65761026a9392610277575b506102646109b1565b91610a21565b5038808083818080610233565b610298919250843d861161029f575b610290818361070e565b810190610902565b903861025b565b503d610286565b61091a565b508661022e565b6102c99150863d881161029f57610290818361070e565b38610194565b60848360208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b8487517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8380fd5b73ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000907fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833516146104395760046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b610441611192565b60049236841161067b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067b5783356104808161067f565b6024359161048d8361067f565b60443567ffffffffffffffff8111610677576104ad829136908901610789565b9316931561064e576104bf91166107e3565b813b156105ca576040517f5c60da1b000000000000000000000000000000000000000000000000000000009283825260209586838281855afa9283156102a65787936105149188916105b357503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905560405194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab57610242578361023c6107d0565b6102c99150853d871161029f57610290818361070e565b6084846020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b856040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8280fd5b73ffffffffffffffffffffffffffffffffffffffff81160361069d57565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff8211176106ed57604052565b6106a2565b6040810190811067ffffffffffffffff8211176106ed57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106ed57604052565b67ffffffffffffffff81116106ed57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f8201121561069d578035906107a08261074f565b926107ae604051948561070e565b8284526020838301011161069d57816000926020809301838601378301015290565b604051906107dd826106d1565b60008252565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61039081547f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f604080519373ffffffffffffffffffffffffffffffffffffffff9081851686521693846020820152a1811561087e577fffffffffffffffffffffffff000000000000000000000000000000000000000016179055565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b9081602091031261069d57516109178161067f565b90565b6040513d6000823e3d90fd5b1561092d57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201527f73206e6f74206120636f6e7472616374000000000000000000000000000000006064820152fd5b604051906060820182811067ffffffffffffffff8211176106ed57604052602782527f206661696c6564000000000000000000000000000000000000000000000000006040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6000806109179493602081519101845af43d15610a60573d91610a438361074f565b92610a51604051948561070e565b83523d6000602085013e610acd565b606091610acd565b15610a6f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b91929015610aed5750815115610ae1575090565b610917903b1515610a68565b825190915015610b005750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b848110610b7d575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201610b3c565b610bee610bd57fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b3303610d14576000357fffffffff00000000000000000000000000000000000000000000000000000000167f3659cfe6000000000000000000000000000000000000000000000000000000008103610c515750610c49610f0f565b602081519101f35b7f4f1ef286000000000000000000000000000000000000000000000000000000008103610c865750610c81611083565b610c49565b7f8f283970000000000000000000000000000000000000000000000000000000008103610cb65750610c81610ec5565b7ff851a440000000000000000000000000000000000000000000000000000000008103610ce65750610c81610dfd565b7f5c60da1b0000000000000000000000000000000000000000000000000000000003610d1457610c81610e53565b610d1c610d3b565b6000808092368280378136915af43d82803e15610d37573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541680610df8575060206004917fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505416604051928380927f5c60da1b0000000000000000000000000000000000000000000000000000000082525afa9081156102a657600091610de0575090565b610917915060203d811161029f57610290818361070e565b905090565b610e05611192565b73ffffffffffffffffffffffffffffffffffffffff7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103541660405190602082015260208152610917816106f2565b610e5b611192565b610e63610d3b565b73ffffffffffffffffffffffffffffffffffffffff6040519116602082015260208152610917816106f2565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc602091011261069d576004356109178161067f565b610ecd611192565b3660041161069d57610efc73ffffffffffffffffffffffffffffffffffffffff610ef636610e8f565b166107e3565b604051610f08816106d1565b6000815290565b610f17611192565b3660041161069d5773ffffffffffffffffffffffffffffffffffffffff610f3d36610e8f565b1660405190610f4b826106d1565b60008252803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2815115801590610ff7575b610fe3575b5050604051610f08816106d1565b610fef916102646109b1565b503880610fd5565b506000610fd0565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152fd5b3660041161069d5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261069d576004356110c18161067f565b60243567ffffffffffffffff811161069d576110f673ffffffffffffffffffffffffffffffffffffffff913690600401610789565b9116803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061118a57610fe3575050604051610f08816106d1565b506001610fd0565b3461069d5756fea264697066735822122019f840d2ec21d6e6c6d650eef546ce8fd590e6d8042a04516b47dd55a17345c664736f6c63430008130033a2646970667358221220f9aaab2399c8d2ad73233f513a2d16ccf59baeec8ef68ee57ef9a4be006b5f0064736f6c6343000813003360803461011a57601f6105ee38819003918201601f19168301916001600160401b0383118484101761011f5780849260209460405283398101031261011a57516001600160a01b03808216919082820361011a576000549160018060a01b0319923384821617600055604051923391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a33b156100b2575060015416176001556040516104b890816101368239f35b62461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b6000803560e01c80633659cfe6146102ce5780635c60da1b1461027c578063715018a6146101e05780638da5cb5b1461018f5763f2fde38b1461005457600080fd5b3461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610188576100ad610403565b8115610104578254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b80fd5b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57610217610403565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff81169081810361018857610328610403565b3b1561037f57807fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8280a280f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff60005416330361042457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea2646970667358221220dc365b16a2b6643d361d2ca2ef711f783ae4b4503a5f52631ea9ce48e88aa6da64736f6c63430008130033608060405234620002cf5762000014620002d4565b6200001e620002d4565b8151906001600160401b0390818311620001e157600254906001938483811c9316958615620002c4575b60209687851014620001c0578190601f948581116200026d575b5087908583116001146200020357600092620001f7575b5050600019600383901b1c191690851b176002555b8051928311620001e15760039485548581811c91168015620001d6575b82821014620001c05783811162000175575b50809284116001146200010b5750928293918392600094620000ff575b50501b9160001990841b1c19161790555b6000805560405161453a9081620002f98239f35b015192503880620000da565b919083601f1981168760005284600020946000905b888383106200015a575050501062000141575b505050811b019055620000eb565b015160001983861b60f8161c1916905538808062000133565b85870151885590960195948501948793509081019062000120565b86600052816000208480870160051c820192848810620001b6575b0160051c019086905b828110620001a9575050620000bd565b6000815501869062000199565b9250819262000190565b634e487b7160e01b600052602260045260246000fd5b90607f1690620000ab565b634e487b7160e01b600052604160045260246000fd5b01519050388062000079565b90879350601f198316916002600052896000209260005b8b8282106200025657505084116200023c575b505050811b016002556200008e565b015160001960f88460031b161c191690553880806200022d565b8385015186558b979095019493840193016200021a565b9091506002600052876000208580850160051c8201928a8610620002ba575b918991869594930160051c01915b828110620002aa57505062000062565b600081558594508991016200029a565b925081926200028c565b92607f169262000048565b600080fd5b60405190602082016001600160401b03811183821017620001e1576040526000825256fe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a71461028757806304634d8d1461028257806306fdde031461027d578063081812fc14610278578063095ea7b31461027357806318160ddd1461026e57806323b872dd14610269578063248a9ca3146102645780632a55205a1461025f5780632f2ff15d1461025a5780633474a4a61461025557806336568abe1461025057806342842e0e1461024b57806344004cc1146102465780634782f779146102415780635944c7531461023c5780635a446215146102375780635bbb2177146102325780636352211e1461022d578063641ce1401461022857806370a08231146102235780637e518ec81461021e5780638462151c146102195780638c17030f1461021457806391d148541461020f578063938e3d7b1461020a57806395d89b411461020557806398dd69c81461020057806399a2557a146101fb578063a217fddf146101f6578063a22cb465146101f1578063b88d4fde146101ec578063c23dc68f146101e7578063c3a71999146101e2578063c87b56dd146101dd578063d547741f146101d8578063e8a3d485146101d3578063e985e9c5146101ce5763f8e4dec5146101c957600080fd5b612163565b6120f3565b61204c565b61200d565b611e93565b611e66565b611df4565b611d99565b611cc8565b611ca2565b611c6a565b611bcc565b611b25565b611a26565b6119c6565b6117e3565b6116e1565b6115a7565b611551565b611390565b611354565b611282565b611087565b610df9565b610d90565b610cfc565b610cd9565b610c13565b610af3565b6109d9565b610908565b6108d9565b6108c7565b610862565b610743565b6106c9565b6105ca565b61052a565b6102bb565b7fffffffff000000000000000000000000000000000000000000000000000000008116036102b657565b600080fd5b346102b65760206003193601126102b65761033d6004356102db8161028c565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fdc7f46e9000000000000000000000000000000000000000000000000000000008114918215610341575b505060405190151581529081906020820190565b0390f35b7fc21b8f28000000000000000000000000000000000000000000000000000000008214925090821561043e575b82156103ad575b50811561039c575b811561038c575b503880610329565b6103969150614164565b38610384565b90506103a781614164565b9061037d565b9091507f01ffc9a7000000000000000000000000000000000000000000000000000000008114908115610414575b81156103ea575b509038610375565b7f5b5e139f00000000000000000000000000000000000000000000000000000000915014386103e2565b7f80ac58cd00000000000000000000000000000000000000000000000000000000811491506103db565b7f8446a79e000000000000000000000000000000000000000000000000000000008114925061036e565b6004359073ffffffffffffffffffffffffffffffffffffffff821682036102b657565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036102b657565b6044359073ffffffffffffffffffffffffffffffffffffffff821682036102b657565b60a4359073ffffffffffffffffffffffffffffffffffffffff821682036102b657565b604435906bffffffffffffffffffffffff821682036102b657565b60c435906bffffffffffffffffffffffff821682036102b657565b346102b65760406003193601126102b657610543610468565b6024356bffffffffffffffffffffffff811681036102b65761056c916105676121b4565b613ce6565b005b60005b8381106105815750506000910152565b8181015183820152602001610571565b90601f19601f6020936105af8151809281875287808801910161056e565b0116010190565b9060206105c7928181520190610591565b90565b346102b6576000806003193601126106c6576040519080600c546105ed81613609565b8085529160019180831690811561067e5750600114610623575b61033d8561061781870382610fe7565b604051918291826105b6565b9250600c83527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c75b8284106106665750505081016020016106178261033d610607565b8054602085870181019190915290930192810161064b565b86955061033d969350602092506106179491507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001682840152151560051b8201019293610607565b80fd5b346102b65760206003193601126102b6576004356106e681612e59565b15610719576000526006602052602073ffffffffffffffffffffffffffffffffffffffff60406000205416604051908152f35b60046040517fcf4700e4000000000000000000000000000000000000000000000000000000008152fd5b60406003193601126102b657610757610468565b60243573ffffffffffffffffffffffffffffffffffffffff8061077983612dba565b16908133036107f9575b600083815260066020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87161790559316907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b81600052600760205260ff6108323360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166107835760046040517fcfb3b942000000000000000000000000000000000000000000000000000000008152fd5b346102b65760006003193601126102b65760206000546001549003604051908152f35b60031960609101126102b65773ffffffffffffffffffffffffffffffffffffffff9060043582811681036102b6579160243590811681036102b6579060443590565b61056c6108d336610885565b91612e9b565b346102b65760206003193601126102b657600435600052600a6020526020600160406000200154604051908152f35b346102b65760406003193601126102b657600435600052600960205260406000206040519061093682610faf565b549073ffffffffffffffffffffffffffffffffffffffff82169182825260a01c602082015290156109cb575b6109a26127106109866bffffffffffffffffffffffff602085015116602435612927565b04915173ffffffffffffffffffffffffffffffffffffffff1690565b6040805173ffffffffffffffffffffffffffffffffffffffff9290921682526020820192909252f35b506109d46128c5565b610962565b346102b65760406003193601126102b6576004356109f561048b565b600091808352600a602052610a1060016040852001546123a9565b808352600a60205260ff610a4783604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541615610a52578280f35b808352600a602052610a8782604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b346102b6576000806003193601126106c65760a0604051610b1381610f8e565b828152826020820152826040820152826060820152826080820152015261033d604051610b3f81610f8e565b6011548152601254602082015260135473ffffffffffffffffffffffffffffffffffffffff8116604083015260a01c67ffffffffffffffff166060820152610ba4610b9360145467ffffffffffffffff1690565b67ffffffffffffffff166080830152565b60155460a08201526040519182918291909160a08060c0830194805184526020810151602085015273ffffffffffffffffffffffffffffffffffffffff604082015116604085015267ffffffffffffffff80606083015116606086015260808201511660808501520151910152565b346102b65760406003193601126102b657610c2c61048b565b3373ffffffffffffffffffffffffffffffffffffffff821603610c555761056c906004356127e7565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b61056c610ce536610885565b9060405192610cf384610fcb565b6000845261311c565b346102b65761056c610d8a73ffffffffffffffffffffffffffffffffffffffff610d2536610885565b9390610d2f6122aa565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff919091166024820152604480820195909552938452606484610fe7565b16613f5e565b346102b65760406003193601126102b657610da9610468565b610db16122aa565b60008080808094602435905af1610dc66131c9565b5015610dcf5780f35b60046040517f750b219c000000000000000000000000000000000000000000000000000000008152fd5b346102b65760606003193601126102b657610e1261048b565b610e1a6104f4565b90610e236121b4565b610e3f6127106bffffffffffffffffffffffff84161115613c5b565b73ffffffffffffffffffffffffffffffffffffffff811615610f0157610e9e61056c92610e89610e6d61100a565b73ffffffffffffffffffffffffffffffffffffffff9094168452565b6bffffffffffffffffffffffff166020830152565b610eb46004356000526009602052604060002090565b815160209092015160a01b7fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60c0810190811067ffffffffffffffff821117610faa57604052565b610f5f565b6040810190811067ffffffffffffffff821117610faa57604052565b6020810190811067ffffffffffffffff821117610faa57604052565b90601f601f19910116810190811067ffffffffffffffff821117610faa57604052565b6040519061101782610faf565b565b67ffffffffffffffff8111610faa57601f01601f191660200190565b92919261104182611019565b9161104f6040519384610fe7565b8294818452818301116102b6578281602093846000960137010152565b9080601f830112156102b6578160206105c793359101611035565b346102b65760406003193601126102b65767ffffffffffffffff6004358181116102b6576110b990369060040161106c565b906024358181116102b6576110d290369060040161106c565b906110db6122ff565b8251908111610faa576110f8816110f3600c54613609565b61365c565b602080601f83116001146111395750819061056c9460009261112e575b50506000198260011b9260031b1c191617600c55613820565b015190503880611115565b600c6000529193601f1985167fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7936000905b8282106111ac57505091600193918661056c979410611193575b505050811b01600c55613820565b015160001960f88460031b161c19169055388080611185565b8060018697829497870151815501960194019061116b565b9181601f840112156102b65782359167ffffffffffffffff83116102b6576020808501948460051b0101116102b657565b6020908160408183019282815285518094520193019160005b82811061121c575050505090565b9091929382608082611276600194895162ffffff6060809273ffffffffffffffffffffffffffffffffffffffff815116855267ffffffffffffffff6020820151166020860152604081015115156040860152015116910152565b0195019392910161120e565b346102b6576020806003193601126102b65760043567ffffffffffffffff81116102b6576112b49036906004016111c4565b6112c081939293613447565b916112ce6040519384610fe7565b818352601f196112dd83613447565b0160005b81811061133e5750505060005b818103611303576040518061033d85826111f5565b81811015611339578061131d60019260051b860135613377565b611327828661345f565b52611332818561345f565b50016112ee565b612979565b8290611348613341565b828288010152016112e1565b346102b65760206003193601126102b657602073ffffffffffffffffffffffffffffffffffffffff611387600435612dba565b16604051908152f35b60606003193601126102b6576113a4610468565b60243567ffffffffffffffff6044358181116102b6576113c89036906004016111c4565b9160005460015490036011548015158061153a575b6114fd575050601354611415919060a01c67ffffffffffffffff16908061140d60145467ffffffffffffffff1690565b16911661413c565b6114d35761142891601554913392614299565b61143481601254612927565b9173ffffffffffffffffffffffffffffffffffffffff61146960135473ffffffffffffffffffffffffffffffffffffffff1690565b16806114bd57508234036114815761056c9250613dbe565b6040517fb99e2ab700000000000000000000000000000000000000000000000000000000815260048101849052346024820152604490fd5b0390fd5b61056c936114ce9130903390613ee6565b613dbe565b60046040517f3f886774000000000000000000000000000000000000000000000000000000008152fd5b6064925085604051927fa9227830000000000000000000000000000000000000000000000000000000008452600484015260248301526044820152fd5b5085820180831161154c5781106113dd565b6128f8565b346102b65760206003193601126102b657602061157461156f610468565b612d59565b604051908152f35b60206003198201126102b6576004359067ffffffffffffffff82116102b6576105c79160040161106c565b346102b6576115b53661157c565b6115bd6122ff565b805167ffffffffffffffff8111610faa576115e2816115dd600b54613609565b6136cd565b602080601f831160011461161f57508192600092611614575b50506000198260011b9260031b1c191617600b55600080f35b0151905038806115fb565b90601f19831693611652600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db990565b926000905b86821061168e5750508360019510611675575b505050811b01600b55005b015160001960f88460031b161c1916905538808061166a565b80600185968294968601518155019501930190611657565b6020908160408183019282815285518094520193019160005b8281106116cd575050505090565b8351855293810193928101926001016116bf565b346102b65760206003193601126102b6576116fa610468565b60008061170683612d59565b9161171083613473565b93611719613341565b5073ffffffffffffffffffffffffffffffffffffffff90811691835b85850361174a576040518061033d89826116a6565b611753816133c5565b60408101516117ac575173ffffffffffffffffffffffffffffffffffffffff168381166117a3575b50600190848484161461178f575b01611735565b8061179d838801978a61345f565b52611789565b9150600161177b565b50600190611789565b6064359067ffffffffffffffff821682036102b657565b6084359067ffffffffffffffff821682036102b657565b346102b65760c06003193601126102b6577fabec13ca1773eed55d54d2f64593c33fa520ee45cac73a162f13928a2ebee2336024356004356119c16118266104ae565b61182e6117b5565b6118366117cc565b9060a43592611843612354565b61196460405161185281610f8e565b8781528860208201526118e373ffffffffffffffffffffffffffffffffffffffff84168060408401528760a067ffffffffffffffff80891660608701528916948560808201520152896011558a60125573ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff00000000000000000000000000000000000000006013541617601355565b6013547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff7bffffffffffffffff00000000000000000000000000000000000000008660a01b1691161760135567ffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000006014541617601455565b61196d84601555565b604051968796879273ffffffffffffffffffffffffffffffffffffffff9060a09593989796929860c08601998652602086015216604084015267ffffffffffffffff80921660608401521660808201520152565b0390a1005b346102b65760406003193601126102b657602060ff611a1a6119e661048b565b600435600052600a845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166040519015158152f35b346102b657611a343661157c565b611a3c6122ff565b805167ffffffffffffffff8111610faa57611a6181611a5c600e54613609565b61373e565b602080601f8311600114611a9e57508192600092611a93575b50506000198260011b9260031b1c191617600e55600080f35b015190503880611a7a565b90601f19831693611ad1600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd90565b926000905b868210611b0d5750508360019510611af4575b505050811b01600e55005b015160001960f88460031b161c19169055388080611ae9565b80600185968294968601518155019501930190611ad6565b346102b6576000806003193601126106c6576040519080600d54611b4881613609565b8085529160019180831690811561067e5750600114611b715761033d8561061781870382610fe7565b9250600d83527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb55b828410611bb45750505081016020016106178261033d610607565b80546020858701810191909152909301928101611b99565b346102b65760e06003193601126102b657611be5610468565b67ffffffffffffffff906024358281116102b657611c0790369060040161106c565b6044358381116102b657611c1f90369060040161106c565b6064358481116102b657611c3790369060040161106c565b6084359485116102b657611c5261056c95369060040161106c565b91611c5b6104d1565b93611c6461050f565b95613ad1565b346102b65760606003193601126102b65761033d611c96611c89610468565b60443590602435906134a4565b604051918291826116a6565b346102b65760006003193601126102b657602060405160008152f35b801515036102b657565b346102b65760406003193601126102b657611ce1610468565b73ffffffffffffffffffffffffffffffffffffffff60243591611d0383611cbe565b336000526007602052611d3a8160406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b921515927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff851617905560405192835216907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b60806003193601126102b657611dad610468565b611db561048b565b6064359167ffffffffffffffff83116102b657366023840112156102b657611dea61056c933690602481600401359101611035565b916044359161311c565b346102b65760206003193601126102b6576080611e12600435613377565b611e64604051809262ffffff6060809273ffffffffffffffffffffffffffffffffffffffff815116855267ffffffffffffffff6020820151166020860152604081015115156040860152015116910152565bf35b346102b65760406003193601126102b65761056c611e82610468565b611e8a612354565b60243590613dbe565b346102b6576020806003193601126102b657600435611eb181612e59565b15611fe3576040519082826000600b54611eca81613609565b80845290600190818116908115611fa35750600114611f44575b5050611ef292500383610fe7565b815115611f315761033d92611f23611f0c610617936132f8565b611f1d604051958694850190612486565b90612486565b03601f198101835282610fe7565b50505061033d611f3f61293a565b610617565b90939150600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9936000915b818310611f8b575087945050820101611ef238611ee4565b85548884018501529485019487945091830191611f73565b9050611ef29593507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b820101859238611ee4565b60046040517fa14c4b50000000000000000000000000000000000000000000000000000000008152fd5b346102b65760406003193601126102b65761056c60043561202c61048b565b9080600052600a6020526120476001604060002001546123a9565b6127e7565b346102b6576000806003193601126106c6576040519080600e5461206f81613609565b8085529160019180831690811561067e57506001146120985761033d8561061781870382610fe7565b9250600e83527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd5b8284106120db5750505081016020016106178261033d610607565b805460208587018101919091529093019281016120c0565b346102b65760406003193601126102b657602060ff611a1a612113610468565b73ffffffffffffffffffffffffffffffffffffffff61213061048b565b91166000526007845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b346102b65760606003193601126102b65760243567ffffffffffffffff81116102b6576121aa61219960209236906004016111c4565b6121a16104ae565b916004356143bb565b6040519015158152f35b3360009081527f4a209273c9c71eac8bee506e444418998f8f452896d49b4edfa61f22f2a2bd27602052604090205460ff16156121ed57565b6114b960486122786121fe33612a48565b611f23612209612ae5565b6040519485937f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000602086015261224981518092602060378901910161056e565b84017f206973206d697373696e6720726f6c652000000000000000000000000000000060378201520190612486565b6040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352600483016105b6565b3360009081527f16147e027c43f27e457f7512a0294c87efa522e048b4f634128ae8d93ce6f2d0602052604090205460ff16156122e357565b6114b960486122786122f433612a48565b611f23612209612b82565b3360009081527f2de00acba1f3dd4b00004fa31871eaf6bd23564af8ed1bbe52ac31593862e4a2602052604090205460ff161561233857565b6114b9604861227861234933612a48565b611f23612209612c1f565b3360009081527f2d0f1c0618a7da64afe1e6f04164eb0ccdc344c9da532812924588952b5e6d05602052604090205460ff161561238d57565b6114b9604861227861239e33612a48565b611f23612209612cbc565b80600052600a60205260ff6123e23360406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b5416156123ec5750565b6123f533612a48565b6123fd61294d565b916030612409846129a8565b536078612415846129b5565b5360415b60018111612438576114b9604861227885611f238861220988156129e3565b90600f8116906010821015611339577f3031323334353637383961626364656600000000000000000000000000000000612481921a61247784876129c5565b5360041c916129d6565b612419565b906124996020928281519485920161056e565b0190565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f13da86008ba1c6922daee3e07db95305ef49ebced9f5467a0b8613fcc6b343e3602052604081205460ff16156124ee575050565b808052600a60205261252382604083209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f2de00acba1f3dd4b00004fa31871eaf6bd23564af8ed1bbe52ac31593862e4a2602052604081207fe02a0315b383857ac496e9d2b2546a699afaeb4e5e83a1fdef64376d0b74e5a59060ff905b54161561260157505050565b808252600a60205261263683604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f4a209273c9c71eac8bee506e444418998f8f452896d49b4edfa61f22f2a2bd27602052604081207f6db4061a20ca83a3be756ee172bd37a029093ac5afe4ce968c6d5435b43cb0119060ff906125f5565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f2d0f1c0618a7da64afe1e6f04164eb0ccdc344c9da532812924588952b5e6d05602052604081207f4c02318d8c3aadc98ccf18aebbf3126f651e0c3f6a1de5ff8edcf6724a2ad5c29060ff906125f5565b73ffffffffffffffffffffffffffffffffffffffff811660009081527f16147e027c43f27e457f7512a0294c87efa522e048b4f634128ae8d93ce6f2d0602052604081207f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec9060ff906125f5565b600090808252600a60205260ff61282184604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541661282c57505050565b808252600a60205261286183604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b604051906128d282610faf565b60085473ffffffffffffffffffffffffffffffffffffffff8116835260a01c6020830152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181029291811591840414171561154c57565b6040519061294782610fcb565b60008252565b604051906080820182811067ffffffffffffffff821117610faa57604052604282526060366020840137565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8051156113395760200190565b8051600110156113395760210190565b908151811015611339570160200190565b801561154c576000190190565b156129ea57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906060820182811067ffffffffffffffff821117610faa57604052602a825260403660208401376030612a7d836129a8565b536078612a89836129b5565b536029905b60018211612aa1576105c79150156129e3565b600f8116906010821015611339577f3031323334353637383961626364656600000000000000000000000000000000612adf921a61247784866129c5565b90612a8e565b7f6db4061a20ca83a3be756ee172bd37a029093ac5afe4ce968c6d5435b43cb011612b0e61294d565b906030612b1a836129a8565b536078612b26836129b5565b536041905b60018211612b3e576105c79150156129e3565b600f8116906010821015611339577f3031323334353637383961626364656600000000000000000000000000000000612b7c921a61247784866129c5565b90612b2b565b7f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec612bab61294d565b906030612bb7836129a8565b536078612bc3836129b5565b536041905b60018211612bdb576105c79150156129e3565b600f8116906010821015611339577f3031323334353637383961626364656600000000000000000000000000000000612c19921a61247784866129c5565b90612bc8565b7fe02a0315b383857ac496e9d2b2546a699afaeb4e5e83a1fdef64376d0b74e5a5612c4861294d565b906030612c54836129a8565b536078612c60836129b5565b536041905b60018211612c78576105c79150156129e3565b600f8116906010821015611339577f3031323334353637383961626364656600000000000000000000000000000000612cb6921a61247784866129c5565b90612c65565b7f4c02318d8c3aadc98ccf18aebbf3126f651e0c3f6a1de5ff8edcf6724a2ad5c2612ce561294d565b906030612cf1836129a8565b536078612cfd836129b5565b536041905b60018211612d15576105c79150156129e3565b600f8116906010821015611339577f3031323334353637383961626364656600000000000000000000000000000000612d53921a61247784866129c5565b90612d02565b73ffffffffffffffffffffffffffffffffffffffff168015612d9057600052600560205267ffffffffffffffff6040600020541690565b60046040517f8f4eb604000000000000000000000000000000000000000000000000000000008152fd5b60008181548110612df0575b60046040517fdf2d9b42000000000000000000000000000000000000000000000000000000008152fd5b815260049060209180835260409283832054947c0100000000000000000000000000000000000000000000000000000000861615612e3057505050612dc6565b93929190935b8515612e4457505050505090565b60001901808352818552838320549550612e36565b60005481109081612e68575090565b905060005260046020527c0100000000000000000000000000000000000000000000000000000000604060002054161590565b90612ea583612dba565b73ffffffffffffffffffffffffffffffffffffffff8084169283828416036130f257600086815260066020526040902080549092612f0373ffffffffffffffffffffffffffffffffffffffff881633908114908414171590565b1590565b613063575b821695861561303957612f7393612f459261302f575b5073ffffffffffffffffffffffffffffffffffffffff166000526005602052604060002090565b805460001901905573ffffffffffffffffffffffffffffffffffffffff166000526005602052604060002090565b805460010190557c0200000000000000000000000000000000000000000000000000000000804260a01b851717612fb4866000526004602052604060002090565b55811615612fe5575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b60018401612ffd816000526004602052604060002090565b541561300a575b50612fbd565b600054811461300457613027906000526004602052604060002090565b553880613004565b6000905538612f1e565b60046040517fea553b34000000000000000000000000000000000000000000000000000000008152fd5b6130c3612eff6130bc336130978b73ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b9073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b5460ff1690565b15612f085760046040517f59c896be000000000000000000000000000000000000000000000000000000008152fd5b60046040517fa1148100000000000000000000000000000000000000000000000000000000008152fd5b92919061312a828286612e9b565b803b613137575b50505050565b613140936131f9565b1561314e5738808080613131565b60046040517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b908160209103126102b657516105c78161028c565b90926105c7949360809373ffffffffffffffffffffffffffffffffffffffff809216845216602083015260408201528160608201520190610591565b3d156131f4573d906131da82611019565b916131e86040519384610fe7565b82523d6000602084013e565b606090565b9260209161325093600073ffffffffffffffffffffffffffffffffffffffff6040518097819682957f150b7a02000000000000000000000000000000000000000000000000000000009b8c8552336004860161318d565b0393165af1600091816132c8575b506132a25761326b6131c9565b8051908161329d5760046040517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b6132ea91925060203d81116132f1575b6132e28183610fe7565b810190613178565b903861325e565b503d6132d8565b9060405160a08101604052600019608082019360008552935b0192600a9081810660300185530492831561332f5760001990613311565b9250608083601f199203019201918252565b604051906080820182811067ffffffffffffffff821117610faa5760405260006060838281528260208201528260408201520152565b61337f613341565b50613388613341565b6000548210156133c0575061339c816133c5565b60408101516133c057506133bb6105c7916133b5613341565b50612dba565b6133e0565b905090565b6133cd613341565b5060005260046020526105c76040600020545b906133e9613341565b9173ffffffffffffffffffffffffffffffffffffffff8116835267ffffffffffffffff8160a01c1660208401527c010000000000000000000000000000000000000000000000000000000081161515604084015260e81c6060830152565b67ffffffffffffffff8111610faa5760051b60200190565b80518210156113395760209160051b010190565b9061347d82613447565b61348a6040519182610fe7565b828152601f1961349a8294613447565b0190602036910137565b90828110156135df5760009182548085116135d7575b506134c481612d59565b848310156135d0578285038181106135c8575b505b6134e281613473565b9581156135c0576134f284613377565b918594604093613507612eff86830151151590565b6135a1575b505b8781141580613597575b1561358a57613526816133c5565b80850151613581575173ffffffffffffffffffffffffffffffffffffffff90811680613578575b509081600192871690881614613564575b0161350e565b80613572838a01998c61345f565b5261355e565b9650600161354d565b5060019061355e565b5050959450505050815290565b5081871415613518565b5173ffffffffffffffffffffffffffffffffffffffff1695503861350c565b945050505050565b9050386134d7565b50826134d9565b9350386134ba565b60046040517f32c1995a000000000000000000000000000000000000000000000000000000008152fd5b90600182811c92168015613652575b602083101461362357565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691613618565b601f8111613668575050565b600090600c82527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7906020601f850160051c830194106136c3575b601f0160051c01915b8281106136b857505050565b8181556001016136ac565b90925082906136a3565b601f81116136d9575050565b600090600b82527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9906020601f850160051c83019410613734575b601f0160051c01915b82811061372957505050565b81815560010161371d565b9092508290613714565b601f811161374a575050565b600090600e82527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd906020601f850160051c830194106137a5575b601f0160051c01915b82811061379a57505050565b81815560010161378e565b9092508290613785565b601f81116137bb575050565b600090600d82527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb5906020601f850160051c83019410613816575b601f0160051c01915b82811061380b57505050565b8181556001016137ff565b90925082906137f6565b90815167ffffffffffffffff8111610faa5761384681613841600d54613609565b6137af565b602080601f83116001146138815750819293600092613876575b50506000198260011b9260031b1c191617600d55565b015190503880613860565b90601f198316946138b4600d6000527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb590565b926000905b8782106138f15750508360019596106138d8575b505050811b01600d55565b015160001960f88460031b161c191690553880806138cd565b806001859682949686015181550195019301906138b9565b90815167ffffffffffffffff8111610faa5761392a816115dd600b54613609565b602080601f8311600114613965575081929360009261395a575b50506000198260011b9260031b1c191617600b55565b015190503880613944565b90601f19831694613998600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db990565b926000905b8782106139d55750508360019596106139bc575b505050811b01600b55565b015160001960f88460031b161c191690553880806139b1565b8060018596829496860151815501950193019061399d565b90815167ffffffffffffffff8111610faa57613a0e81611a5c600e54613609565b602080601f8311600114613a495750819293600092613a3e575b50506000198260011b9260031b1c191617600e55565b015190503880613a28565b90601f19831694613a7c600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd90565b926000905b878210613ab9575050836001959610613aa0575b505050811b01600e55565b015160001960f88460031b161c19169055388080613a95565b80600185968294968601518155019501930190613a81565b95949392919060ff60105416613c315780519067ffffffffffffffff8211610faa57613b02826110f3600c54613609565b60209081601f8411600114613bae575093613b4b613b559484613b7e9b9a9895613b5095613b709b9960009261112e5750506000198260011b9260031b1c191617600c55613820565b613909565b6139ed565b613b5e8461249d565b613b678461258b565b6105678461269d565b613b798161270b565b612779565b61101760017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006010541617601055565b600c6000529190601f1984167fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7936000905b828210613c1957505094600185613b5095613b709b9995613b4b95613b7e9f9e9c99613b559b1061119357505050811b01600c55613820565b80600186978294978701518155019601940190613be0565b60046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b15613c6257565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff831691613d19612710841115613c5b565b16918215613d60577fffffffffffffffffffffffff0000000000000000000000000000000000000000916020604051613d5181610faf565b858152015260a01b1617600855565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152fd5b906000908154928115613ebc57613df58173ffffffffffffffffffffffffffffffffffffffff166000526005602052604060002090565b680100000000000000018302815401905573ffffffffffffffffffffffffffffffffffffffff600191169181811460e11b4260a01b178317613e41866000526004602052604060002090565b55840193817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91808587858180a4015b858103613ead5750505015613e835755565b60046040517f2e076300000000000000000000000000000000000000000000000000000000008152fd5b8083918587858180a401613e71565b60046040517fb562e8dd000000000000000000000000000000000000000000000000000000008152fd5b9290604051927f23b872dd00000000000000000000000000000000000000000000000000000000602085015273ffffffffffffffffffffffffffffffffffffffff809216602485015216604483015260648201526064815260a081019181831067ffffffffffffffff841117610faa57611017926040525b604051613fc99173ffffffffffffffffffffffffffffffffffffffff16613f8482610faf565b6000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af1613fc36131c9565b91614078565b805180613fd557505050565b818391810103126102b657810151613fec81611cbe565b15613ff45750565b608490604051907f08c379a00000000000000000000000000000000000000000000000000000000082526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b919290156140f3575081511561408c575090565b3b156140955790565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b8251909150156141065750805190602001fd5b6114b9906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352600483016105b6565b90801591821561415a575b508115614152575090565b905042101590565b4210915038614147565b61416d81614222565b9081156141bb575b8115614190575b8115614186575090565b6105c791506141cc565b7fffffffff00000000000000000000000000000000000000000000000000000000811615915061417c565b90506141c6816141cc565b90614175565b7f7965db0b000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000082161490811561421c575090565b6105c791505b7fffffffff00000000000000000000000000000000000000000000000000000000167f2a55205a000000000000000000000000000000000000000000000000000000008114908115614272575090565b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501490565b929190836142a75750505050565b6142b3838383876143bb565b1561432857505061431f9173ffffffffffffffffffffffffffffffffffffffff6142f49216600052600f602052604060002090600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b38808080613131565b604092919251937f5dd5cbe80000000000000000000000000000000000000000000000000000000085526004850152606060248501528260648501527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116102b65773ffffffffffffffffffffffffffffffffffffffff849260849460051b8093868601371660448301528101030190fd5b91909160009273ffffffffffffffffffffffffffffffffffffffff85168452602093600f855260408120838252855260ff604082205416159586614403575b50505050505090565b90919293949695506040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008882019260601b1682526014815261444681610faf565b5190209361445381613447565b926144616040519485610fe7565b8184528784019160051b8101923684116106c65750905b8282106144985750505061448d9394506144a7565b3880808080806143fa565b81358152908701908701614478565b90926000925b82518410156144fb576144c0848461345f565b51906000828210156144ec575060005260205260406000205b92600019811461154c57600101926144ad565b906040928252602052206144d9565b9150929150149056fea2646970667358221220d95ea265da5e0956fcd32eb9be7b590ab8dd0bbe2bc437ed512a2900f10a4ada64736f6c63430008130033', + signer + ) + } +} + +export const ERC721SALEFACTORY_VERIFICATION: Omit = { + contractToVerify: 'src/tokens/ERC721/presets/sale/ERC721SaleFactory.sol:ERC721SaleFactory', + version: 'v0.8.19+commit.7dd6d404', + compilerInput: { + language: 'Solidity', + sources: { + 'node_modules/@openzeppelin/contracts/access/AccessControl.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IAccessControl.sol";\nimport "../utils/Context.sol";\nimport "../utils/Strings.sol";\nimport "../utils/introspection/ERC165.sol";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn\'t allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role\'s admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n "AccessControl: account ",\n Strings.toHexString(account),\n " is missing role ",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role\'s admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``\'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function\'s\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), "AccessControl: can only renounce roles for self");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn\'t perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``\'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/access/IAccessControl.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + 'node_modules/@openzeppelin/contracts/access/Ownable.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/Context.sol";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), "Ownable: caller is not the owner");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), "Ownable: new owner is the zero address");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.9._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/IERC2981.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/introspection/IERC165.sol";\n\n/**\n * @dev Interface for the NFT Royalty Standard.\n *\n * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal\n * support for royalty payments across all NFT marketplaces and ecosystem participants.\n *\n * _Available since v4.5._\n */\ninterface IERC2981 is IERC165 {\n /**\n * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of\n * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.\n */\n function royaltyInfo(uint256 tokenId, uint256 salePrice)\n external\n view\n returns (address receiver, uint256 royaltyAmount);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport "../beacon/IBeacon.sol";\nimport "../../interfaces/IERC1967.sol";\nimport "../../interfaces/draft-IERC1822.sol";\nimport "../../utils/Address.sol";\nimport "../../utils/StorageSlot.sol";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");\n } catch {\n revert("ERC1967Upgrade: new implementation is not UUPS");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), "ERC1967: new admin is the zero address");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256(\'eip1967.proxy.beacon\')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n "ERC1967: beacon implementation is not a contract"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/Proxy.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IBeacon.sol";\nimport "../../access/Ownable.sol";\nimport "../../utils/Address.sol";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n constructor(address implementation_) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract");\n _implementation = newImplementation;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + 'node_modules/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" + }, + 'node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport "../IERC20.sol";\nimport "../extensions/draft-IERC20Permit.sol";\nimport "../../../utils/Address.sol";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // \'safeIncreaseAllowance\' and \'safeDecreaseAllowance\'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n "SafeERC20: approve from non-zero to non-zero allowance"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity\'s return data size checking mechanism, since\n // we\'re implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/token/common/ERC2981.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)\n\npragma solidity ^0.8.0;\n\nimport "../../interfaces/IERC2981.sol";\nimport "../../utils/introspection/ERC165.sol";\n\n/**\n * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.\n *\n * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for\n * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.\n *\n * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the\n * fee is specified in basis points by default.\n *\n * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See\n * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to\n * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.\n *\n * _Available since v4.5._\n */\nabstract contract ERC2981 is IERC2981, ERC165 {\n struct RoyaltyInfo {\n address receiver;\n uint96 royaltyFraction;\n }\n\n RoyaltyInfo private _defaultRoyaltyInfo;\n mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {\n return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @inheritdoc IERC2981\n */\n function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {\n RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];\n\n if (royalty.receiver == address(0)) {\n royalty = _defaultRoyaltyInfo;\n }\n\n uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();\n\n return (royalty.receiver, royaltyAmount);\n }\n\n /**\n * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a\n * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an\n * override.\n */\n function _feeDenominator() internal pure virtual returns (uint96) {\n return 10000;\n }\n\n /**\n * @dev Sets the royalty information that all ids in this contract will default to.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {\n require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");\n require(receiver != address(0), "ERC2981: invalid receiver");\n\n _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Removes default royalty information.\n */\n function _deleteDefaultRoyalty() internal virtual {\n delete _defaultRoyaltyInfo;\n }\n\n /**\n * @dev Sets the royalty information for a specific token id, overriding the global default.\n *\n * Requirements:\n *\n * - `receiver` cannot be the zero address.\n * - `feeNumerator` cannot be greater than the fee denominator.\n */\n function _setTokenRoyalty(\n uint256 tokenId,\n address receiver,\n uint96 feeNumerator\n ) internal virtual {\n require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");\n require(receiver != address(0), "ERC2981: Invalid parameters");\n\n _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);\n }\n\n /**\n * @dev Resets royalty information for the token id back to the global default.\n */\n function _resetTokenRoyalty(uint256 tokenId) internal virtual {\n delete _tokenRoyaltyInfo[tokenId];\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Address.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn\'t rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity\'s `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, "Address: low-level call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, "Address: insufficient balance for call");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, "Address: low-level static call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, "Address: low-level delegate call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), "Address: call to non-contract");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn\'t, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Context.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Create2.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Create2.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.\n * `CREATE2` can be used to compute in advance the address where a smart\n * contract will be deployed, which allows for interesting new mechanisms known\n * as \'counterfactual interactions\'.\n *\n * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more\n * information.\n */\nlibrary Create2 {\n /**\n * @dev Deploys a contract using `CREATE2`. The address where the contract\n * will be deployed can be known in advance via {computeAddress}.\n *\n * The bytecode for a contract can be obtained from Solidity with\n * `type(contractName).creationCode`.\n *\n * Requirements:\n *\n * - `bytecode` must not be empty.\n * - `salt` must have not been used for `bytecode` already.\n * - the factory must have a balance of at least `amount`.\n * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.\n */\n function deploy(\n uint256 amount,\n bytes32 salt,\n bytes memory bytecode\n ) internal returns (address addr) {\n require(address(this).balance >= amount, "Create2: insufficient balance");\n require(bytecode.length != 0, "Create2: bytecode length is zero");\n /// @solidity memory-safe-assembly\n assembly {\n addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)\n }\n require(addr != address(0), "Create2: Failed on deploy");\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the\n * `bytecodeHash` or `salt` will result in a new destination address.\n */\n function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {\n return computeAddress(salt, bytecodeHash, address(this));\n }\n\n /**\n * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at\n * `deployer`. If `deployer` is this contract\'s address, returns the same value as {computeAddress}.\n */\n function computeAddress(\n bytes32 salt,\n bytes32 bytecodeHash,\n address deployer\n ) internal pure returns (address addr) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40) // Get free memory pointer\n\n // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... |\n // |-------------------|---------------------------------------------------------------------------|\n // | bytecodeHash | CCCCCCCCCCCCC...CC |\n // | salt | BBBBBBBBBBBBB...BB |\n // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA |\n // | 0xFF | FF |\n // |-------------------|---------------------------------------------------------------------------|\n // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |\n // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |\n\n mstore(add(ptr, 0x40), bytecodeHash)\n mstore(add(ptr, 0x20), salt)\n mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes\n let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff\n mstore8(start, 0xff)\n addr := keccak256(start, 85)\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/StorageSlot.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Strings.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport "./math/Math.sol";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = "0123456789abcdef";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = "0";\n buffer[1] = "x";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, "Strings: hex length insufficient");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev These functions deal with verification of Merkle Tree proofs.\n *\n * The tree and the proofs can be generated using our\n * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].\n * You will find a quickstart guide in the readme.\n *\n * WARNING: You should avoid using leaf values that are 64 bytes long prior to\n * hashing, or use a hash function other than keccak256 for hashing leaves.\n * This is because the concatenation of a sorted pair of internal nodes in\n * the merkle tree could be reinterpreted as a leaf value.\n * OpenZeppelin\'s JavaScript library generates merkle trees that are safe\n * against this attack out of the box.\n */\nlibrary MerkleProof {\n /**\n * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree\n * defined by `root`. For this, a `proof` must be provided, containing\n * sibling hashes on the branch from the leaf to the root of the tree. Each\n * pair of leaves and each pair of pre-images are assumed to be sorted.\n */\n function verify(\n bytes32[] memory proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n return processProof(proof, leaf) == root;\n }\n\n /**\n * @dev Calldata version of {verify}\n *\n * _Available since v4.7._\n */\n function verifyCalldata(\n bytes32[] calldata proof,\n bytes32 root,\n bytes32 leaf\n ) internal pure returns (bool) {\n return processProofCalldata(proof, leaf) == root;\n }\n\n /**\n * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up\n * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt\n * hash matches the root of the tree. When processing the proof, the pairs\n * of leafs & pre-images are assumed to be sorted.\n *\n * _Available since v4.4._\n */\n function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n computedHash = _hashPair(computedHash, proof[i]);\n }\n return computedHash;\n }\n\n /**\n * @dev Calldata version of {processProof}\n *\n * _Available since v4.7._\n */\n function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {\n bytes32 computedHash = leaf;\n for (uint256 i = 0; i < proof.length; i++) {\n computedHash = _hashPair(computedHash, proof[i]);\n }\n return computedHash;\n }\n\n /**\n * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by\n * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.\n *\n * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\n *\n * _Available since v4.7._\n */\n function multiProofVerify(\n bytes32[] memory proof,\n bool[] memory proofFlags,\n bytes32 root,\n bytes32[] memory leaves\n ) internal pure returns (bool) {\n return processMultiProof(proof, proofFlags, leaves) == root;\n }\n\n /**\n * @dev Calldata version of {multiProofVerify}\n *\n * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\n *\n * _Available since v4.7._\n */\n function multiProofVerifyCalldata(\n bytes32[] calldata proof,\n bool[] calldata proofFlags,\n bytes32 root,\n bytes32[] memory leaves\n ) internal pure returns (bool) {\n return processMultiProofCalldata(proof, proofFlags, leaves) == root;\n }\n\n /**\n * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction\n * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another\n * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false\n * respectively.\n *\n * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree\n * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the\n * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).\n *\n * _Available since v4.7._\n */\n function processMultiProof(\n bytes32[] memory proof,\n bool[] memory proofFlags,\n bytes32[] memory leaves\n ) internal pure returns (bytes32 merkleRoot) {\n // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by\n // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\n // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\n // the merkle tree.\n uint256 leavesLen = leaves.length;\n uint256 totalHashes = proofFlags.length;\n\n // Check proof validity.\n require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");\n\n // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using\n // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue\'s "pop".\n bytes32[] memory hashes = new bytes32[](totalHashes);\n uint256 leafPos = 0;\n uint256 hashPos = 0;\n uint256 proofPos = 0;\n // At each step, we compute the next hash using two values:\n // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we\n // get the next hash.\n // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the\n // `proof` array.\n for (uint256 i = 0; i < totalHashes; i++) {\n bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\n bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];\n hashes[i] = _hashPair(a, b);\n }\n\n if (totalHashes > 0) {\n return hashes[totalHashes - 1];\n } else if (leavesLen > 0) {\n return leaves[0];\n } else {\n return proof[0];\n }\n }\n\n /**\n * @dev Calldata version of {processMultiProof}.\n *\n * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.\n *\n * _Available since v4.7._\n */\n function processMultiProofCalldata(\n bytes32[] calldata proof,\n bool[] calldata proofFlags,\n bytes32[] memory leaves\n ) internal pure returns (bytes32 merkleRoot) {\n // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by\n // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the\n // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of\n // the merkle tree.\n uint256 leavesLen = leaves.length;\n uint256 totalHashes = proofFlags.length;\n\n // Check proof validity.\n require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");\n\n // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using\n // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue\'s "pop".\n bytes32[] memory hashes = new bytes32[](totalHashes);\n uint256 leafPos = 0;\n uint256 hashPos = 0;\n uint256 proofPos = 0;\n // At each step, we compute the next hash using two values:\n // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we\n // get the next hash.\n // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the\n // `proof` array.\n for (uint256 i = 0; i < totalHashes; i++) {\n bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];\n bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];\n hashes[i] = _hashPair(a, b);\n }\n\n if (totalHashes > 0) {\n return hashes[totalHashes - 1];\n } else if (leavesLen > 0) {\n return leaves[0];\n } else {\n return proof[0];\n }\n }\n\n function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {\n return a < b ? _efficientHash(a, b) : _efficientHash(b, a);\n }\n\n function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {\n /// @solidity memory-safe-assembly\n assembly {\n mstore(0x00, a)\n mstore(0x20, b)\n value := keccak256(0x00, 0x40)\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/ERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IERC165.sol";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/math/Math.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + 'node_modules/erc721a/contracts/ERC721A.sol': { + content: + "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.3\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport './IERC721A.sol';\n\n/**\n * @dev Interface of ERC721 token receiver.\n */\ninterface ERC721A__IERC721Receiver {\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n\n/**\n * @title ERC721A\n *\n * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)\n * Non-Fungible Token Standard, including the Metadata extension.\n * Optimized for lower gas during batch mints.\n *\n * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)\n * starting from `_startTokenId()`.\n *\n * Assumptions:\n *\n * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.\n * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).\n */\ncontract ERC721A is IERC721A {\n // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).\n struct TokenApprovalRef {\n address value;\n }\n\n // =============================================================\n // CONSTANTS\n // =============================================================\n\n // Mask of an entry in packed address data.\n uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;\n\n // The bit position of `numberMinted` in packed address data.\n uint256 private constant _BITPOS_NUMBER_MINTED = 64;\n\n // The bit position of `numberBurned` in packed address data.\n uint256 private constant _BITPOS_NUMBER_BURNED = 128;\n\n // The bit position of `aux` in packed address data.\n uint256 private constant _BITPOS_AUX = 192;\n\n // Mask of all 256 bits in packed address data except the 64 bits for `aux`.\n uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;\n\n // The bit position of `startTimestamp` in packed ownership.\n uint256 private constant _BITPOS_START_TIMESTAMP = 160;\n\n // The bit mask of the `burned` bit in packed ownership.\n uint256 private constant _BITMASK_BURNED = 1 << 224;\n\n // The bit position of the `nextInitialized` bit in packed ownership.\n uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;\n\n // The bit mask of the `nextInitialized` bit in packed ownership.\n uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;\n\n // The bit position of `extraData` in packed ownership.\n uint256 private constant _BITPOS_EXTRA_DATA = 232;\n\n // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.\n uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;\n\n // The mask of the lower 160 bits for addresses.\n uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;\n\n // The maximum `quantity` that can be minted with {_mintERC2309}.\n // This limit is to prevent overflows on the address data entries.\n // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}\n // is required to cause an overflow, which is unrealistic.\n uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;\n\n // The `Transfer` event signature is given by:\n // `keccak256(bytes(\"Transfer(address,address,uint256)\"))`.\n bytes32 private constant _TRANSFER_EVENT_SIGNATURE =\n 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;\n\n // =============================================================\n // STORAGE\n // =============================================================\n\n // The next token ID to be minted.\n uint256 private _currentIndex;\n\n // The number of tokens burned.\n uint256 private _burnCounter;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to ownership details\n // An empty struct value does not necessarily mean the token is unowned.\n // See {_packedOwnershipOf} implementation for details.\n //\n // Bits Layout:\n // - [0..159] `addr`\n // - [160..223] `startTimestamp`\n // - [224] `burned`\n // - [225] `nextInitialized`\n // - [232..255] `extraData`\n mapping(uint256 => uint256) private _packedOwnerships;\n\n // Mapping owner address to address data.\n //\n // Bits Layout:\n // - [0..63] `balance`\n // - [64..127] `numberMinted`\n // - [128..191] `numberBurned`\n // - [192..255] `aux`\n mapping(address => uint256) private _packedAddressData;\n\n // Mapping from token ID to approved address.\n mapping(uint256 => TokenApprovalRef) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n // =============================================================\n // CONSTRUCTOR\n // =============================================================\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n _currentIndex = _startTokenId();\n }\n\n // =============================================================\n // TOKEN COUNTING OPERATIONS\n // =============================================================\n\n /**\n * @dev Returns the starting token ID.\n * To change the starting token ID, please override this function.\n */\n function _startTokenId() internal view virtual returns (uint256) {\n return 0;\n }\n\n /**\n * @dev Returns the next token ID to be minted.\n */\n function _nextTokenId() internal view virtual returns (uint256) {\n return _currentIndex;\n }\n\n /**\n * @dev Returns the total number of tokens in existence.\n * Burned tokens will reduce the count.\n * To get the total number of tokens minted, please see {_totalMinted}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n // Counter underflow is impossible as _burnCounter cannot be incremented\n // more than `_currentIndex - _startTokenId()` times.\n unchecked {\n return _currentIndex - _burnCounter - _startTokenId();\n }\n }\n\n /**\n * @dev Returns the total amount of tokens minted in the contract.\n */\n function _totalMinted() internal view virtual returns (uint256) {\n // Counter underflow is impossible as `_currentIndex` does not decrement,\n // and it is initialized to `_startTokenId()`.\n unchecked {\n return _currentIndex - _startTokenId();\n }\n }\n\n /**\n * @dev Returns the total number of tokens burned.\n */\n function _totalBurned() internal view virtual returns (uint256) {\n return _burnCounter;\n }\n\n // =============================================================\n // ADDRESS DATA OPERATIONS\n // =============================================================\n\n /**\n * @dev Returns the number of tokens in `owner`'s account.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n if (owner == address(0)) revert BalanceQueryForZeroAddress();\n return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n /**\n * Returns the number of tokens minted by `owner`.\n */\n function _numberMinted(address owner) internal view returns (uint256) {\n return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n /**\n * Returns the number of tokens burned by or on behalf of `owner`.\n */\n function _numberBurned(address owner) internal view returns (uint256) {\n return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;\n }\n\n /**\n * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).\n */\n function _getAux(address owner) internal view returns (uint64) {\n return uint64(_packedAddressData[owner] >> _BITPOS_AUX);\n }\n\n /**\n * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).\n * If there are multiple variables, please pack them into a uint64.\n */\n function _setAux(address owner, uint64 aux) internal virtual {\n uint256 packed = _packedAddressData[owner];\n uint256 auxCasted;\n // Cast `aux` with assembly to avoid redundant masking.\n assembly {\n auxCasted := aux\n }\n packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);\n _packedAddressData[owner] = packed;\n }\n\n // =============================================================\n // IERC165\n // =============================================================\n\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30000 gas.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n // The interface IDs are constants representing the first 4 bytes\n // of the XOR of all function selectors in the interface.\n // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)\n // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)\n return\n interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.\n interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.\n interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.\n }\n\n // =============================================================\n // IERC721Metadata\n // =============================================================\n\n /**\n * @dev Returns the token collection name.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, it can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return '';\n }\n\n // =============================================================\n // OWNERSHIPS OPERATIONS\n // =============================================================\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n return address(uint160(_packedOwnershipOf(tokenId)));\n }\n\n /**\n * @dev Gas spent here starts off proportional to the maximum mint batch size.\n * It gradually moves to O(1) as tokens get transferred around over time.\n */\n function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {\n return _unpackedOwnership(_packedOwnershipOf(tokenId));\n }\n\n /**\n * @dev Returns the unpacked `TokenOwnership` struct at `index`.\n */\n function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {\n return _unpackedOwnership(_packedOwnerships[index]);\n }\n\n /**\n * @dev Initializes the ownership slot minted at `index` for efficiency purposes.\n */\n function _initializeOwnershipAt(uint256 index) internal virtual {\n if (_packedOwnerships[index] == 0) {\n _packedOwnerships[index] = _packedOwnershipOf(index);\n }\n }\n\n /**\n * Returns the packed ownership data of `tokenId`.\n */\n function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {\n uint256 curr = tokenId;\n\n unchecked {\n if (_startTokenId() <= curr)\n if (curr < _currentIndex) {\n uint256 packed = _packedOwnerships[curr];\n // If not burned.\n if (packed & _BITMASK_BURNED == 0) {\n // Invariant:\n // There will always be an initialized ownership slot\n // (i.e. `ownership.addr != address(0) && ownership.burned == false`)\n // before an unintialized ownership slot\n // (i.e. `ownership.addr == address(0) && ownership.burned == false`)\n // Hence, `curr` will not underflow.\n //\n // We can directly compare the packed value.\n // If the address is zero, packed will be zero.\n while (packed == 0) {\n packed = _packedOwnerships[--curr];\n }\n return packed;\n }\n }\n }\n revert OwnerQueryForNonexistentToken();\n }\n\n /**\n * @dev Returns the unpacked `TokenOwnership` struct from `packed`.\n */\n function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {\n ownership.addr = address(uint160(packed));\n ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);\n ownership.burned = packed & _BITMASK_BURNED != 0;\n ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);\n }\n\n /**\n * @dev Packs ownership data into a single uint256.\n */\n function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {\n assembly {\n // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.\n owner := and(owner, _BITMASK_ADDRESS)\n // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.\n result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))\n }\n }\n\n /**\n * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.\n */\n function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {\n // For branchless setting of the `nextInitialized` flag.\n assembly {\n // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.\n result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))\n }\n }\n\n // =============================================================\n // APPROVAL OPERATIONS\n // =============================================================\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the\n * zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) public payable virtual override {\n address owner = ownerOf(tokenId);\n\n if (_msgSenderERC721A() != owner)\n if (!isApprovedForAll(owner, _msgSenderERC721A())) {\n revert ApprovalCallerNotOwnerNorApproved();\n }\n\n _tokenApprovals[tokenId].value = to;\n emit Approval(owner, to, tokenId);\n }\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();\n\n return _tokenApprovals[tokenId].value;\n }\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom}\n * for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _operatorApprovals[_msgSenderERC721A()][operator] = approved;\n emit ApprovalForAll(_msgSenderERC721A(), operator, approved);\n }\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted. See {_mint}.\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return\n _startTokenId() <= tokenId &&\n tokenId < _currentIndex && // If within bounds,\n _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.\n }\n\n /**\n * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.\n */\n function _isSenderApprovedOrOwner(\n address approvedAddress,\n address owner,\n address msgSender\n ) private pure returns (bool result) {\n assembly {\n // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.\n owner := and(owner, _BITMASK_ADDRESS)\n // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.\n msgSender := and(msgSender, _BITMASK_ADDRESS)\n // `msgSender == owner || msgSender == approvedAddress`.\n result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))\n }\n }\n\n /**\n * @dev Returns the storage slot and value for the approved address of `tokenId`.\n */\n function _getApprovedSlotAndAddress(uint256 tokenId)\n private\n view\n returns (uint256 approvedAddressSlot, address approvedAddress)\n {\n TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];\n // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.\n assembly {\n approvedAddressSlot := tokenApproval.slot\n approvedAddress := sload(approvedAddressSlot)\n }\n }\n\n // =============================================================\n // TRANSFER OPERATIONS\n // =============================================================\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token\n * by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public payable virtual override {\n uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();\n\n (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);\n\n // The nested ifs save around 20+ gas over a compound boolean condition.\n if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))\n if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();\n\n if (to == address(0)) revert TransferToZeroAddress();\n\n _beforeTokenTransfers(from, to, tokenId, 1);\n\n // Clear approvals from the previous owner.\n assembly {\n if approvedAddress {\n // This is equivalent to `delete _tokenApprovals[tokenId]`.\n sstore(approvedAddressSlot, 0)\n }\n }\n\n // Underflow of the sender's balance is impossible because we check for\n // ownership above and the recipient's balance can't realistically overflow.\n // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.\n unchecked {\n // We can directly increment and decrement the balances.\n --_packedAddressData[from]; // Updates: `balance -= 1`.\n ++_packedAddressData[to]; // Updates: `balance += 1`.\n\n // Updates:\n // - `address` to the next owner.\n // - `startTimestamp` to the timestamp of transfering.\n // - `burned` to `false`.\n // - `nextInitialized` to `true`.\n _packedOwnerships[tokenId] = _packOwnershipData(\n to,\n _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)\n );\n\n // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .\n if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {\n uint256 nextTokenId = tokenId + 1;\n // If the next slot's address is zero and not burned (i.e. packed value is zero).\n if (_packedOwnerships[nextTokenId] == 0) {\n // If the next slot is within bounds.\n if (nextTokenId != _currentIndex) {\n // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.\n _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n }\n }\n }\n }\n\n emit Transfer(from, to, tokenId);\n _afterTokenTransfers(from, to, tokenId, 1);\n }\n\n /**\n * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public payable virtual override {\n safeTransferFrom(from, to, tokenId, '');\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token\n * by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement\n * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) public payable virtual override {\n transferFrom(from, to, tokenId);\n if (to.code.length != 0)\n if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {\n revert TransferToNonERC721ReceiverImplementer();\n }\n }\n\n /**\n * @dev Hook that is called before a set of serially-ordered token IDs\n * are about to be transferred. This includes minting.\n * And also called before burning one token.\n *\n * `startTokenId` - the first token ID to be transferred.\n * `quantity` - the amount to be transferred.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, `tokenId` will be burned by `from`.\n * - `from` and `to` are never both zero.\n */\n function _beforeTokenTransfers(\n address from,\n address to,\n uint256 startTokenId,\n uint256 quantity\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after a set of serially-ordered token IDs\n * have been transferred. This includes minting.\n * And also called after one token has been burned.\n *\n * `startTokenId` - the first token ID to be transferred.\n * `quantity` - the amount to be transferred.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been\n * transferred to `to`.\n * - When `from` is zero, `tokenId` has been minted for `to`.\n * - When `to` is zero, `tokenId` has been burned by `from`.\n * - `from` and `to` are never both zero.\n */\n function _afterTokenTransfers(\n address from,\n address to,\n uint256 startTokenId,\n uint256 quantity\n ) internal virtual {}\n\n /**\n * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.\n *\n * `from` - Previous owner of the given token ID.\n * `to` - Target address that will receive the token.\n * `tokenId` - Token ID to be transferred.\n * `_data` - Optional data to send along with the call.\n *\n * Returns whether the call correctly returned the expected magic value.\n */\n function _checkContractOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) private returns (bool) {\n try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (\n bytes4 retval\n ) {\n return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert TransferToNonERC721ReceiverImplementer();\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n }\n\n // =============================================================\n // MINT OPERATIONS\n // =============================================================\n\n /**\n * @dev Mints `quantity` tokens and transfers them to `to`.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `quantity` must be greater than 0.\n *\n * Emits a {Transfer} event for each mint.\n */\n function _mint(address to, uint256 quantity) internal virtual {\n uint256 startTokenId = _currentIndex;\n if (quantity == 0) revert MintZeroQuantity();\n\n _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n // Overflows are incredibly unrealistic.\n // `balance` and `numberMinted` have a maximum limit of 2**64.\n // `tokenId` has a maximum limit of 2**256.\n unchecked {\n // Updates:\n // - `balance += quantity`.\n // - `numberMinted += quantity`.\n //\n // We can directly add to the `balance` and `numberMinted`.\n _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);\n\n // Updates:\n // - `address` to the owner.\n // - `startTimestamp` to the timestamp of minting.\n // - `burned` to `false`.\n // - `nextInitialized` to `quantity == 1`.\n _packedOwnerships[startTokenId] = _packOwnershipData(\n to,\n _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)\n );\n\n uint256 toMasked;\n uint256 end = startTokenId + quantity;\n\n // Use assembly to loop and emit the `Transfer` event for gas savings.\n // The duplicated `log4` removes an extra check and reduces stack juggling.\n // The assembly, together with the surrounding Solidity code, have been\n // delicately arranged to nudge the compiler into producing optimized opcodes.\n assembly {\n // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.\n toMasked := and(to, _BITMASK_ADDRESS)\n // Emit the `Transfer` event.\n log4(\n 0, // Start of data (0, since no data).\n 0, // End of data (0, since no data).\n _TRANSFER_EVENT_SIGNATURE, // Signature.\n 0, // `address(0)`.\n toMasked, // `to`.\n startTokenId // `tokenId`.\n )\n\n // The `iszero(eq(,))` check ensures that large values of `quantity`\n // that overflows uint256 will make the loop run out of gas.\n // The compiler will optimize the `iszero` away for performance.\n for {\n let tokenId := add(startTokenId, 1)\n } iszero(eq(tokenId, end)) {\n tokenId := add(tokenId, 1)\n } {\n // Emit the `Transfer` event. Similar to above.\n log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)\n }\n }\n if (toMasked == 0) revert MintToZeroAddress();\n\n _currentIndex = end;\n }\n _afterTokenTransfers(address(0), to, startTokenId, quantity);\n }\n\n /**\n * @dev Mints `quantity` tokens and transfers them to `to`.\n *\n * This function is intended for efficient minting only during contract creation.\n *\n * It emits only one {ConsecutiveTransfer} as defined in\n * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),\n * instead of a sequence of {Transfer} event(s).\n *\n * Calling this function outside of contract creation WILL make your contract\n * non-compliant with the ERC721 standard.\n * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309\n * {ConsecutiveTransfer} event is only permissible during contract creation.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `quantity` must be greater than 0.\n *\n * Emits a {ConsecutiveTransfer} event.\n */\n function _mintERC2309(address to, uint256 quantity) internal virtual {\n uint256 startTokenId = _currentIndex;\n if (to == address(0)) revert MintToZeroAddress();\n if (quantity == 0) revert MintZeroQuantity();\n if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();\n\n _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n // Overflows are unrealistic due to the above check for `quantity` to be below the limit.\n unchecked {\n // Updates:\n // - `balance += quantity`.\n // - `numberMinted += quantity`.\n //\n // We can directly add to the `balance` and `numberMinted`.\n _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);\n\n // Updates:\n // - `address` to the owner.\n // - `startTimestamp` to the timestamp of minting.\n // - `burned` to `false`.\n // - `nextInitialized` to `quantity == 1`.\n _packedOwnerships[startTokenId] = _packOwnershipData(\n to,\n _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)\n );\n\n emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);\n\n _currentIndex = startTokenId + quantity;\n }\n _afterTokenTransfers(address(0), to, startTokenId, quantity);\n }\n\n /**\n * @dev Safely mints `quantity` tokens and transfers them to `to`.\n *\n * Requirements:\n *\n * - If `to` refers to a smart contract, it must implement\n * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.\n * - `quantity` must be greater than 0.\n *\n * See {_mint}.\n *\n * Emits a {Transfer} event for each mint.\n */\n function _safeMint(\n address to,\n uint256 quantity,\n bytes memory _data\n ) internal virtual {\n _mint(to, quantity);\n\n unchecked {\n if (to.code.length != 0) {\n uint256 end = _currentIndex;\n uint256 index = end - quantity;\n do {\n if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {\n revert TransferToNonERC721ReceiverImplementer();\n }\n } while (index < end);\n // Reentrancy protection.\n if (_currentIndex != end) revert();\n }\n }\n }\n\n /**\n * @dev Equivalent to `_safeMint(to, quantity, '')`.\n */\n function _safeMint(address to, uint256 quantity) internal virtual {\n _safeMint(to, quantity, '');\n }\n\n // =============================================================\n // BURN OPERATIONS\n // =============================================================\n\n /**\n * @dev Equivalent to `_burn(tokenId, false)`.\n */\n function _burn(uint256 tokenId) internal virtual {\n _burn(tokenId, false);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId, bool approvalCheck) internal virtual {\n uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);\n\n address from = address(uint160(prevOwnershipPacked));\n\n (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);\n\n if (approvalCheck) {\n // The nested ifs save around 20+ gas over a compound boolean condition.\n if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))\n if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();\n }\n\n _beforeTokenTransfers(from, address(0), tokenId, 1);\n\n // Clear approvals from the previous owner.\n assembly {\n if approvedAddress {\n // This is equivalent to `delete _tokenApprovals[tokenId]`.\n sstore(approvedAddressSlot, 0)\n }\n }\n\n // Underflow of the sender's balance is impossible because we check for\n // ownership above and the recipient's balance can't realistically overflow.\n // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.\n unchecked {\n // Updates:\n // - `balance -= 1`.\n // - `numberBurned += 1`.\n //\n // We can directly decrement the balance, and increment the number burned.\n // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.\n _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;\n\n // Updates:\n // - `address` to the last owner.\n // - `startTimestamp` to the timestamp of burning.\n // - `burned` to `true`.\n // - `nextInitialized` to `true`.\n _packedOwnerships[tokenId] = _packOwnershipData(\n from,\n (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)\n );\n\n // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .\n if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {\n uint256 nextTokenId = tokenId + 1;\n // If the next slot's address is zero and not burned (i.e. packed value is zero).\n if (_packedOwnerships[nextTokenId] == 0) {\n // If the next slot is within bounds.\n if (nextTokenId != _currentIndex) {\n // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.\n _packedOwnerships[nextTokenId] = prevOwnershipPacked;\n }\n }\n }\n }\n\n emit Transfer(from, address(0), tokenId);\n _afterTokenTransfers(from, address(0), tokenId, 1);\n\n // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.\n unchecked {\n _burnCounter++;\n }\n }\n\n // =============================================================\n // EXTRA DATA OPERATIONS\n // =============================================================\n\n /**\n * @dev Directly sets the extra data for the ownership data `index`.\n */\n function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {\n uint256 packed = _packedOwnerships[index];\n if (packed == 0) revert OwnershipNotInitializedForExtraData();\n uint256 extraDataCasted;\n // Cast `extraData` with assembly to avoid redundant masking.\n assembly {\n extraDataCasted := extraData\n }\n packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);\n _packedOwnerships[index] = packed;\n }\n\n /**\n * @dev Called during each token transfer to set the 24bit `extraData` field.\n * Intended to be overridden by the cosumer contract.\n *\n * `previousExtraData` - the value of `extraData` before transfer.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, `tokenId` will be burned by `from`.\n * - `from` and `to` are never both zero.\n */\n function _extraData(\n address from,\n address to,\n uint24 previousExtraData\n ) internal view virtual returns (uint24) {}\n\n /**\n * @dev Returns the next extra data for the packed ownership data.\n * The returned result is shifted into position.\n */\n function _nextExtraData(\n address from,\n address to,\n uint256 prevOwnershipPacked\n ) private view returns (uint256) {\n uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);\n return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;\n }\n\n // =============================================================\n // OTHER OPERATIONS\n // =============================================================\n\n /**\n * @dev Returns the message sender (defaults to `msg.sender`).\n *\n * If you are writing GSN compatible contracts, you need to override this function.\n */\n function _msgSenderERC721A() internal view virtual returns (address) {\n return msg.sender;\n }\n\n /**\n * @dev Converts a uint256 to its ASCII string decimal representation.\n */\n function _toString(uint256 value) internal pure virtual returns (string memory str) {\n assembly {\n // The maximum value of a uint256 contains 78 digits (1 byte per digit), but\n // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.\n // We will need 1 word for the trailing zeros padding, 1 word for the length,\n // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.\n let m := add(mload(0x40), 0xa0)\n // Update the free memory pointer to allocate.\n mstore(0x40, m)\n // Assign the `str` to the end.\n str := sub(m, 0x20)\n // Zeroize the slot after the string.\n mstore(str, 0)\n\n // Cache the end of the memory to calculate the length later.\n let end := str\n\n // We write the string from rightmost digit to leftmost digit.\n // The following is essentially a do-while loop that also handles the zero case.\n // prettier-ignore\n for { let temp := value } 1 {} {\n str := sub(str, 1)\n // Write the character to the pointer.\n // The ASCII index of the '0' character is 48.\n mstore8(str, add(48, mod(temp, 10)))\n // Keep dividing `temp` until zero.\n temp := div(temp, 10)\n // prettier-ignore\n if iszero(temp) { break }\n }\n\n let length := sub(end, str)\n // Move the pointer 32 bytes leftwards to make room for the length.\n str := sub(str, 0x20)\n // Store the length.\n mstore(str, length)\n }\n }\n}\n" + }, + 'node_modules/erc721a/contracts/IERC721A.sol': { + content: + "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.3\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\n/**\n * @dev Interface of ERC721A.\n */\ninterface IERC721A {\n /**\n * The caller must own the token or be an approved operator.\n */\n error ApprovalCallerNotOwnerNorApproved();\n\n /**\n * The token does not exist.\n */\n error ApprovalQueryForNonexistentToken();\n\n /**\n * Cannot query the balance for the zero address.\n */\n error BalanceQueryForZeroAddress();\n\n /**\n * Cannot mint to the zero address.\n */\n error MintToZeroAddress();\n\n /**\n * The quantity of tokens minted must be more than zero.\n */\n error MintZeroQuantity();\n\n /**\n * The token does not exist.\n */\n error OwnerQueryForNonexistentToken();\n\n /**\n * The caller must own the token or be an approved operator.\n */\n error TransferCallerNotOwnerNorApproved();\n\n /**\n * The token must be owned by `from`.\n */\n error TransferFromIncorrectOwner();\n\n /**\n * Cannot safely transfer to a contract that does not implement the\n * ERC721Receiver interface.\n */\n error TransferToNonERC721ReceiverImplementer();\n\n /**\n * Cannot transfer to the zero address.\n */\n error TransferToZeroAddress();\n\n /**\n * The token does not exist.\n */\n error URIQueryForNonexistentToken();\n\n /**\n * The `quantity` minted with ERC2309 exceeds the safety limit.\n */\n error MintERC2309QuantityExceedsLimit();\n\n /**\n * The `extraData` cannot be set on an unintialized ownership slot.\n */\n error OwnershipNotInitializedForExtraData();\n\n // =============================================================\n // STRUCTS\n // =============================================================\n\n struct TokenOwnership {\n // The address of the owner.\n address addr;\n // Stores the start time of ownership with minimal overhead for tokenomics.\n uint64 startTimestamp;\n // Whether the token has been burned.\n bool burned;\n // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.\n uint24 extraData;\n }\n\n // =============================================================\n // TOKEN COUNTERS\n // =============================================================\n\n /**\n * @dev Returns the total number of tokens in existence.\n * Burned tokens will reduce the count.\n * To get the total number of tokens minted, please see {_totalMinted}.\n */\n function totalSupply() external view returns (uint256);\n\n // =============================================================\n // IERC165\n // =============================================================\n\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n\n // =============================================================\n // IERC721\n // =============================================================\n\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables\n * (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in `owner`'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`,\n * checking first that contract recipients are aware of the ERC721 protocol\n * to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move\n * this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement\n * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external payable;\n\n /**\n * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external payable;\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom}\n * whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token\n * by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external payable;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the\n * zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external payable;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom}\n * for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n // =============================================================\n // IERC721Metadata\n // =============================================================\n\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n\n // =============================================================\n // IERC2309\n // =============================================================\n\n /**\n * @dev Emitted when tokens in `fromTokenId` to `toTokenId`\n * (inclusive) is transferred from `from` to `to`, as defined in the\n * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.\n *\n * See {_mintERC2309} for more details.\n */\n event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);\n}\n" + }, + 'node_modules/erc721a/contracts/extensions/ERC721AQueryable.sol': { + content: + "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.3\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport './IERC721AQueryable.sol';\nimport '../ERC721A.sol';\n\n/**\n * @title ERC721AQueryable.\n *\n * @dev ERC721A subclass with convenience query functions.\n */\nabstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {\n /**\n * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.\n *\n * If the `tokenId` is out of bounds:\n *\n * - `addr = address(0)`\n * - `startTimestamp = 0`\n * - `burned = false`\n * - `extraData = 0`\n *\n * If the `tokenId` is burned:\n *\n * - `addr =
`\n * - `startTimestamp = `\n * - `burned = true`\n * - `extraData = `\n *\n * Otherwise:\n *\n * - `addr =
`\n * - `startTimestamp = `\n * - `burned = false`\n * - `extraData = `\n */\n function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) {\n TokenOwnership memory ownership;\n if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) {\n return ownership;\n }\n ownership = _ownershipAt(tokenId);\n if (ownership.burned) {\n return ownership;\n }\n return _ownershipOf(tokenId);\n }\n\n /**\n * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.\n * See {ERC721AQueryable-explicitOwnershipOf}\n */\n function explicitOwnershipsOf(uint256[] calldata tokenIds)\n external\n view\n virtual\n override\n returns (TokenOwnership[] memory)\n {\n unchecked {\n uint256 tokenIdsLength = tokenIds.length;\n TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);\n for (uint256 i; i != tokenIdsLength; ++i) {\n ownerships[i] = explicitOwnershipOf(tokenIds[i]);\n }\n return ownerships;\n }\n }\n\n /**\n * @dev Returns an array of token IDs owned by `owner`,\n * in the range [`start`, `stop`)\n * (i.e. `start <= tokenId < stop`).\n *\n * This function allows for tokens to be queried if the collection\n * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.\n *\n * Requirements:\n *\n * - `start < stop`\n */\n function tokensOfOwnerIn(\n address owner,\n uint256 start,\n uint256 stop\n ) external view virtual override returns (uint256[] memory) {\n unchecked {\n if (start >= stop) revert InvalidQueryRange();\n uint256 tokenIdsIdx;\n uint256 stopLimit = _nextTokenId();\n // Set `start = max(start, _startTokenId())`.\n if (start < _startTokenId()) {\n start = _startTokenId();\n }\n // Set `stop = min(stop, stopLimit)`.\n if (stop > stopLimit) {\n stop = stopLimit;\n }\n uint256 tokenIdsMaxLength = balanceOf(owner);\n // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,\n // to cater for cases where `balanceOf(owner)` is too big.\n if (start < stop) {\n uint256 rangeLength = stop - start;\n if (rangeLength < tokenIdsMaxLength) {\n tokenIdsMaxLength = rangeLength;\n }\n } else {\n tokenIdsMaxLength = 0;\n }\n uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);\n if (tokenIdsMaxLength == 0) {\n return tokenIds;\n }\n // We need to call `explicitOwnershipOf(start)`,\n // because the slot at `start` may not be initialized.\n TokenOwnership memory ownership = explicitOwnershipOf(start);\n address currOwnershipAddr;\n // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.\n // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.\n if (!ownership.burned) {\n currOwnershipAddr = ownership.addr;\n }\n for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {\n ownership = _ownershipAt(i);\n if (ownership.burned) {\n continue;\n }\n if (ownership.addr != address(0)) {\n currOwnershipAddr = ownership.addr;\n }\n if (currOwnershipAddr == owner) {\n tokenIds[tokenIdsIdx++] = i;\n }\n }\n // Downsize the array to fit.\n assembly {\n mstore(tokenIds, tokenIdsIdx)\n }\n return tokenIds;\n }\n }\n\n /**\n * @dev Returns an array of token IDs owned by `owner`.\n *\n * This function scans the ownership mapping and is O(`totalSupply`) in complexity.\n * It is meant to be called off-chain.\n *\n * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into\n * multiple smaller scans if the collection is large enough to cause\n * an out-of-gas error (10K collections should be fine).\n */\n function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) {\n unchecked {\n uint256 tokenIdsIdx;\n address currOwnershipAddr;\n uint256 tokenIdsLength = balanceOf(owner);\n uint256[] memory tokenIds = new uint256[](tokenIdsLength);\n TokenOwnership memory ownership;\n for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {\n ownership = _ownershipAt(i);\n if (ownership.burned) {\n continue;\n }\n if (ownership.addr != address(0)) {\n currOwnershipAddr = ownership.addr;\n }\n if (currOwnershipAddr == owner) {\n tokenIds[tokenIdsIdx++] = i;\n }\n }\n return tokenIds;\n }\n }\n}\n" + }, + 'node_modules/erc721a/contracts/extensions/IERC721AQueryable.sol': { + content: + "// SPDX-License-Identifier: MIT\n// ERC721A Contracts v4.2.3\n// Creator: Chiru Labs\n\npragma solidity ^0.8.4;\n\nimport '../IERC721A.sol';\n\n/**\n * @dev Interface of ERC721AQueryable.\n */\ninterface IERC721AQueryable is IERC721A {\n /**\n * Invalid query range (`start` >= `stop`).\n */\n error InvalidQueryRange();\n\n /**\n * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.\n *\n * If the `tokenId` is out of bounds:\n *\n * - `addr = address(0)`\n * - `startTimestamp = 0`\n * - `burned = false`\n * - `extraData = 0`\n *\n * If the `tokenId` is burned:\n *\n * - `addr =
`\n * - `startTimestamp = `\n * - `burned = true`\n * - `extraData = `\n *\n * Otherwise:\n *\n * - `addr =
`\n * - `startTimestamp = `\n * - `burned = false`\n * - `extraData = `\n */\n function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);\n\n /**\n * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.\n * See {ERC721AQueryable-explicitOwnershipOf}\n */\n function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);\n\n /**\n * @dev Returns an array of token IDs owned by `owner`,\n * in the range [`start`, `stop`)\n * (i.e. `start <= tokenId < stop`).\n *\n * This function allows for tokens to be queried if the collection\n * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.\n *\n * Requirements:\n *\n * - `start < stop`\n */\n function tokensOfOwnerIn(\n address owner,\n uint256 start,\n uint256 stop\n ) external view returns (uint256[] memory);\n\n /**\n * @dev Returns an array of token IDs owned by `owner`.\n *\n * This function scans the ownership mapping and is O(`totalSupply`) in complexity.\n * It is meant to be called off-chain.\n *\n * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into\n * multiple smaller scans if the collection is large enough to cause\n * an out-of-gas error (10K collections should be fine).\n */\n function tokensOfOwner(address owner) external view returns (uint256[] memory);\n}\n" + }, + 'src/proxies/SequenceProxyFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {\r\n TransparentUpgradeableBeaconProxy,\r\n ITransparentUpgradeableBeaconProxy\r\n} from "./TransparentUpgradeableBeaconProxy.sol";\r\n\r\nimport {Create2} from "@openzeppelin/contracts/utils/Create2.sol";\r\nimport {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";\r\nimport {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";\r\n\r\n/**\r\n * An proxy factory that deploys upgradeable beacon proxies.\r\n * @dev The factory owner is able to upgrade the beacon implementation.\r\n * @dev Proxy deployers are able to override the beacon reference with their own.\r\n */\r\nabstract contract SequenceProxyFactory is Ownable {\r\n UpgradeableBeacon public beacon;\r\n\r\n /**\r\n * Initialize a Sequence Proxy Factory.\r\n * @param implementation The initial beacon implementation.\r\n * @param factoryOwner The owner of the factory.\r\n */\r\n function _initialize(address implementation, address factoryOwner) internal {\r\n beacon = new UpgradeableBeacon(implementation);\r\n Ownable._transferOwnership(factoryOwner);\r\n }\r\n\r\n /**\r\n * Deploys and initializes a new proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @param _data The initialization data.\r\n * @return proxyAddress The address of the deployed proxy.\r\n */\r\n function _createProxy(bytes32 _salt, address _proxyOwner, bytes memory _data) internal returns (address proxyAddress) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes memory bytecode = type(TransparentUpgradeableBeaconProxy).creationCode;\r\n\r\n proxyAddress = Create2.deploy(0, saltedHash, bytecode);\r\n ITransparentUpgradeableBeaconProxy(payable(proxyAddress)).initialize(_proxyOwner, address(beacon), _data);\r\n }\r\n\r\n /**\r\n * Computes the address of a proxy instance.\r\n * @param _salt The deployment salt.\r\n * @param _proxyOwner The owner of the proxy.\r\n * @return proxy The expected address of the deployed proxy.\r\n */\r\n function _computeProxyAddress(bytes32 _salt, address _proxyOwner, bytes memory _data) internal view returns (address) {\r\n bytes32 saltedHash = keccak256(abi.encodePacked(_salt, _proxyOwner, address(beacon), _data));\r\n bytes32 bytecodeHash = keccak256(type(TransparentUpgradeableBeaconProxy).creationCode);\r\n\r\n return Create2.computeAddress(saltedHash, bytecodeHash);\r\n }\r\n\r\n /**\r\n * Upgrades the beacon implementation.\r\n * @param implementation The new beacon implementation.\r\n */\r\n function upgradeBeacon(address implementation) public onlyOwner {\r\n beacon.upgradeTo(implementation);\r\n }\r\n}\r\n' + }, + 'src/proxies/TransparentUpgradeableBeaconProxy.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {BeaconProxy, Proxy} from "./openzeppelin/BeaconProxy.sol";\r\nimport {TransparentUpgradeableProxy, ERC1967Proxy} from "./openzeppelin/TransparentUpgradeableProxy.sol";\r\n\r\ninterface ITransparentUpgradeableBeaconProxy {\r\n function initialize(address admin, address beacon, bytes memory data) external;\r\n}\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * @dev As the underlying proxy implementation (TransparentUpgradeableProxy) allows the admin to call the implementation,\r\n * care must be taken to avoid proxy selector collisions. Implementation selectors must not conflict with the proxy selectors.\r\n * See https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * The proxy selectors are:\r\n * - 0xcf7a1d77: initialize\r\n * - 0x3659cfe6: upgradeTo (from TransparentUpgradeableProxy)\r\n * - 0x4f1ef286: upgradeToAndCall (from TransparentUpgradeableProxy)\r\n * - 0x8f283970: changeAdmin (from TransparentUpgradeableProxy)\r\n * - 0xf851a440: admin (from TransparentUpgradeableProxy)\r\n * - 0x5c60da1b: implementation (from TransparentUpgradeableProxy)\r\n */\r\ncontract TransparentUpgradeableBeaconProxy is TransparentUpgradeableProxy, BeaconProxy {\r\n /**\r\n * Decode the initialization data from the msg.data and call the initialize function.\r\n */\r\n function _dispatchInitialize() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n (address admin, address beacon, bytes memory data) = abi.decode(msg.data[4:], (address, address, bytes));\r\n initialize(admin, beacon, data);\r\n\r\n return "";\r\n }\r\n\r\n function initialize(address admin, address beacon, bytes memory data) internal {\r\n if (_admin() != address(0)) {\r\n // Redundant call. This function can only be called when the admin is not set.\r\n revert InvalidInitialization();\r\n }\r\n _changeAdmin(admin);\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n\r\n /**\r\n * @dev If the admin is not set, the fallback function is used to initialize the proxy.\r\n * @dev If the admin is set, the fallback function is used to delegatecall the implementation.\r\n */\r\n function _fallback() internal override (TransparentUpgradeableProxy, Proxy) {\r\n if (_getAdmin() == address(0)) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableBeaconProxy.initialize.selector) {\r\n ret = _dispatchInitialize();\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n }\r\n // When the admin is not set, the fallback function is used to initialize the proxy.\r\n revert InvalidInitialization();\r\n }\r\n TransparentUpgradeableProxy._fallback();\r\n }\r\n\r\n /**\r\n * Returns the current implementation address.\r\n * @dev This is the implementation address set by the admin, or the beacon implementation.\r\n */\r\n function _implementation() internal view override (ERC1967Proxy, BeaconProxy) returns (address) {\r\n address implementation = ERC1967Proxy._implementation();\r\n if (implementation != address(0)) {\r\n return implementation;\r\n }\r\n return BeaconProxy._implementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/BeaconProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\r\n *\r\n * The beacon address is stored in storage slot `uint256(keccak256(\'eip1967.proxy.beacon\')) - 1`, so that it doesn\'t\r\n * conflict with the storage layout of the implementation behind the proxy.\r\n *\r\n * _Available since v3.4._\r\n */\r\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current beacon address.\r\n */\r\n function _beacon() internal view virtual returns (address) {\r\n return _getBeacon();\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation address of the associated beacon.\r\n */\r\n function _implementation() internal view virtual override returns (address) {\r\n return IBeacon(_getBeacon()).implementation();\r\n }\r\n\r\n /**\r\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\r\n *\r\n * If `data` is nonempty, it\'s used as data in a delegate call to the implementation returned by the beacon.\r\n *\r\n * Requirements:\r\n *\r\n * - `beacon` must be a contract.\r\n * - The implementation returned by `beacon` must be a contract.\r\n */\r\n function _setBeacon(address beacon, bytes memory data) internal virtual {\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/ERC1967Proxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\r\n * implementation address that can be changed. This address is stored in storage in the location specified by\r\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn\'t conflict with the storage layout of the\r\n * implementation behind the proxy.\r\n */\r\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current implementation address.\r\n */\r\n function _implementation() internal view virtual override returns (address impl) {\r\n return ERC1967Upgrade._getImplementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/TransparentUpgradeableProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\r\n\r\n/// @notice This implementation is a copy of OpenZeppelin\'s with the following changes:\r\n/// - Pragma updated\r\n/// - Imports updated\r\n/// - Constructor removed\r\n/// - Allows admin to call implementation\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "./ERC1967Proxy.sol";\r\n\r\n/**\r\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\r\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\r\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\r\n * include them in the ABI so this interface must be used to interact with it.\r\n */\r\ninterface ITransparentUpgradeableProxy is IERC1967 {\r\n function admin() external view returns (address);\r\n\r\n function implementation() external view returns (address);\r\n\r\n function changeAdmin(address) external;\r\n\r\n function upgradeTo(address) external;\r\n\r\n function upgradeToAndCall(address, bytes memory) external payable;\r\n}\r\n\r\n/**\r\n * @dev This contract implements a proxy that is upgradeable by an admin.\r\n *\r\n * Unlike the original OpenZeppelin implementation, this contract does not prevent the admin from calling the implementation.\r\n * This potentially exposes the admin to a proxy selector attack. See\r\n * https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * When using this contract, you must ensure that the implementation function selectors do not clash with the proxy selectors.\r\n * The proxy selectors are:\r\n * - 0x3659cfe6: upgradeTo\r\n * - 0x4f1ef286: upgradeToAndCall\r\n * - 0x8f283970: changeAdmin\r\n * - 0xf851a440: admin\r\n * - 0x5c60da1b: implementation\r\n *\r\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\r\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\r\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\r\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\r\n * implementation.\r\n *\r\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\r\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\r\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\r\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\r\n */\r\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\r\n /**\r\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\r\n *\r\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\r\n * implementation provides a function with the same selector.\r\n */\r\n modifier ifAdmin() {\r\n if (msg.sender == _getAdmin()) {\r\n _;\r\n } else {\r\n _fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\r\n */\r\n function _fallback() internal virtual override {\r\n if (msg.sender == _getAdmin()) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\r\n ret = _dispatchUpgradeTo();\r\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\r\n ret = _dispatchUpgradeToAndCall();\r\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\r\n ret = _dispatchChangeAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\r\n ret = _dispatchAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\r\n ret = _dispatchImplementation();\r\n } else {\r\n // Call implementation\r\n return super._fallback();\r\n }\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n } else {\r\n super._fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\r\n */\r\n function _dispatchAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address admin = _getAdmin();\r\n return abi.encode(admin);\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\r\n */\r\n function _dispatchImplementation() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address implementation = _implementation();\r\n return abi.encode(implementation);\r\n }\r\n\r\n /**\r\n * @dev Changes the admin of the proxy.\r\n *\r\n * Emits an {AdminChanged} event.\r\n */\r\n function _dispatchChangeAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newAdmin = abi.decode(msg.data[4:], (address));\r\n _changeAdmin(newAdmin);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy.\r\n */\r\n function _dispatchUpgradeTo() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newImplementation = abi.decode(msg.data[4:], (address));\r\n _upgradeToAndCall(newImplementation, bytes(""), false);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\r\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\r\n * proxied contract.\r\n */\r\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\r\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\r\n _upgradeToAndCall(newImplementation, data, true);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\r\n */\r\n function _admin() internal view virtual returns (address) {\r\n return _getAdmin();\r\n }\r\n\r\n /**\r\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\r\n * emulate some proxy functions being non-payable while still allowing value to pass through.\r\n */\r\n function _requireZeroValue() internal {\r\n require(msg.value == 0);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC721/ERC721Token.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {\r\n ERC721AQueryable, IERC721AQueryable, ERC721A, IERC721A\r\n} from "erc721a/contracts/extensions/ERC721AQueryable.sol";\r\nimport {ERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/ERC2981Controlled.sol";\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * A standard base implementation of ERC-721 for use in Sequence library contracts.\r\n */\r\nabstract contract ERC721Token is ERC721AQueryable, ERC2981Controlled {\r\n bytes32 internal constant METADATA_ADMIN_ROLE = keccak256("METADATA_ADMIN_ROLE");\r\n\r\n string private _tokenBaseURI;\r\n string private _tokenName;\r\n string private _tokenSymbol;\r\n string private _contractURI;\r\n\r\n /**\r\n * Deploy contract.\r\n */\r\n constructor() ERC721A("", "") {}\r\n\r\n /**\r\n * Initialize contract.\r\n * @param owner The owner of the contract\r\n * @param tokenName Name of the token\r\n * @param tokenSymbol Symbol of the token\r\n * @param tokenBaseURI Base URI of the token\r\n * @param tokenContractURI Contract URI of the token\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function _initialize(\r\n address owner,\r\n string memory tokenName,\r\n string memory tokenSymbol,\r\n string memory tokenBaseURI,\r\n string memory tokenContractURI\r\n )\r\n internal\r\n {\r\n _tokenName = tokenName;\r\n _tokenSymbol = tokenSymbol;\r\n _tokenBaseURI = tokenBaseURI;\r\n _contractURI = tokenContractURI;\r\n\r\n _setupRole(DEFAULT_ADMIN_ROLE, owner);\r\n _setupRole(METADATA_ADMIN_ROLE, owner);\r\n _setupRole(ROYALTY_ADMIN_ROLE, owner);\r\n }\r\n\r\n //\r\n // Metadata\r\n //\r\n\r\n /**\r\n * Set name and symbol of token.\r\n * @param tokenName Name of token.\r\n * @param tokenSymbol Symbol of token.\r\n */\r\n function setNameAndSymbol(string memory tokenName, string memory tokenSymbol)\r\n external\r\n onlyRole(METADATA_ADMIN_ROLE)\r\n {\r\n _tokenName = tokenName;\r\n _tokenSymbol = tokenSymbol;\r\n }\r\n\r\n /**\r\n * Update the base URI of token\'s URI.\r\n * @param tokenBaseURI New base URI of token\'s URI\r\n */\r\n function setBaseMetadataURI(string memory tokenBaseURI) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _tokenBaseURI = tokenBaseURI;\r\n }\r\n\r\n /**\r\n * Update the contract URI of token\'s URI.\r\n * @param tokenContractURI New contract URI of token\'s URI\r\n * @notice Refer to https://docs.opensea.io/docs/contract-level-metadata\r\n */\r\n function setContractURI(string memory tokenContractURI) external onlyRole(METADATA_ADMIN_ROLE) {\r\n _contractURI = tokenContractURI;\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Get the contract URI of token\'s URI.\r\n * @return Contract URI of token\'s URI\r\n * @notice Refer to https://docs.opensea.io/docs/contract-level-metadata\r\n */\r\n function contractURI() public view returns (string memory) {\r\n return _contractURI;\r\n }\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC721A, IERC721A, ERC2981Controlled)\r\n returns (bool)\r\n {\r\n return interfaceId == type(IERC721A).interfaceId || interfaceId == type(IERC721AQueryable).interfaceId\r\n || ERC721A.supportsInterface(interfaceId) || ERC2981Controlled.supportsInterface(interfaceId)\r\n || super.supportsInterface(interfaceId);\r\n }\r\n\r\n //\r\n // ERC721A Overrides\r\n //\r\n\r\n /**\r\n * Override the ERC721A baseURI function.\r\n */\r\n function _baseURI() internal view override returns (string memory) {\r\n return _tokenBaseURI;\r\n }\r\n\r\n /**\r\n * Override the ERC721A name function.\r\n */\r\n function name() public view override (ERC721A, IERC721A) returns (string memory) {\r\n return _tokenName;\r\n }\r\n\r\n /**\r\n * Override the ERC721A symbol function.\r\n */\r\n function symbol() public view override (ERC721A, IERC721A) returns (string memory) {\r\n return _tokenSymbol;\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC721/presets/sale/ERC721Sale.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IERC721Sale, IERC721SaleFunctions} from "@0xsequence/contracts-library/tokens/ERC721/presets/sale/IERC721Sale.sol";\r\nimport {ERC721Token} from "@0xsequence/contracts-library/tokens/ERC721/ERC721Token.sol";\r\nimport {\r\n WithdrawControlled,\r\n AccessControl,\r\n SafeERC20,\r\n IERC20\r\n} from "@0xsequence/contracts-library/tokens/common/WithdrawControlled.sol";\r\nimport {MerkleProofSingleUse} from "@0xsequence/contracts-library/tokens/common/MerkleProofSingleUse.sol";\r\n\r\n/**\r\n * An ERC-721 token contract with primary sale mechanisms.\r\n */\r\ncontract ERC721Sale is IERC721Sale, ERC721Token, WithdrawControlled, MerkleProofSingleUse {\r\n bytes32 internal constant MINT_ADMIN_ROLE = keccak256("MINT_ADMIN_ROLE");\r\n\r\n bytes4 private constant _ERC20_TRANSFERFROM_SELECTOR =\r\n bytes4(keccak256(bytes("transferFrom(address,address,uint256)")));\r\n\r\n bool private _initialized;\r\n\r\n SaleDetails private _saleDetails;\r\n\r\n /**\r\n * Initialize the contract.\r\n * @param owner The owner of the contract\r\n * @param tokenName Name of the token\r\n * @param tokenSymbol Symbol of the token\r\n * @param tokenBaseURI Base URI of the token\r\n * @param tokenContractURI Contract URI of the token\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @dev This should be called immediately after deployment.\r\n */\r\n function initialize(\r\n address owner,\r\n string memory tokenName,\r\n string memory tokenSymbol,\r\n string memory tokenBaseURI,\r\n string memory tokenContractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n public\r\n virtual\r\n {\r\n if (_initialized) {\r\n revert InvalidInitialization();\r\n }\r\n\r\n ERC721Token._initialize(owner, tokenName, tokenSymbol, tokenBaseURI, tokenContractURI);\r\n _setDefaultRoyalty(royaltyReceiver, royaltyFeeNumerator);\r\n\r\n _setupRole(MINT_ADMIN_ROLE, owner);\r\n _setupRole(WITHDRAW_ROLE, owner);\r\n\r\n _initialized = true;\r\n }\r\n\r\n /**\r\n * Checks if the current block.timestamp is out of the give timestamp range.\r\n * @param _startTime Earliest acceptable timestamp (inclusive).\r\n * @param _endTime Latest acceptable timestamp (exclusive).\r\n * @dev A zero endTime value is always considered out of bounds.\r\n */\r\n function _blockTimeOutOfBounds(uint256 _startTime, uint256 _endTime) private view returns (bool) {\r\n // 0 end time indicates inactive sale.\r\n return _endTime == 0 || block.timestamp < _startTime || block.timestamp >= _endTime; // solhint-disable-line not-rely-on-time\r\n }\r\n\r\n /**\r\n * Checks the sale is active and takes payment.\r\n * @param _amount Amount of tokens to mint.\r\n * @param _proof Merkle proof for allowlist minting.\r\n */\r\n function _payForActiveMint(uint256 _amount, bytes32[] calldata _proof) private {\r\n // Active sale test\r\n if (_blockTimeOutOfBounds(_saleDetails.startTime, _saleDetails.endTime)) {\r\n revert SaleInactive();\r\n }\r\n requireMerkleProof(_saleDetails.merkleRoot, _proof, msg.sender);\r\n\r\n uint256 total = _saleDetails.cost * _amount;\r\n address paymentToken = _saleDetails.paymentToken;\r\n if (paymentToken == address(0)) {\r\n // Paid in ETH\r\n if (msg.value != total) {\r\n revert InsufficientPayment(total, msg.value);\r\n }\r\n } else {\r\n // Paid in ERC20\r\n SafeERC20.safeTransferFrom(IERC20(paymentToken), msg.sender, address(this), total);\r\n }\r\n }\r\n\r\n //\r\n // Minting\r\n //\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param amount Amount of tokens to mint.\r\n * @param proof Merkle proof for allowlist minting.\r\n * @notice Sale must be active for all tokens.\r\n * @dev An empty proof is supplied when no proof is required.\r\n */\r\n function mint(address to, uint256 amount, bytes32[] calldata proof) public payable {\r\n uint256 currentSupply = totalSupply();\r\n uint256 supplyCap = _saleDetails.supplyCap;\r\n if (supplyCap > 0 && currentSupply + amount > supplyCap) {\r\n revert InsufficientSupply(currentSupply, amount, supplyCap);\r\n }\r\n _payForActiveMint(amount, proof);\r\n _mint(to, amount);\r\n }\r\n\r\n /**\r\n * Mint tokens as admin.\r\n * @param to Address to mint tokens to.\r\n * @param amount Amount of tokens to mint.\r\n * @notice Only callable by mint admin.\r\n */\r\n function mintAdmin(address to, uint256 amount) public onlyRole(MINT_ADMIN_ROLE) {\r\n _mint(to, amount);\r\n }\r\n\r\n /**\r\n * Set the sale details.\r\n * @param supplyCap The maximum number of tokens that can be minted. 0 indicates unlimited supply.\r\n * @param cost The amount of payment tokens to accept for each token minted.\r\n * @param paymentToken The ERC20 token address to accept payment in. address(0) indicates ETH.\r\n * @param startTime The start time of the sale. Tokens cannot be minted before this time.\r\n * @param endTime The end time of the sale. Tokens cannot be minted after this time.\r\n * @param merkleRoot The merkle root for allowlist minting.\r\n * @dev A zero end time indicates an inactive sale.\r\n */\r\n function setSaleDetails(\r\n uint256 supplyCap,\r\n uint256 cost,\r\n address paymentToken,\r\n uint64 startTime,\r\n uint64 endTime,\r\n bytes32 merkleRoot\r\n )\r\n public\r\n onlyRole(MINT_ADMIN_ROLE)\r\n {\r\n _saleDetails = SaleDetails(supplyCap, cost, paymentToken, startTime, endTime, merkleRoot);\r\n emit SaleDetailsUpdated(supplyCap, cost, paymentToken, startTime, endTime, merkleRoot);\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Get sale details.\r\n * @return Sale details.\r\n */\r\n function saleDetails() external view returns (SaleDetails memory) {\r\n return _saleDetails;\r\n }\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC721Token, AccessControl)\r\n returns (bool)\r\n {\r\n return interfaceId == type(IERC721SaleFunctions).interfaceId || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC721/presets/sale/ERC721SaleFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {ERC721Sale} from "@0xsequence/contracts-library/tokens/ERC721/presets/sale/ERC721Sale.sol";\r\nimport {IERC721SaleFactory} from "@0xsequence/contracts-library/tokens/ERC721/presets/sale/IERC721SaleFactory.sol";\r\nimport {SequenceProxyFactory} from "@0xsequence/contracts-library/proxies/SequenceProxyFactory.sol";\r\n\r\n/**\r\n * Deployer of ERC-721 Sale proxies.\r\n */\r\ncontract ERC721SaleFactory is IERC721SaleFactory, SequenceProxyFactory {\r\n /**\r\n * Creates an ERC-721 Sale Factory.\r\n * @param factoryOwner The owner of the ERC-721 Sale Factory\r\n */\r\n constructor(address factoryOwner) {\r\n ERC721Sale impl = new ERC721Sale();\r\n SequenceProxyFactory._initialize(address(impl), factoryOwner);\r\n }\r\n\r\n /**\r\n * Creates an ERC-721 Sale for given token contract\r\n * @param proxyOwner The owner of the ERC-721 Sale proxy\r\n * @param tokenOwner The owner of the ERC-721 Sale implementation\r\n * @param name The name of the ERC-721 Sale token\r\n * @param symbol The symbol of the ERC-721 Sale token\r\n * @param baseURI The base URI of the ERC-721 Sale token\r\n * @param contractURI The contract URI of the ERC-721 Sale token\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @return proxyAddr The address of the ERC-721 Sale Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-721 Sale functions.\r\n */\r\n function deploy(\r\n address proxyOwner,\r\n address tokenOwner,\r\n string memory name,\r\n string memory symbol,\r\n string memory baseURI,\r\n string memory contractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n external\r\n returns (address proxyAddr)\r\n {\r\n bytes32 salt = keccak256(\r\n abi.encodePacked(tokenOwner, name, symbol, baseURI, contractURI, royaltyReceiver, royaltyFeeNumerator)\r\n );\r\n proxyAddr = _createProxy(salt, proxyOwner, "");\r\n ERC721Sale(proxyAddr).initialize(\r\n tokenOwner, name, symbol, baseURI, contractURI, royaltyReceiver, royaltyFeeNumerator\r\n );\r\n emit ERC721SaleDeployed(proxyAddr);\r\n return proxyAddr;\r\n }\r\n}\r\n' + }, + 'src/tokens/ERC721/presets/sale/IERC721Sale.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC721SaleFunctions {\r\n\r\n struct SaleDetails {\r\n uint256 supplyCap; // 0 supply cap indicates unlimited supply\r\n uint256 cost;\r\n address paymentToken; // ERC20 token address for payment. address(0) indicated payment in ETH.\r\n uint64 startTime;\r\n uint64 endTime; // 0 end time indicates sale inactive\r\n bytes32 merkleRoot; // Root of allowed addresses\r\n }\r\n\r\n /**\r\n * Mint tokens.\r\n * @param to Address to mint tokens to.\r\n * @param amount Amount of tokens to mint.\r\n * @param proof Merkle proof for allowlist minting.\r\n * @notice Sale must be active for all tokens.\r\n * @dev An empty proof is supplied when no proof is required.\r\n */\r\n function mint(address to, uint256 amount, bytes32[] memory proof) external payable;\r\n\r\n /**\r\n * Set the sale details.\r\n * @param supplyCap The maximum number of tokens that can be minted. 0 indicates unlimited supply.\r\n * @param cost The amount of payment tokens to accept for each token minted.\r\n * @param paymentToken The ERC20 token address to accept payment in. address(0) indicates ETH.\r\n * @param startTime The start time of the sale. Tokens cannot be minted before this time.\r\n * @param endTime The end time of the sale. Tokens cannot be minted after this time.\r\n * @param merkleRoot The merkle root for allowlist minting.\r\n */\r\n function setSaleDetails(\r\n uint256 supplyCap,\r\n uint256 cost,\r\n address paymentToken,\r\n uint64 startTime,\r\n uint64 endTime,\r\n bytes32 merkleRoot\r\n ) external;\r\n\r\n /**\r\n * Get sale details.\r\n * @return Sale details.\r\n */\r\n function saleDetails() external view returns (SaleDetails memory);\r\n}\r\n\r\ninterface IERC721SaleSignals {\r\n event SaleDetailsUpdated(uint256 supplyCap, uint256 cost, address paymentToken, uint64 startTime, uint64 endTime, bytes32 merkleRoot);\r\n\r\n /**\r\n * Contract already initialized.\r\n */\r\n error InvalidInitialization();\r\n\r\n /**\r\n * Sale is not active.\r\n */\r\n error SaleInactive();\r\n\r\n /**\r\n * Insufficient supply.\r\n * @param currentSupply Current supply.\r\n * @param amount Amount to mint.\r\n * @param maxSupply Maximum supply.\r\n */\r\n error InsufficientSupply(uint256 currentSupply, uint256 amount, uint256 maxSupply);\r\n\r\n /**\r\n * Insufficient tokens for payment.\r\n * @param expected Expected amount of tokens.\r\n * @param actual Actual amount of tokens.\r\n */\r\n error InsufficientPayment(uint256 expected, uint256 actual);\r\n}\r\n\r\ninterface IERC721Sale is IERC721SaleFunctions, IERC721SaleSignals {}\r\n' + }, + 'src/tokens/ERC721/presets/sale/IERC721SaleFactory.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC721SaleFactoryFunctions {\r\n /**\r\n * Creates an ERC-721 Sale for given token contract\r\n * @param proxyOwner The owner of the ERC-721 Sale proxy\r\n * @param tokenOwner The owner of the ERC-721 Sale implementation\r\n * @param name The name of the ERC-721 Sale token\r\n * @param symbol The symbol of the ERC-721 Sale token\r\n * @param baseURI The base URI of the ERC-721 Sale token\r\n * @param contractURI The contract URI of the ERC-721 Sale token\r\n * @param royaltyReceiver Address of who should be sent the royalty payment\r\n * @param royaltyFeeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @return proxyAddr The address of the ERC-721 Sale Proxy\r\n * @dev As `proxyOwner` owns the proxy, it will be unable to call the ERC-721 Sale functions.\r\n */\r\n function deploy(\r\n address proxyOwner,\r\n address tokenOwner,\r\n string memory name,\r\n string memory symbol,\r\n string memory baseURI,\r\n string memory contractURI,\r\n address royaltyReceiver,\r\n uint96 royaltyFeeNumerator\r\n )\r\n external\r\n returns (address proxyAddr);\r\n}\r\n\r\ninterface IERC721SaleFactorySignals {\r\n /**\r\n * Event emitted when a new ERC-721 Sale proxy contract is deployed.\r\n * @param proxyAddr The address of the deployed proxy.\r\n */\r\n event ERC721SaleDeployed(address proxyAddr);\r\n}\r\n\r\ninterface IERC721SaleFactory is IERC721SaleFactoryFunctions, IERC721SaleFactorySignals {}\r\n' + }, + 'src/tokens/common/ERC2981Controlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IERC2981Controlled} from "@0xsequence/contracts-library/tokens/common/IERC2981Controlled.sol";\r\nimport {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";\r\nimport {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";\r\n\r\n/**\r\n * An implementation of ERC-2981 that allows updates by roles.\r\n */\r\nabstract contract ERC2981Controlled is ERC2981, AccessControl, IERC2981Controlled {\r\n bytes32 internal constant ROYALTY_ADMIN_ROLE = keccak256("ROYALTY_ADMIN_ROLE");\r\n\r\n //\r\n // Royalty\r\n //\r\n\r\n /**\r\n * Sets the royalty information that all ids in this contract will default to.\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n */\r\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external onlyRole(ROYALTY_ADMIN_ROLE) {\r\n _setDefaultRoyalty(receiver, feeNumerator);\r\n }\r\n\r\n /**\r\n * Sets the royalty information that a given token id in this contract will use.\r\n * @param tokenId The token id to set the royalty information for\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @notice This overrides the default royalty information for this token id\r\n */\r\n function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator)\r\n external\r\n onlyRole(ROYALTY_ADMIN_ROLE)\r\n {\r\n _setTokenRoyalty(tokenId, receiver, feeNumerator);\r\n }\r\n\r\n //\r\n // Views\r\n //\r\n\r\n /**\r\n * Check interface support.\r\n * @param interfaceId Interface id\r\n * @return True if supported\r\n */\r\n function supportsInterface(bytes4 interfaceId)\r\n public\r\n view\r\n virtual\r\n override (ERC2981, AccessControl)\r\n returns (bool)\r\n {\r\n return ERC2981.supportsInterface(interfaceId) || AccessControl.supportsInterface(interfaceId)\r\n || type(IERC2981Controlled).interfaceId == interfaceId || super.supportsInterface(interfaceId);\r\n }\r\n}\r\n' + }, + 'src/tokens/common/IERC2981Controlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IERC2981ControlledFunctions {\r\n /**\r\n * Sets the royalty information that all ids in this contract will default to.\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n */\r\n function setDefaultRoyalty(address receiver, uint96 feeNumerator) external;\r\n\r\n /**\r\n * Sets the royalty information that a given token id in this contract will use.\r\n * @param tokenId The token id to set the royalty information for\r\n * @param receiver Address of who should be sent the royalty payment\r\n * @param feeNumerator The royalty fee numerator in basis points (e.g. 15% would be 1500)\r\n * @notice This overrides the default royalty information for this token id\r\n */\r\n function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) external;\r\n}\r\n\r\ninterface IERC2981Controlled is IERC2981ControlledFunctions {}\r\n' + }, + 'src/tokens/common/IMerkleProofSingleUse.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IMerkleProofSingleUseFunctions {\r\n\r\n /**\r\n * Checks if the given merkle proof is valid.\r\n * @param root Merkle root.\r\n * @param proof Merkle proof.\r\n * @param addr Address to check.\r\n * @return True if the proof is valid and has not yet been used by {addr}.\r\n */\r\n function checkMerkleProof(bytes32 root, bytes32[] calldata proof, address addr) external view returns (bool);\r\n}\r\n\r\ninterface IMerkleProofSingleUseSignals {\r\n\r\n /**\r\n * Thrown when the merkle proof is invalid or has already been used.\r\n * @param root Merkle root.\r\n * @param proof Merkle proof.\r\n * @param addr Address to check.\r\n */\r\n error MerkleProofInvalid(bytes32 root, bytes32[] proof, address addr);\r\n\r\n}\r\n\r\ninterface IMerkleProofSingleUse is IMerkleProofSingleUseFunctions, IMerkleProofSingleUseSignals {}\r\n' + }, + 'src/tokens/common/IWithdrawControlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\ninterface IWithdrawControlledFunctions {\r\n\r\n /**\r\n * Withdraws ERC20 tokens owned by this contract.\r\n * @param token The ERC20 token address.\r\n * @param to Address to withdraw to.\r\n * @param value Amount to withdraw.\r\n */\r\n function withdrawERC20(address token, address to, uint256 value) external;\r\n\r\n /**\r\n * Withdraws ETH owned by this sale contract.\r\n * @param to Address to withdraw to.\r\n * @param value Amount to withdraw.\r\n */\r\n function withdrawETH(address to, uint256 value) external;\r\n}\r\n\r\ninterface IWithdrawControlledSignals {\r\n\r\n /**\r\n * Withdraw failed error.\r\n */\r\n error WithdrawFailed();\r\n}\r\n\r\ninterface IWithdrawControlled is IWithdrawControlledFunctions, IWithdrawControlledSignals {}\r\n' + }, + 'src/tokens/common/MerkleProofSingleUse.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IMerkleProofSingleUse} from "@0xsequence/contracts-library/tokens/common/IMerkleProofSingleUse.sol";\r\nimport {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";\r\n\r\n/**\r\n * Require single use merkle proofs per address.\r\n */\r\nabstract contract MerkleProofSingleUse is IMerkleProofSingleUse {\r\n\r\n // Stores proofs used by an address\r\n mapping(address => mapping(bytes32 => bool)) private _proofUsed;\r\n\r\n /**\r\n * Requires the given merkle proof to be valid.\r\n * @param root Merkle root.\r\n * @param proof Merkle proof.\r\n * @param addr Address to check.\r\n * @notice Fails when the proof is invalid or the proof has already been claimed by this address.\r\n * @dev This function reverts on failure.\r\n */\r\n function requireMerkleProof(bytes32 root, bytes32[] calldata proof, address addr) internal {\r\n if (root != bytes32(0)) {\r\n if (!checkMerkleProof(root, proof, addr)) {\r\n revert MerkleProofInvalid(root, proof, addr);\r\n }\r\n _proofUsed[addr][root] = true;\r\n }\r\n }\r\n\r\n /**\r\n * Checks if the given merkle proof is valid.\r\n * @param root Merkle root.\r\n * @param proof Merkle proof.\r\n * @param addr Address to check.\r\n * @return True if the proof is valid and has not yet been used by {addr}.\r\n */\r\n function checkMerkleProof(bytes32 root, bytes32[] calldata proof, address addr) public view returns (bool) {\r\n return !_proofUsed[addr][root] && MerkleProof.verify(proof, root, keccak256(abi.encodePacked(addr)));\r\n }\r\n\r\n}\r\n' + }, + 'src/tokens/common/WithdrawControlled.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {IWithdrawControlled} from "@0xsequence/contracts-library/tokens/common/IWithdrawControlled.sol";\r\nimport {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";\r\nimport {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";\r\n\r\n/**\r\n * An abstract contract that allows ETH and ERC20 tokens stored in the contract to be withdrawn.\r\n */\r\nabstract contract WithdrawControlled is AccessControl, IWithdrawControlled {\r\n bytes32 internal constant WITHDRAW_ROLE = keccak256("WITHDRAW_ROLE");\r\n\r\n //\r\n // Withdraw\r\n //\r\n\r\n /**\r\n * Withdraws ERC20 tokens owned by this contract.\r\n * @param token The ERC20 token address.\r\n * @param to Address to withdraw to.\r\n * @param value Amount to withdraw.\r\n * @notice Only callable by an address with the withdraw role.\r\n */\r\n function withdrawERC20(address token, address to, uint256 value) public onlyRole(WITHDRAW_ROLE) {\r\n SafeERC20.safeTransfer(IERC20(token), to, value);\r\n }\r\n\r\n /**\r\n * Withdraws ETH owned by this sale contract.\r\n * @param to Address to withdraw to.\r\n * @param value Amount to withdraw.\r\n * @notice Only callable by an address with the withdraw role.\r\n */\r\n function withdrawETH(address to, uint256 value) public onlyRole(WITHDRAW_ROLE) {\r\n (bool success,) = to.call{value: value}("");\r\n if (!success) {\r\n revert WithdrawFailed();\r\n }\r\n }\r\n}\r\n' + } + }, + settings: { + evmVersion: 'paris', + libraries: {}, + metadata: { bytecodeHash: 'ipfs' }, + optimizer: { enabled: true, runs: 20000 }, + remappings: [ + ':@0xsequence/contracts-library/=src/', + ':@0xsequence/erc-1155/=node_modules/@0xsequence/erc-1155/', + ':@0xsequence/erc20-meta-token/=node_modules/@0xsequence/erc20-meta-token/', + ':@openzeppelin/=node_modules/@openzeppelin/', + ':ds-test/=lib/forge-std/lib/ds-test/src/', + ':erc721a-upgradeable/=node_modules/erc721a-upgradeable/', + ':erc721a/=node_modules/erc721a/', + ':forge-std/=lib/forge-std/src/', + ':murky/=lib/murky/src/', + ':openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/' + ], + viaIR: true, + outputSelection: { + '*': { + '*': ['evm.bytecode', 'evm.deployedBytecode', 'devdoc', 'userdoc', 'metadata', 'abi'] + } + } + } + } +} diff --git a/scripts/factories/token_library/TransparentUpgradeableBeaconProxy.ts b/scripts/factories/token_library/TransparentUpgradeableBeaconProxy.ts new file mode 100644 index 0000000..f36563c --- /dev/null +++ b/scripts/factories/token_library/TransparentUpgradeableBeaconProxy.ts @@ -0,0 +1,153 @@ +import type { EtherscanVerificationRequest } from '@0xsequence/solidity-deployer' +import { ContractFactory, ethers } from 'ethers' + +//TODO Code link + +const abi = [ + { + inputs: [], + name: 'InvalidInitialization', + type: 'error' + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: 'address', + name: 'previousAdmin', + type: 'address' + }, + { + indexed: false, + internalType: 'address', + name: 'newAdmin', + type: 'address' + } + ], + name: 'AdminChanged', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'beacon', + type: 'address' + } + ], + name: 'BeaconUpgraded', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address' + } + ], + name: 'Upgraded', + type: 'event' + }, + { + stateMutability: 'payable', + type: 'fallback' + }, + { + stateMutability: 'payable', + type: 'receive' + } +] + +export class TransparentUpgradeableBeaconProxy extends ContractFactory { + constructor(signer: ethers.Signer) { + super( + abi, + '0x60808060405234610016576111cf908161001c8239f35b600080fdfe604060808152366103825773ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000917fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000843516146100c057600484517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b6100c8611192565b60049136831161037e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261037e578235916101088361067f565b602435926101158461067f565b60443567ffffffffffffffff811161037a57610135839136908801610789565b941692156103525761014791166107e3565b803b156102cf578451907f5c60da1b000000000000000000000000000000000000000000000000000000009384835260209687848381865afa9384156102a657889461019d9189916102b2575b503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab575b610242575b8361023c6107d0565b80519101f35b8592839182525afa9182156102a65761026a9392610277575b506102646109b1565b91610a21565b5038808083818080610233565b610298919250843d861161029f575b610290818361070e565b810190610902565b903861025b565b503d610286565b61091a565b508661022e565b6102c99150863d881161029f57610290818361070e565b38610194565b60848360208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b8487517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8680fd5b8380fd5b73ffffffffffffffffffffffffffffffffffffffff807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035416158015610b94576000907fcf7a1d77000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000833516146104395760046040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b610441611192565b60049236841161067b5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261067b5783356104808161067f565b6024359161048d8361067f565b60443567ffffffffffffffff8111610677576104ad829136908901610789565b9316931561064e576104bf91166107e3565b813b156105ca576040517f5c60da1b000000000000000000000000000000000000000000000000000000009283825260209586838281855afa9283156102a65787936105149188916105b357503b1515610926565b7fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d5080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905560405194827f1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e8880a28451158015906102ab57610242578361023c6107d0565b6102c99150853d871161029f57610290818361070e565b6084846020604051917f08c379a0000000000000000000000000000000000000000000000000000000008352820152602560248201527f455243313936373a206e657720626561636f6e206973206e6f74206120636f6e60448201527f74726163740000000000000000000000000000000000000000000000000000006064820152fd5b856040517ff92ee8a9000000000000000000000000000000000000000000000000000000008152fd5b8580fd5b8280fd5b73ffffffffffffffffffffffffffffffffffffffff81160361069d57565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff8211176106ed57604052565b6106a2565b6040810190811067ffffffffffffffff8211176106ed57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176106ed57604052565b67ffffffffffffffff81116106ed57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b81601f8201121561069d578035906107a08261074f565b926107ae604051948561070e565b8284526020838301011161069d57816000926020809301838601378301015290565b604051906107dd826106d1565b60008252565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61039081547f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f604080519373ffffffffffffffffffffffffffffffffffffffff9081851686521693846020820152a1811561087e577fffffffffffffffffffffffff000000000000000000000000000000000000000016179055565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b9081602091031261069d57516109178161067f565b90565b6040513d6000823e3d90fd5b1561092d57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f455243313936373a20626561636f6e20696d706c656d656e746174696f6e206960448201527f73206e6f74206120636f6e7472616374000000000000000000000000000000006064820152fd5b604051906060820182811067ffffffffffffffff8211176106ed57604052602782527f206661696c6564000000000000000000000000000000000000000000000000006040837f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c60208201520152565b6000806109179493602081519101845af43d15610a60573d91610a438361074f565b92610a51604051948561070e565b83523d6000602085013e610acd565b606091610acd565b15610a6f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b91929015610aed5750815115610ae1575090565b610917903b1515610a68565b825190915015610b005750805190602001fd5b604051907f08c379a000000000000000000000000000000000000000000000000000000000825281602080600483015282519283602484015260005b848110610b7d575050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f836000604480968601015201168101030190fd5b818101830151868201604401528593508201610b3c565b610bee610bd57fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b3303610d14576000357fffffffff00000000000000000000000000000000000000000000000000000000167f3659cfe6000000000000000000000000000000000000000000000000000000008103610c515750610c49610f0f565b602081519101f35b7f4f1ef286000000000000000000000000000000000000000000000000000000008103610c865750610c81611083565b610c49565b7f8f283970000000000000000000000000000000000000000000000000000000008103610cb65750610c81610ec5565b7ff851a440000000000000000000000000000000000000000000000000000000008103610ce65750610c81610dfd565b7f5c60da1b0000000000000000000000000000000000000000000000000000000003610d1457610c81610e53565b610d1c610d3b565b6000808092368280378136915af43d82803e15610d37573d90f35b3d90fd5b73ffffffffffffffffffffffffffffffffffffffff807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc541680610df8575060206004917fa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d505416604051928380927f5c60da1b0000000000000000000000000000000000000000000000000000000082525afa9081156102a657600091610de0575090565b610917915060203d811161029f57610290818361070e565b905090565b610e05611192565b73ffffffffffffffffffffffffffffffffffffffff7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103541660405190602082015260208152610917816106f2565b610e5b611192565b610e63610d3b565b73ffffffffffffffffffffffffffffffffffffffff6040519116602082015260208152610917816106f2565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc602091011261069d576004356109178161067f565b610ecd611192565b3660041161069d57610efc73ffffffffffffffffffffffffffffffffffffffff610ef636610e8f565b166107e3565b604051610f08816106d1565b6000815290565b610f17611192565b3660041161069d5773ffffffffffffffffffffffffffffffffffffffff610f3d36610e8f565b1660405190610f4b826106d1565b60008252803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2815115801590610ff7575b610fe3575b5050604051610f08816106d1565b610fef916102646109b1565b503880610fd5565b506000610fd0565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152fd5b3660041161069d5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261069d576004356110c18161067f565b60243567ffffffffffffffff811161069d576110f673ffffffffffffffffffffffffffffffffffffffff913690600401610789565b9116803b15610fff577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055807fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159061118a57610fe3575050604051610f08816106d1565b506001610fd0565b3461069d5756fea264697066735822122019f840d2ec21d6e6c6d650eef546ce8fd590e6d8042a04516b47dd55a17345c664736f6c63430008130033', + signer + ) + } +} + +export const TUBPROXY_VERIFICATION: Omit = { + contractToVerify: 'src/proxies/TransparentUpgradeableBeaconProxy.sol:TransparentUpgradeableBeaconProxy', + version: 'v0.8.19+commit.7dd6d404', + compilerInput: { + language: 'Solidity', + sources: { + 'node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (interfaces/IERC1967.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.\n *\n * _Available since v4.9._\n */\ninterface IERC1967 {\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Emitted when the beacon is changed.\n */\n event BeaconUpgraded(address indexed beacon);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.3) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport "../beacon/IBeacon.sol";\nimport "../../interfaces/IERC1967.sol";\nimport "../../interfaces/draft-IERC1822.sol";\nimport "../../utils/Address.sol";\nimport "../../utils/StorageSlot.sol";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade is IERC1967 {\n // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");\n } catch {\n revert("ERC1967Upgrade: new implementation is not UUPS");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), "ERC1967: new admin is the zero address");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256(\'eip1967.proxy.beacon\')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n "ERC1967: beacon implementation is not a contract"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/Proxy.sol': { + content: + "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Address.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn\'t rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity\'s `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, "Address: low-level call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, "Address: insufficient balance for call");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, "Address: low-level static call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, "Address: low-level delegate call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), "Address: call to non-contract");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn\'t, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/StorageSlot.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n' + }, + 'src/proxies/TransparentUpgradeableBeaconProxy.sol': { + content: + '// SPDX-License-Identifier: Apache-2.0\r\npragma solidity ^0.8.19;\r\n\r\nimport {BeaconProxy, Proxy} from "./openzeppelin/BeaconProxy.sol";\r\nimport {TransparentUpgradeableProxy, ERC1967Proxy} from "./openzeppelin/TransparentUpgradeableProxy.sol";\r\n\r\ninterface ITransparentUpgradeableBeaconProxy {\r\n function initialize(address admin, address beacon, bytes memory data) external;\r\n}\r\n\r\nerror InvalidInitialization();\r\n\r\n/**\r\n * @dev As the underlying proxy implementation (TransparentUpgradeableProxy) allows the admin to call the implementation,\r\n * care must be taken to avoid proxy selector collisions. Implementation selectors must not conflict with the proxy selectors.\r\n * See https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * The proxy selectors are:\r\n * - 0xcf7a1d77: initialize\r\n * - 0x3659cfe6: upgradeTo (from TransparentUpgradeableProxy)\r\n * - 0x4f1ef286: upgradeToAndCall (from TransparentUpgradeableProxy)\r\n * - 0x8f283970: changeAdmin (from TransparentUpgradeableProxy)\r\n * - 0xf851a440: admin (from TransparentUpgradeableProxy)\r\n * - 0x5c60da1b: implementation (from TransparentUpgradeableProxy)\r\n */\r\ncontract TransparentUpgradeableBeaconProxy is TransparentUpgradeableProxy, BeaconProxy {\r\n /**\r\n * Decode the initialization data from the msg.data and call the initialize function.\r\n */\r\n function _dispatchInitialize() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n (address admin, address beacon, bytes memory data) = abi.decode(msg.data[4:], (address, address, bytes));\r\n initialize(admin, beacon, data);\r\n\r\n return "";\r\n }\r\n\r\n function initialize(address admin, address beacon, bytes memory data) internal {\r\n if (_admin() != address(0)) {\r\n // Redundant call. This function can only be called when the admin is not set.\r\n revert InvalidInitialization();\r\n }\r\n _changeAdmin(admin);\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n\r\n /**\r\n * @dev If the admin is not set, the fallback function is used to initialize the proxy.\r\n * @dev If the admin is set, the fallback function is used to delegatecall the implementation.\r\n */\r\n function _fallback() internal override (TransparentUpgradeableProxy, Proxy) {\r\n if (_getAdmin() == address(0)) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableBeaconProxy.initialize.selector) {\r\n ret = _dispatchInitialize();\r\n // solhint-disable-next-line no-inline-assembly\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n }\r\n // When the admin is not set, the fallback function is used to initialize the proxy.\r\n revert InvalidInitialization();\r\n }\r\n TransparentUpgradeableProxy._fallback();\r\n }\r\n\r\n /**\r\n * Returns the current implementation address.\r\n * @dev This is the implementation address set by the admin, or the beacon implementation.\r\n */\r\n function _implementation() internal view override (ERC1967Proxy, BeaconProxy) returns (address) {\r\n address implementation = ERC1967Proxy._implementation();\r\n if (implementation != address(0)) {\r\n return implementation;\r\n }\r\n return BeaconProxy._implementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/BeaconProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/beacon/BeaconProxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/beacon/IBeacon.sol";\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements a proxy that gets the implementation address for each call from an {UpgradeableBeacon}.\r\n *\r\n * The beacon address is stored in storage slot `uint256(keccak256(\'eip1967.proxy.beacon\')) - 1`, so that it doesn\'t\r\n * conflict with the storage layout of the implementation behind the proxy.\r\n *\r\n * _Available since v3.4._\r\n */\r\ncontract BeaconProxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current beacon address.\r\n */\r\n function _beacon() internal view virtual returns (address) {\r\n return _getBeacon();\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation address of the associated beacon.\r\n */\r\n function _implementation() internal view virtual override returns (address) {\r\n return IBeacon(_getBeacon()).implementation();\r\n }\r\n\r\n /**\r\n * @dev Changes the proxy to use a new beacon. Deprecated: see {_upgradeBeaconToAndCall}.\r\n *\r\n * If `data` is nonempty, it\'s used as data in a delegate call to the implementation returned by the beacon.\r\n *\r\n * Requirements:\r\n *\r\n * - `beacon` must be a contract.\r\n * - The implementation returned by `beacon` must be a contract.\r\n */\r\n function _setBeacon(address beacon, bytes memory data) internal virtual {\r\n _upgradeBeaconToAndCall(beacon, data, false);\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/ERC1967Proxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\r\n\r\n// Note: This implementation is an exact copy with the constructor removed, and pragma and imports updated.\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "@openzeppelin/contracts/proxy/Proxy.sol";\r\nimport "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol";\r\n\r\n/**\r\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\r\n * implementation address that can be changed. This address is stored in storage in the location specified by\r\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn\'t conflict with the storage layout of the\r\n * implementation behind the proxy.\r\n */\r\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\r\n /**\r\n * @dev Returns the current implementation address.\r\n */\r\n function _implementation() internal view virtual override returns (address impl) {\r\n return ERC1967Upgrade._getImplementation();\r\n }\r\n}\r\n' + }, + 'src/proxies/openzeppelin/TransparentUpgradeableProxy.sol': { + content: + '// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/transparent/TransparentUpgradeableProxy.sol)\r\n\r\n/// @notice This implementation is a copy of OpenZeppelin\'s with the following changes:\r\n/// - Pragma updated\r\n/// - Imports updated\r\n/// - Constructor removed\r\n/// - Allows admin to call implementation\r\n\r\npragma solidity ^0.8.19;\r\n\r\nimport "./ERC1967Proxy.sol";\r\n\r\n/**\r\n * @dev Interface for {TransparentUpgradeableProxy}. In order to implement transparency, {TransparentUpgradeableProxy}\r\n * does not implement this interface directly, and some of its functions are implemented by an internal dispatch\r\n * mechanism. The compiler is unaware that these functions are implemented by {TransparentUpgradeableProxy} and will not\r\n * include them in the ABI so this interface must be used to interact with it.\r\n */\r\ninterface ITransparentUpgradeableProxy is IERC1967 {\r\n function admin() external view returns (address);\r\n\r\n function implementation() external view returns (address);\r\n\r\n function changeAdmin(address) external;\r\n\r\n function upgradeTo(address) external;\r\n\r\n function upgradeToAndCall(address, bytes memory) external payable;\r\n}\r\n\r\n/**\r\n * @dev This contract implements a proxy that is upgradeable by an admin.\r\n *\r\n * Unlike the original OpenZeppelin implementation, this contract does not prevent the admin from calling the implementation.\r\n * This potentially exposes the admin to a proxy selector attack. See\r\n * https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing].\r\n * When using this contract, you must ensure that the implementation function selectors do not clash with the proxy selectors.\r\n * The proxy selectors are:\r\n * - 0x3659cfe6: upgradeTo\r\n * - 0x4f1ef286: upgradeToAndCall\r\n * - 0x8f283970: changeAdmin\r\n * - 0xf851a440: admin\r\n * - 0x5c60da1b: implementation\r\n *\r\n * NOTE: The real interface of this proxy is that defined in `ITransparentUpgradeableProxy`. This contract does not\r\n * inherit from that interface, and instead the admin functions are implicitly implemented using a custom dispatch\r\n * mechanism in `_fallback`. Consequently, the compiler will not produce an ABI for this contract. This is necessary to\r\n * fully implement transparency without decoding reverts caused by selector clashes between the proxy and the\r\n * implementation.\r\n *\r\n * WARNING: It is not recommended to extend this contract to add additional external functions. If you do so, the compiler\r\n * will not check that there are no selector conflicts, due to the note above. A selector clash between any new function\r\n * and the functions declared in {ITransparentUpgradeableProxy} will be resolved in favor of the new one. This could\r\n * render the admin operations inaccessible, which could prevent upgradeability. Transparency may also be compromised.\r\n */\r\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\r\n /**\r\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\r\n *\r\n * CAUTION: This modifier is deprecated, as it could cause issues if the modified function has arguments, and the\r\n * implementation provides a function with the same selector.\r\n */\r\n modifier ifAdmin() {\r\n if (msg.sender == _getAdmin()) {\r\n _;\r\n } else {\r\n _fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev If caller is the admin process the call internally, otherwise transparently fallback to the proxy behavior\r\n */\r\n function _fallback() internal virtual override {\r\n if (msg.sender == _getAdmin()) {\r\n bytes memory ret;\r\n bytes4 selector = msg.sig;\r\n if (selector == ITransparentUpgradeableProxy.upgradeTo.selector) {\r\n ret = _dispatchUpgradeTo();\r\n } else if (selector == ITransparentUpgradeableProxy.upgradeToAndCall.selector) {\r\n ret = _dispatchUpgradeToAndCall();\r\n } else if (selector == ITransparentUpgradeableProxy.changeAdmin.selector) {\r\n ret = _dispatchChangeAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.admin.selector) {\r\n ret = _dispatchAdmin();\r\n } else if (selector == ITransparentUpgradeableProxy.implementation.selector) {\r\n ret = _dispatchImplementation();\r\n } else {\r\n // Call implementation\r\n return super._fallback();\r\n }\r\n assembly {\r\n return(add(ret, 0x20), mload(ret))\r\n }\r\n } else {\r\n super._fallback();\r\n }\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\r\n */\r\n function _dispatchAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address admin = _getAdmin();\r\n return abi.encode(admin);\r\n }\r\n\r\n /**\r\n * @dev Returns the current implementation.\r\n *\r\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\r\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\r\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\r\n */\r\n function _dispatchImplementation() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address implementation = _implementation();\r\n return abi.encode(implementation);\r\n }\r\n\r\n /**\r\n * @dev Changes the admin of the proxy.\r\n *\r\n * Emits an {AdminChanged} event.\r\n */\r\n function _dispatchChangeAdmin() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newAdmin = abi.decode(msg.data[4:], (address));\r\n _changeAdmin(newAdmin);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy.\r\n */\r\n function _dispatchUpgradeTo() private returns (bytes memory) {\r\n _requireZeroValue();\r\n\r\n address newImplementation = abi.decode(msg.data[4:], (address));\r\n _upgradeToAndCall(newImplementation, bytes(""), false);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\r\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\r\n * proxied contract.\r\n */\r\n function _dispatchUpgradeToAndCall() private returns (bytes memory) {\r\n (address newImplementation, bytes memory data) = abi.decode(msg.data[4:], (address, bytes));\r\n _upgradeToAndCall(newImplementation, data, true);\r\n\r\n return "";\r\n }\r\n\r\n /**\r\n * @dev Returns the current admin.\r\n *\r\n * CAUTION: This function is deprecated. Use {ERC1967Upgrade-_getAdmin} instead.\r\n */\r\n function _admin() internal view virtual returns (address) {\r\n return _getAdmin();\r\n }\r\n\r\n /**\r\n * @dev To keep this contract fully transparent, all `ifAdmin` functions must be payable. This helper is here to\r\n * emulate some proxy functions being non-payable while still allowing value to pass through.\r\n */\r\n function _requireZeroValue() internal {\r\n require(msg.value == 0);\r\n }\r\n}\r\n' + } + }, + settings: { + evmVersion: 'paris', + libraries: {}, + metadata: { bytecodeHash: 'ipfs' }, + optimizer: { enabled: true, runs: 20000 }, + remappings: [ + ':@0xsequence/contracts-library/=src/', + ':@0xsequence/erc-1155/=node_modules/@0xsequence/erc-1155/', + ':@0xsequence/erc20-meta-token/=node_modules/@0xsequence/erc20-meta-token/', + ':@openzeppelin/=node_modules/@openzeppelin/', + ':ds-test/=lib/forge-std/lib/ds-test/src/', + ':erc721a-upgradeable/=node_modules/erc721a-upgradeable/', + ':erc721a/=node_modules/erc721a/', + ':forge-std/=lib/forge-std/src/', + ':murky/=lib/murky/src/', + ':openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/' + ], + viaIR: true, + outputSelection: { + '*': { + '*': ['evm.bytecode', 'evm.deployedBytecode', 'devdoc', 'userdoc', 'metadata', 'abi'] + } + } + } + } +} diff --git a/scripts/factories/token_library/UpgradeableBeacon.ts b/scripts/factories/token_library/UpgradeableBeacon.ts new file mode 100644 index 0000000..8b5e568 --- /dev/null +++ b/scripts/factories/token_library/UpgradeableBeacon.ts @@ -0,0 +1,155 @@ +import type { EtherscanVerificationRequest } from '@0xsequence/solidity-deployer' +import { ContractFactory, ethers } from 'ethers' + +//TODO Code link + +const abi = [ + { + inputs: [ + { + internalType: 'address', + name: 'implementation_', + type: 'address' + } + ], + stateMutability: 'nonpayable', + type: 'constructor' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'previousOwner', + type: 'address' + }, + { + indexed: true, + internalType: 'address', + name: 'newOwner', + type: 'address' + } + ], + name: 'OwnershipTransferred', + type: 'event' + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: 'address', + name: 'implementation', + type: 'address' + } + ], + name: 'Upgraded', + type: 'event' + }, + { + inputs: [], + name: 'implementation', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'owner', + outputs: [{ internalType: 'address', name: '', type: 'address' }], + stateMutability: 'view', + type: 'function' + }, + { + inputs: [], + name: 'renounceOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [{ internalType: 'address', name: 'newOwner', type: 'address' }], + name: 'transferOwnership', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + }, + { + inputs: [ + { + internalType: 'address', + name: 'newImplementation', + type: 'address' + } + ], + name: 'upgradeTo', + outputs: [], + stateMutability: 'nonpayable', + type: 'function' + } +] + +export class UpgradeableBeacon extends ContractFactory { + constructor(signer: ethers.Signer) { + super( + abi, + '0x60803461011a57601f6105ee38819003918201601f19168301916001600160401b0383118484101761011f5780849260209460405283398101031261011a57516001600160a01b03808216919082820361011a576000549160018060a01b0319923384821617600055604051923391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a33b156100b2575060015416176001556040516104b890816101368239f35b62461bcd60e51b815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604052600436101561001257600080fd5b6000803560e01c80633659cfe6146102ce5780635c60da1b1461027c578063715018a6146101e05780638da5cb5b1461018f5763f2fde38b1461005457600080fd5b3461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610188576100ad610403565b8115610104578254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b80fd5b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57610217610403565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461018c57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461018c5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261018c5760043573ffffffffffffffffffffffffffffffffffffffff81169081810361018857610328610403565b3b1561037f57807fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8280a280f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f5570677261646561626c65426561636f6e3a20696d706c656d656e746174696f60448201527f6e206973206e6f74206120636f6e7472616374000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff60005416330361042457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea2646970667358221220dc365b16a2b6643d361d2ca2ef711f783ae4b4503a5f52631ea9ce48e88aa6da64736f6c63430008130033', + signer + ) + } +} + +export const UPGRADEABLEBEACON_VERIFICATION: Omit = { + contractToVerify: 'node_modules/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol:UpgradeableBeacon', + version: 'v0.8.19+commit.7dd6d404', + compilerInput: { + language: 'Solidity', + sources: { + 'node_modules/@openzeppelin/contracts/access/Ownable.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport "../utils/Context.sol";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), "Ownable: caller is not the owner");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), "Ownable: new owner is the zero address");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n' + }, + 'node_modules/@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/UpgradeableBeacon.sol)\n\npragma solidity ^0.8.0;\n\nimport "./IBeacon.sol";\nimport "../../access/Ownable.sol";\nimport "../../utils/Address.sol";\n\n/**\n * @dev This contract is used in conjunction with one or more instances of {BeaconProxy} to determine their\n * implementation contract, which is where they will delegate all function calls.\n *\n * An owner is able to change the implementation the beacon points to, thus upgrading the proxies that use this beacon.\n */\ncontract UpgradeableBeacon is IBeacon, Ownable {\n address private _implementation;\n\n /**\n * @dev Emitted when the implementation returned by the beacon is changed.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Sets the address of the initial implementation, and the deployer account as the owner who can upgrade the\n * beacon.\n */\n constructor(address implementation_) {\n _setImplementation(implementation_);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function implementation() public view virtual override returns (address) {\n return _implementation;\n }\n\n /**\n * @dev Upgrades the beacon to a new implementation.\n *\n * Emits an {Upgraded} event.\n *\n * Requirements:\n *\n * - msg.sender must be the owner of the contract.\n * - `newImplementation` must be a contract.\n */\n function upgradeTo(address newImplementation) public virtual onlyOwner {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Sets the implementation contract address for this beacon\n *\n * Requirements:\n *\n * - `newImplementation` must be a contract.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), "UpgradeableBeacon: implementation is not a contract");\n _implementation = newImplementation;\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Address.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn\'t rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity\'s `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, "Address: insufficient balance");\n\n (bool success, ) = recipient.call{value: amount}("");\n require(success, "Address: unable to send value, recipient may have reverted");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, "Address: low-level call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, "Address: low-level call with value failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, "Address: insufficient balance for call");\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, "Address: low-level static call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, "Address: low-level delegate call failed");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), "Address: call to non-contract");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn\'t, either by bubbling the\n * revert reason or using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n /// @solidity memory-safe-assembly\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n}\n' + }, + 'node_modules/@openzeppelin/contracts/utils/Context.sol': { + content: + '// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n' + } + }, + settings: { + evmVersion: 'paris', + libraries: {}, + metadata: { bytecodeHash: 'ipfs' }, + optimizer: { enabled: true, runs: 20000 }, + remappings: [ + ':@0xsequence/contracts-library/=src/', + ':@0xsequence/erc-1155/=node_modules/@0xsequence/erc-1155/', + ':@0xsequence/erc20-meta-token/=node_modules/@0xsequence/erc20-meta-token/', + ':@openzeppelin/=node_modules/@openzeppelin/', + ':ds-test/=lib/forge-std/lib/ds-test/src/', + ':erc721a-upgradeable/=node_modules/erc721a-upgradeable/', + ':erc721a/=node_modules/erc721a/', + ':forge-std/=lib/forge-std/src/', + ':murky/=lib/murky/src/', + ':openzeppelin-contracts/=lib/murky/lib/openzeppelin-contracts/' + ], + viaIR: true, + outputSelection: { + '*': { + '*': ['evm.bytecode', 'evm.deployedBytecode', 'devdoc', 'userdoc', 'metadata', 'abi'] + } + } + } + } +} diff --git a/scripts/factories/v2/FactoryV2.ts b/scripts/factories/v2/FactoryV2.ts index 85b8986..8a52d97 100644 --- a/scripts/factories/v2/FactoryV2.ts +++ b/scripts/factories/v2/FactoryV2.ts @@ -83,3 +83,5 @@ export const FACTORY_V2_VERIFICATION: Omit + +const WALLET_CONFIG = { + threshold: 2, + checkpoint: 0, + signers: [ + { + // my@horizon.io + address: '0xF278B8e1515FBAF4F6dB5361ac1FEaE955160996', + weight: 1 + }, + { + // mstan@horizon.io + address: '0x0C885789f0642CA123008F961d19C9813DA11b24', + weight: 1 + }, + { + // aa@horizon.io + address: '0x857CDfb0922bd51ca873340a9325F43F1233BEB8', + weight: 1 + }, + { + // pc@horizon.io + address: '0x31eabd463f98D2Da85710aB0d5AfFdC47280320C', + weight: 1 + } + ] +} + +const EXPECTED_ADDRESS = '0x007a47e6BF40C1e0ed5c01aE42fDC75879140bc4' + +/** + * Creates the developer multisig Sequence wallet. + * This wallet is the owner of Sequence managed contracts, such as Builder Factory contracts. + * The signers of this multisig wallet are Sequence developers. + */ +export const deployDeveloperMultisig = async ( + signer: ethers.Signer, + context: commons.context.WalletContext, + txParams?: ethers.providers.TransactionRequest +): Promise => { + const { provider } = signer + if (!provider) { + throw new Error('Signer must be connected to a provider') + } + + const o = ora().start(`Deploying developer multisig wallet`) + + const walletConfig = v2.coders.config.fromSimple(WALLET_CONFIG) + const address = commons.context.addressOf(context, v2.coders.config.imageHashOf(walletConfig)) + if (address !== EXPECTED_ADDRESS) { + throw new Error('Developer multisig address is not correct') + } + + const relayer = new LocalRelayer(signer) + if (txParams) { + relayer.setTransactionOptions(txParams) + } + + const wallet = new Wallet({ + coders: { + signature: v2.signature.SignatureCoder, + config: v2.config.ConfigCoder + }, + context: context, + config: walletConfig, + chainId: (await provider.getNetwork()).chainId, + address, + orchestrator: new Orchestrator([]), + provider, + relayer + }) + + if (await wallet.reader().isDeployed(wallet.address)) { + o.warn(`Already deployed developer multisig wallet at ${wallet.address}`) + } else { + const tx = await wallet.deploy() + await tx.wait() + } + + o.succeed(`Deployed developer multisig wallet at ${wallet.address}`) + + return wallet +} diff --git a/scripts/factories/deployers/GuardDeployer.ts b/scripts/wallets/Guard.ts similarity index 80% rename from scripts/factories/deployers/GuardDeployer.ts rename to scripts/wallets/Guard.ts index c20d998..3aad0e2 100644 --- a/scripts/factories/deployers/GuardDeployer.ts +++ b/scripts/wallets/Guard.ts @@ -6,7 +6,8 @@ export const deployGuard = async ( guardAlias: string, guardAddr: string, mainModuleAddr: string, - salt: string + salt: string, + txParams?: ethers.providers.TransactionRequest ): Promise => { if (!factory.hasOwnProperty('deploy')) throw new Error('Factory must have a deploy method') if (!factory.signer.provider) throw new Error('Signer must be connected to a provider') @@ -19,12 +20,13 @@ export const deployGuard = async ( return } - const txParams = { + const params = { // gasLimit: BigNumber.from(7500000), - gasLimit: await provider.getBlock('latest').then(b => b.gasLimit.mul(4).div(10)) - // gasPrice: BigNumber.from(10).pow(8).mul(16) + gasLimit: await provider.getBlock('latest').then(b => b.gasLimit.mul(4).div(10)), + // gasPrice: BigNumber.from(10).pow(8).mul(16), + ...txParams } - const tx = await factory.deploy(mainModuleAddr, salt, txParams) + const tx = await factory.deploy(mainModuleAddr, salt, params) await tx.wait() // Double check diff --git a/yarn.lock b/yarn.lock index 4315729..deba90a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,186 @@ # yarn lockfile v1 +"0xsequence@^1.2.3": + version "1.2.9" + resolved "https://registry.yarnpkg.com/0xsequence/-/0xsequence-1.2.9.tgz#3c77fad1dc2b9a6316b0a448773936b0bda5b3ca" + integrity sha512-09ebARKUdX6MaSdA6gHMydbCFpt9sCEwPn7Y6ZCOFfv+47QQKILNY73rDEva7CnqTzzlSYGkKHzfdu1agj7dOg== + dependencies: + "@0xsequence/abi" "1.2.9" + "@0xsequence/account" "1.2.9" + "@0xsequence/api" "1.2.9" + "@0xsequence/auth" "1.2.9" + "@0xsequence/core" "1.2.9" + "@0xsequence/guard" "1.2.9" + "@0xsequence/indexer" "1.2.9" + "@0xsequence/metadata" "1.2.9" + "@0xsequence/migration" "1.2.9" + "@0xsequence/multicall" "1.2.9" + "@0xsequence/network" "1.2.9" + "@0xsequence/provider" "1.2.9" + "@0xsequence/relayer" "1.2.9" + "@0xsequence/sessions" "1.2.9" + "@0xsequence/signhub" "1.2.9" + "@0xsequence/utils" "1.2.9" + "@0xsequence/wallet" "1.2.9" + +"@0xsequence/abi@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/abi/-/abi-1.2.9.tgz#5519a583c5c7b565b22f917fab322f3beee7d319" + integrity sha512-q5htzNxXq1d8mhOg3eaKDH9qSRjUM4KtHK0Ikjf+wslg8gDVFt0qoZfKUZHq2N7oo8wjsZnC2OCEk0CU2K63vw== + +"@0xsequence/account@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/account/-/account-1.2.9.tgz#971438a79eae816784027b30bc4c2abe41fdb628" + integrity sha512-AA0eY5Dt/YjU91cyxvCiSGWRdopwTdG0jFSROnv8RmvrJ/V2Uo+4Afsm2hYC93wSZHf2QYcMTIublXyuDp6tIQ== + dependencies: + "@0xsequence/core" "1.2.9" + "@0xsequence/migration" "1.2.9" + "@0xsequence/network" "1.2.9" + "@0xsequence/relayer" "1.2.9" + "@0xsequence/sessions" "1.2.9" + "@0xsequence/utils" "1.2.9" + "@0xsequence/wallet" "1.2.9" + ethers "^5.5.2" + +"@0xsequence/api@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/api/-/api-1.2.9.tgz#e6214b6373ce2b2515e3cb7012be050a9dc05e45" + integrity sha512-6Zmt8G5Mls23xDPiwDkN0OZ/KzgQWENS60S4RQEj73LY7rLHM8Cf2wJFbpKzhYJg9D+8SjaxAjOuskVFyWZJeQ== + +"@0xsequence/auth@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/auth/-/auth-1.2.9.tgz#e2778a5a7bab939b2795e1328054353aa9bae82b" + integrity sha512-eU7X+g1ZhbTkyFr1Vaqw3szrSRCb6XrAg96RHOiPj+6npJhh4o6Z0nGGO55QbftJxJvpwAIYdwQjNqFAL2aFpA== + dependencies: + "@0xsequence/abi" "1.2.9" + "@0xsequence/account" "1.2.9" + "@0xsequence/api" "1.2.9" + "@0xsequence/core" "1.2.9" + "@0xsequence/ethauth" "^0.8.1" + "@0xsequence/indexer" "1.2.9" + "@0xsequence/metadata" "1.2.9" + "@0xsequence/migration" "1.2.9" + "@0xsequence/network" "1.2.9" + "@0xsequence/sessions" "1.2.9" + "@0xsequence/signhub" "1.2.9" + "@0xsequence/utils" "1.2.9" + "@0xsequence/wallet" "1.2.9" + +"@0xsequence/core@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/core/-/core-1.2.9.tgz#613d84d00a7719ff24443a609658eab41bc05113" + integrity sha512-G8WEzqt1aqixdzujcUSnCtCF2Z1eNXA56pCLs+H/tcrXmJxA2C6dGAtvzV7avgWyUC2S+Pbyja4GDIbXLqYqVg== + dependencies: + "@0xsequence/abi" "1.2.9" + +"@0xsequence/ethauth@^0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@0xsequence/ethauth/-/ethauth-0.8.1.tgz#9b97a17e74ca9559b79a93a8e39ca77baaccc943" + integrity sha512-P21cxRSS+2mDAqFVAJt0lwQFtbObX+Ewlj8DMyDELp81+QbfHFh6LCyu8dTXNdBx6UbmRFOCSBno5Txd50cJPQ== + dependencies: + js-base64 "^3.7.2" + +"@0xsequence/guard@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/guard/-/guard-1.2.9.tgz#00c302ca1b63f605d385c1a47fe3c44b9a9eb4a2" + integrity sha512-E+R2rfd019TNbTseFfv4k1aCUAuBZcPnBrMyZCJLvsOKtbyRzr+CW2eyjAEFfC54Bi1Mi2sdfqKOULG1N052hw== + dependencies: + "@0xsequence/core" "1.2.9" + "@0xsequence/signhub" "1.2.9" + ethers "^5.7.2" + +"@0xsequence/indexer@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/indexer/-/indexer-1.2.9.tgz#7278344756e07f54911aefedc9c76807b55b34fa" + integrity sha512-c+8sRw/7icmnc8TRP3RufQK+oRD2Ahv7pFzYdPzSOeH/PHg+zhFnXs7Ndvn/nr4zwQFKZibuKiSyXdIRP6BhVA== + +"@0xsequence/metadata@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/metadata/-/metadata-1.2.9.tgz#a12c36f1bbb6446f5157eff1f1b30323b03ccbc6" + integrity sha512-Gs6nBIsJ3lV25AeahSsV1gs3weeKn/CciTzysCZutUXr/Klo4Xt8bd3p96cgH80XDZgPINQ8Ijd2FP1kykbdig== + +"@0xsequence/migration@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/migration/-/migration-1.2.9.tgz#8b12d5765b398edcbda42ffeaf87c65c2a8e1298" + integrity sha512-IUvOOX1vlEjcUxKPydMK3lRtSp1u5V+yjp3+AjHogfEqgk9gahRC6gCNEu6orluDgy5kawtgfhGnzVB/YVqIvg== + dependencies: + "@0xsequence/abi" "1.2.9" + "@0xsequence/core" "1.2.9" + "@0xsequence/wallet" "1.2.9" + ethers "^5.5.2" + +"@0xsequence/multicall@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/multicall/-/multicall-1.2.9.tgz#ff328badd67fd8b5466930c1facdf44b8697cc22" + integrity sha512-CXE3oFD8ctQW8zgiVWdkJFbPmVNzQ3aDlSIASzcgaL/DmJRejB1cC8FkPuxPqWZddHTrdG29nn2TKPIWlhpvqQ== + dependencies: + "@0xsequence/abi" "1.2.9" + "@0xsequence/network" "1.2.9" + "@0xsequence/utils" "1.2.9" + +"@0xsequence/network@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/network/-/network-1.2.9.tgz#60c36c6577a164c24f1e98cc1a1f90039d7c119b" + integrity sha512-j5lo0i5YGPI/uSiI0HV+XGipbyJXEHh9LUvludlORC6/1cfdmjO74rQ6blUcNpQUDQ8rcbfm6nED4LAzzIxM0g== + dependencies: + "@0xsequence/core" "1.2.9" + "@0xsequence/indexer" "1.2.9" + "@0xsequence/relayer" "1.2.9" + "@0xsequence/utils" "1.2.9" + +"@0xsequence/provider@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/provider/-/provider-1.2.9.tgz#1ad7992376638a5cc8ea823c860388b637ec4b48" + integrity sha512-jPllGQfb4wqFwkI+VSntpzxJPBcBRE7sZFCwbbq5/EtfzWxPLXIG4GtdRp+BYEP0RpesOkRDFNZ3BJhYuqH69g== + dependencies: + "@0xsequence/abi" "1.2.9" + "@0xsequence/account" "1.2.9" + "@0xsequence/auth" "1.2.9" + "@0xsequence/core" "1.2.9" + "@0xsequence/migration" "1.2.9" + "@0xsequence/network" "1.2.9" + "@0xsequence/relayer" "1.2.9" + "@0xsequence/utils" "1.2.9" + "@0xsequence/wallet" "1.2.9" + eventemitter2 "^6.4.5" + webextension-polyfill "^0.10.0" + +"@0xsequence/relayer@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/relayer/-/relayer-1.2.9.tgz#05e8673359f69568536edd5207280d06048727cf" + integrity sha512-NcK4HhB9xU26+ex5dwCLMd+bomaj7TJXmHhs2fUsRyvhmmZAgOcX4Q4yO25C9Czsv/97KwIqlhuTAlDmJJbWSw== + dependencies: + "@0xsequence/abi" "1.2.9" + "@0xsequence/core" "1.2.9" + "@0xsequence/utils" "1.2.9" + +"@0xsequence/replacer@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/replacer/-/replacer-1.2.9.tgz#7bcd1c8aab86755377cb01bf4469f596dff1139f" + integrity sha512-uK+PYd2Sjlw+r/M7rTaX+gboWmo9Ag7XCGwrick+XzqJktY89he2Cq4Jk56H+aEOhM+/KxFqNwTbICKP0/xxXA== + dependencies: + "@0xsequence/abi" "1.2.9" + "@0xsequence/core" "1.2.9" + +"@0xsequence/sessions@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/sessions/-/sessions-1.2.9.tgz#facfad95a4ccff73c1f25bd68aa122265bf4f5ee" + integrity sha512-I74Ouy0bA05VIYgJTu614l4rEwkjB+vE9mhjyhIT6KZlSY3G3xVbtGmWRMYXgdptVqQX3qwsXuUYDjNML6N/7w== + dependencies: + "@0xsequence/core" "1.2.9" + "@0xsequence/migration" "1.2.9" + "@0xsequence/replacer" "1.2.9" + ethers "^5.5.2" + idb "^7.1.1" + +"@0xsequence/signhub@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/signhub/-/signhub-1.2.9.tgz#c23faf2dfdf50685d978ef5b55a7d813c37fddc4" + integrity sha512-AkYcC825p78RT4pwuC1Zrw5V4OvhPr90YSCIJ4+UQ3T3tyoMLew9upiDbXQ9TTQdRkfYuHETZkd3cq0I9sRfcg== + dependencies: + ethers "^5.5.2" + "@0xsequence/solidity-deployer@^0.0.4": version "0.0.4" resolved "https://registry.yarnpkg.com/@0xsequence/solidity-deployer/-/solidity-deployer-0.0.4.tgz#76b1b97c72f5d26ab8257402b5cefa71e137d5d0" @@ -11,6 +191,25 @@ axios "^1.3.5" ethers "^5.7.2" +"@0xsequence/utils@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/utils/-/utils-1.2.9.tgz#ced8d6d6562a1bab1cec797089cabb819f2f4185" + integrity sha512-B+CEkXzIxMpP9vEvmSgwV2XdfpWZEJiuU8bUGaS7yt4vduwE6XCfngBfWRQOvHF5kxfFTEjIZw43nLPG6Y1IdQ== + dependencies: + js-base64 "^3.7.2" + +"@0xsequence/wallet@1.2.9": + version "1.2.9" + resolved "https://registry.yarnpkg.com/@0xsequence/wallet/-/wallet-1.2.9.tgz#e4bb6e95d73fbb022aad58da16b5ff3668dd61ca" + integrity sha512-6epE4P9P4auTcc/xIxZertGoq0UkpqqIPDXdWfzwNISR0HQW+wnXW7JlbwpzpoEGs2zEig5sK0lFbGiZQ+x17A== + dependencies: + "@0xsequence/abi" "1.2.9" + "@0xsequence/core" "1.2.9" + "@0xsequence/network" "1.2.9" + "@0xsequence/relayer" "1.2.9" + "@0xsequence/signhub" "1.2.9" + "@0xsequence/utils" "1.2.9" + "@aashutoshrathi/word-wrap@^1.2.3": version "1.2.6" resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" @@ -1295,7 +1494,7 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -ethers@^5.7.2: +ethers@^5.5.2, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -1331,6 +1530,11 @@ ethers@^5.7.2: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" +eventemitter2@^6.4.5: + version "6.4.9" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.9.tgz#41f2750781b4230ed58827bc119d293471ecb125" + integrity sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg== + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -1611,6 +1815,11 @@ husky@^4.2.3: slash "^3.0.0" which-pm-runs "^1.0.0" +idb@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/idb/-/idb-7.1.1.tgz#d910ded866d32c7ced9befc5bfdf36f572ced72b" + integrity sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ== + ieee754@^1.1.13: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -1806,6 +2015,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +js-base64@^3.7.2: + version "3.7.5" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.5.tgz#21e24cf6b886f76d6f5f165bfcd69cc55b9e3fca" + integrity sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA== + js-sha3@0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" @@ -2587,6 +2801,11 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +webextension-polyfill@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz#ccb28101c910ba8cf955f7e6a263e662d744dbb8" + integrity sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g== + which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6"