diff --git a/.env.example b/.env.example index a17dc9a6..d277cd52 100644 --- a/.env.example +++ b/.env.example @@ -1,11 +1,11 @@ # GENERAL ## The network used for testing purposes -NETWORK_NAME="mainnet" # ["mainnet", "goerli", "sepolia", "polygon", "polygonMumbai", "base", "baseGoerli", "arbitrum", "arbitrumGoerli"] +NETWORK_NAME="sepolia" # ["mainnet", "sepolia", "polygon", "polygonMumbai", "base", "baseSepolia", "arbitrum", "arbitrumSepolia"] # CONTRACTS -## Hex encoded private keys separated by a comma `,`a +## One or multiple hex encoded private keys separated by commas `,` replacing the hardhat default accounts. PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" # Default hardhat account 0 private key. DON'T USE FOR DEPLOYMENTS ## Infura credentials diff --git a/.gitignore b/.gitignore index ff7a44be..8180f988 100644 --- a/.gitignore +++ b/.gitignore @@ -21,8 +21,6 @@ packages/subgraph/tests/.bin .pnp.* coverage.json -plugin-info-testing.json - packages/subgraph/deploy-output.txt packages/subgraph/subgraph.yaml packages/subgraph/tests/.latest.json diff --git a/packages/contracts/.solcover.js b/packages/contracts/.solcover.js index 90c0b251..9f51a216 100644 --- a/packages/contracts/.solcover.js +++ b/packages/contracts/.solcover.js @@ -1,7 +1,7 @@ module.exports = { - istanbulReporter: ['html', 'lcov'], + istanbulReporter: ['html', 'lcov', 'text'], providerOptions: { privateKey: process.env.PRIVATE_KEY, }, - skipFiles: ['test'], + skipFiles: ['mocks'], }; diff --git a/packages/contracts/deploy/00_info/01_account_info.ts b/packages/contracts/deploy/00_info/01_account_info.ts index 0762845f..9ebd2dc6 100644 --- a/packages/contracts/deploy/00_info/01_account_info.ts +++ b/packages/contracts/deploy/00_info/01_account_info.ts @@ -1,17 +1,54 @@ +import { + AragonOSxAsciiArt, + getProductionNetworkName, + isLocal, +} from '../../utils/helpers'; +import {getNetworkByNameOrAlias} from '@aragon/osx-commons-configs'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import path from 'path'; +/** + * Prints information about the used/forked network and initial deployer wallet balance. + * @param {HardhatRuntimeEnvironment} hre + */ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + console.log(AragonOSxAsciiArt); + console.log(`${'-'.repeat(60)}`); + console.log(`\nāœØ ${path.basename(__filename)}:`); + const [deployer] = await hre.ethers.getSigners(); + if (isLocal(hre)) { + const productionNetworkName: string = getProductionNetworkName(hre); + + console.log( + `Simulated deployment on local network '${hre.network.name}'. Forking production network '${productionNetworkName}'...` + ); + + // Fork the network provided in the `.env` file + const networkConfig = getNetworkByNameOrAlias(productionNetworkName)!; + await hre.network.provider.request({ + method: 'hardhat_reset', + params: [ + { + forking: { + jsonRpcUrl: networkConfig.url, + }, + }, + ], + }); + } else { + console.log(`Production deployment on network '${hre.network.name}'.`); + } console.log( - `Using account "${ + `Using account '${ deployer.address - }" with a balance of ${hre.ethers.utils.formatEther( + }' with a balance of ${hre.ethers.utils.formatEther( await deployer.getBalance() - )} for deployment...` + )} native tokens.` ); }; export default func; -func.tags = ['Info', 'Deployment']; +func.tags = ['Info', 'CreateRepo', 'NewVersion', 'UpgradeRepo']; diff --git a/packages/contracts/deploy/01_repo/10_create_repo.ts b/packages/contracts/deploy/01_repo/10_create_repo.ts index 51087f63..76fcef7d 100644 --- a/packages/contracts/deploy/01_repo/10_create_repo.ts +++ b/packages/contracts/deploy/01_repo/10_create_repo.ts @@ -1,102 +1,113 @@ -import {PLUGIN_REPO_ENS_NAME} from '../../plugin-settings'; -import {ENS__factory} from '../../typechain'; -import {PluginRepoRegisteredEvent} from '../../typechain/@aragon/osx/framework/plugin/repo/PluginRepoRegistry'; +import {PLUGIN_REPO_ENS_SUBDOMAIN_NAME} from '../../plugin-settings'; import { - findEventTopicLog, - addDeployedRepo as addCreatedRepo, - getPluginRepoFactoryAddress, - getPluginRepoRegistryAddress, + findPluginRepo, + getProductionNetworkName, + pluginEnsDomain, } from '../../utils/helpers'; import { - PluginRepoFactory__factory, + getLatestNetworkDeployment, + getNetworkNameByAlias, +} from '@aragon/osx-commons-configs'; +import { + UnsupportedNetworkError, + findEventTopicLog, +} from '@aragon/osx-commons-sdk'; +import { + PluginRepoRegistryEvents, PluginRepoRegistry__factory, PluginRepo__factory, - ENSSubdomainRegistrar__factory, + PluginRepoFactory__factory, } from '@aragon/osx-ethers'; -import {ethers} from 'hardhat'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import path from 'path'; +/** + * Creates a plugin repo under Aragon's ENS base domain with subdomain requested in the `./plugin-settings.ts` file. + * @param {HardhatRuntimeEnvironment} hre + */ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log(`\nDeploying the "${PLUGIN_REPO_ENS_NAME}" plugin repo`); + console.log( + `Creating the '${pluginEnsDomain( + hre + )}' plugin repo through Aragon's 'PluginRepoFactory'...` + ); - const {network} = hre; const [deployer] = await hre.ethers.getSigners(); - // Get the PluginRepoFactory address - const pluginRepoFactoryAddr: string = getPluginRepoFactoryAddress( - network.name - ); - + // Get the Aragon `PluginRepoFactory` from the `osx-commons-configs` + const productionNetworkName = getProductionNetworkName(hre); + const network = getNetworkNameByAlias(productionNetworkName); + if (network === null) { + throw new UnsupportedNetworkError(productionNetworkName); + } + const networkDeployments = getLatestNetworkDeployment(network); + if (networkDeployments === null) { + throw `Deployments are not available on network ${network}.`; + } const pluginRepoFactory = PluginRepoFactory__factory.connect( - pluginRepoFactoryAddr, + networkDeployments.PluginRepoFactory.address, deployer ); - // Create the PluginRepo + // Create the `PluginRepo` through the Aragon `PluginRepoFactory` const tx = await pluginRepoFactory.createPluginRepo( - PLUGIN_REPO_ENS_NAME, + PLUGIN_REPO_ENS_SUBDOMAIN_NAME, deployer.address ); - const eventLog = await findEventTopicLog( - tx, - PluginRepoRegistry__factory.createInterface(), - 'PluginRepoRegistered' - ); - if (!eventLog) { - throw new Error('Failed to get PluginRepoRegistered event log'); - } + // Get the PluginRepo address and deployment block number from the txn and event therein + const eventLog = + await findEventTopicLog( + tx, + PluginRepoRegistry__factory.createInterface(), + 'PluginRepoRegistered' + ); const pluginRepo = PluginRepo__factory.connect( eventLog.args.pluginRepo, deployer ); - const blockNumberOfDeployment = (await tx.wait()).blockNumber; - console.log( - `"${PLUGIN_REPO_ENS_NAME}" PluginRepo deployed at: ${pluginRepo.address} at block ${blockNumberOfDeployment}.` + `'${pluginEnsDomain(hre)}' PluginRepo deployed at: ${pluginRepo.address}.` ); - // Store the information - addCreatedRepo( - network.name, - PLUGIN_REPO_ENS_NAME, - pluginRepo.address, - [], - blockNumberOfDeployment - ); + hre.aragonToVerifyContracts.push({ + address: pluginRepo.address, + args: [], + }); }; export default func; -func.tags = ['PluginRepo', 'Deployment']; -func.skip = async (hre: HardhatRuntimeEnvironment) => { - // Skip plugin repo creation if the ENS name is taken already +func.tags = ['CreateRepo']; - const [deployer] = await hre.ethers.getSigners(); - - const pluginRepoRegistry = PluginRepoRegistry__factory.connect( - getPluginRepoRegistryAddress(hre.network.name), - deployer - ); +/** + * Skips `PluginRepo` creation if the ENS name is claimed already + * @param {HardhatRuntimeEnvironment} hre + */ +func.skip = async (hre: HardhatRuntimeEnvironment) => { + console.log(`\nšŸ—ļø ${path.basename(__filename)}:`); - const registrar = ENSSubdomainRegistrar__factory.connect( - await pluginRepoRegistry.subdomainRegistrar(), - deployer - ); + // Check if the ens record exists already + const {pluginRepo, ensDomain} = await findPluginRepo(hre); - const ens = ENS__factory.connect(await registrar.ens(), deployer); + if (pluginRepo !== null) { + console.log( + `ENS name '${ensDomain}' was claimed already at '${ + pluginRepo.address + }' on network '${getProductionNetworkName(hre)}'. Skipping deployment...` + ); - const recordExists = await ens.recordExists( - ethers.utils.namehash(`${PLUGIN_REPO_ENS_NAME}.plugin.dao.eth`) - ); + hre.aragonToVerifyContracts.push({ + address: pluginRepo.address, + args: [], + }); - console.log( - `ENS name ${PLUGIN_REPO_ENS_NAME}.plugin.dao.eth does ${ - recordExists ? 'exist already' : 'not exist yet' - }` - ); + return true; + } else { + console.log(`ENS name '${ensDomain}' is unclaimed. Deploying...`); - return recordExists; + return false; + } }; diff --git a/packages/contracts/deploy/02_setup/10_setup.ts b/packages/contracts/deploy/02_setup/10_setup.ts index 09609ffe..041e76bc 100644 --- a/packages/contracts/deploy/02_setup/10_setup.ts +++ b/packages/contracts/deploy/02_setup/10_setup.ts @@ -1,9 +1,14 @@ import {PLUGIN_SETUP_CONTRACT_NAME} from '../../plugin-settings'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import path from 'path'; +/** + * Deploys the plugin setup contract with the plugin implementation inside. + * @param {HardhatRuntimeEnvironment} hre + */ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log(`\nDeploying ${PLUGIN_SETUP_CONTRACT_NAME}`); + console.log(`\nšŸ—ļø ${path.basename(__filename)}:`); const {deployments, getNamedAccounts} = hre; const {deploy} = deployments; @@ -17,4 +22,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = [PLUGIN_SETUP_CONTRACT_NAME, 'Deployment']; +func.tags = [PLUGIN_SETUP_CONTRACT_NAME, 'NewVersion', 'Deployment']; diff --git a/packages/contracts/deploy/02_setup/11_setup_conclude.ts b/packages/contracts/deploy/02_setup/11_setup_conclude.ts index b625d610..1b514b68 100644 --- a/packages/contracts/deploy/02_setup/11_setup_conclude.ts +++ b/packages/contracts/deploy/02_setup/11_setup_conclude.ts @@ -2,32 +2,34 @@ import {PLUGIN_SETUP_CONTRACT_NAME} from '../../plugin-settings'; import {MyPluginSetup__factory, MyPlugin__factory} from '../../typechain'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {setTimeout} from 'timers/promises'; +import path from 'path'; +/** + * Concludes the plugin setup and implementation contract deployment by queuing the addresses in the verification array. + * @param {HardhatRuntimeEnvironment} hre + */ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log(`Concluding ${PLUGIN_SETUP_CONTRACT_NAME} deployment.\n`); - const [deployer] = await hre.ethers.getSigners(); + console.log(`\nšŸ”Ž ${path.basename(__filename)}:`); + console.log(`Concluding '${PLUGIN_SETUP_CONTRACT_NAME}' deployment.`); - const {deployments, network} = hre; + const [deployer] = await hre.ethers.getSigners(); + const {deployments} = hre; + // Get the plugin setup address const setupDeployment = await deployments.get(PLUGIN_SETUP_CONTRACT_NAME); const setup = MyPluginSetup__factory.connect( setupDeployment.address, deployer ); + // Get the plugin implementation address const implementation = MyPlugin__factory.connect( await setup.implementation(), deployer ); - // Add a timeout for polygon because the call to `implementation()` can fail for newly deployed contracts in the first few seconds - if (network.name === 'polygon') { - console.log(`Waiting 30secs for ${network.name} to finish up...`); - await setTimeout(30000); - } - + // Queue the plugin setup and implementation for verification on the block explorers hre.aragonToVerifyContracts.push({ - address: setupDeployment.address, + address: setup.address, args: setupDeployment.args, }); hre.aragonToVerifyContracts.push({ @@ -37,4 +39,4 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { }; export default func; -func.tags = [PLUGIN_SETUP_CONTRACT_NAME, 'Verification']; +func.tags = [PLUGIN_SETUP_CONTRACT_NAME, 'NewVersion', 'Verification']; diff --git a/packages/contracts/deploy/02_setup/12_publish.ts b/packages/contracts/deploy/02_setup/12_publish.ts index d7a5e45f..ea146b9b 100644 --- a/packages/contracts/deploy/02_setup/12_publish.ts +++ b/packages/contracts/deploy/02_setup/12_publish.ts @@ -1,31 +1,41 @@ import { METADATA, - PLUGIN_CONTRACT_NAME, - PLUGIN_REPO_ENS_NAME, + PLUGIN_REPO_ENS_SUBDOMAIN_NAME, PLUGIN_SETUP_CONTRACT_NAME, VERSION, } from '../../plugin-settings'; -import {addCreatedVersion, getPluginInfo} from '../../utils/helpers'; -import {toHex} from '../../utils/ipfs'; -import {uploadToIPFS} from '../../utils/ipfs'; -import {PluginRepo__factory, PluginSetup__factory} from '@aragon/osx-ethers'; +import { + findPluginRepo, + getPastVersionCreatedEvents, + pluginEnsDomain, +} from '../../utils/helpers'; +import { + PLUGIN_REPO_PERMISSIONS, + toHex, + uploadToIPFS, +} from '@aragon/osx-commons-sdk'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import path from 'path'; +/** + * Publishes the plugin setup in the plugin repo as a new version as specified in the `./plugin-settings.ts` file. + * @param {HardhatRuntimeEnvironment} hre + */ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log( - `Publishing ${PLUGIN_SETUP_CONTRACT_NAME} as v${VERSION.release}.${VERSION.build} in the "${PLUGIN_REPO_ENS_NAME}" plugin repo` + `Publishing ${PLUGIN_SETUP_CONTRACT_NAME} as v${VERSION.release}.${VERSION.build} in the "${PLUGIN_REPO_ENS_SUBDOMAIN_NAME}" plugin repo` ); - const {deployments, network} = hre; + const {deployments} = hre; const [deployer] = await hre.ethers.getSigners(); // Upload the metadata to IPFS const releaseMetadataURI = `ipfs://${await uploadToIPFS( - JSON.stringify(METADATA.release) + JSON.stringify(METADATA.release, null, 2) )}`; const buildMetadataURI = `ipfs://${await uploadToIPFS( - JSON.stringify(METADATA.build) + JSON.stringify(METADATA.build, null, 2) )}`; console.log(`Uploaded release metadata: ${releaseMetadataURI}`); @@ -35,17 +45,17 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const setup = await deployments.get(PLUGIN_SETUP_CONTRACT_NAME); // Get PluginRepo - const pluginRepo = PluginRepo__factory.connect( - getPluginInfo(network.name)[network.name]['address'], - deployer - ); + const {pluginRepo, ensDomain} = await findPluginRepo(hre); + if (pluginRepo === null) { + throw `PluginRepo '${ensDomain}' does not exist yet.`; + } // Check release number const latestRelease = await pluginRepo.latestRelease(); if (VERSION.release > latestRelease + 1) { throw Error( `Publishing with release number ${VERSION.release} is not possible. - The latest release is ${latestRelease} and the next release you can publish is release number ${ + The latest release is ${latestRelease} and the next release you can publish is release number ${ latestRelease + 1 }.` ); @@ -53,69 +63,90 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // Check build number const latestBuild = (await pluginRepo.buildCount(VERSION.release)).toNumber(); - if (VERSION.build <= latestBuild) { + if (VERSION.build < latestBuild) { throw Error( - `Publishing with build number ${VERSION.build} is not possible. - The latest build is ${latestBuild} and build ${VERSION.build} has been deployed already.` + `Publishing with build number ${VERSION.build} is not possible. The latest build is ${latestBuild}. Aborting publication...` ); } if (VERSION.build > latestBuild + 1) { throw Error( `Publishing with build number ${VERSION.build} is not possible. - The latest build is ${latestBuild} and the next release you can publish is release number ${ + The latest build is ${latestBuild} and the next release you can publish is release number ${ latestBuild + 1 - }.` + }. Aborting publication...` ); } // Create Version - const tx = await pluginRepo.createVersion( - VERSION.release, - setup.address, - toHex(buildMetadataURI), - toHex(releaseMetadataURI) - ); + if ( + await pluginRepo.callStatic.isGranted( + pluginRepo.address, + deployer.address, + PLUGIN_REPO_PERMISSIONS.MAINTAINER_PERMISSION_ID, + [] + ) + ) { + const tx = await pluginRepo.createVersion( + VERSION.release, + setup.address, + toHex(buildMetadataURI), + toHex(releaseMetadataURI) + ); + + if (setup == undefined || setup?.receipt == undefined) { + throw Error('setup deployment unavailable'); + } + + await tx.wait(); - const blockNumberOfPublication = (await tx.wait()).blockNumber; + const version = await pluginRepo['getLatestVersion(uint8)']( + VERSION.release + ); + if (VERSION.release !== version.tag.release) { + throw Error('something went wrong'); + } - if (setup == undefined || setup?.receipt == undefined) { - throw Error('setup deployment unavailable'); + console.log( + `Published ${PLUGIN_SETUP_CONTRACT_NAME} at ${setup.address} in PluginRepo ${PLUGIN_REPO_ENS_SUBDOMAIN_NAME} at ${pluginRepo.address}.` + ); + } else { + throw Error( + `The new version cannot be published because the deployer ('${deployer.address}') is lacking the ${PLUGIN_REPO_PERMISSIONS.MAINTAINER_PERMISSION_ID} permission on repo (${pluginRepo.address}).` + ); } +}; + +export default func; +func.tags = [PLUGIN_SETUP_CONTRACT_NAME, 'NewVersion', 'Publication']; - const version = await pluginRepo['getLatestVersion(uint8)'](VERSION.release); - if (VERSION.release !== version.tag.release) { - throw Error('something went wrong'); +/** + * Skips the publication of the specified version if it already exists in the plugin repo. + * @param {HardhatRuntimeEnvironment} hre + */ +func.skip = async (hre: HardhatRuntimeEnvironment) => { + console.log(`\nšŸ“¢ ${path.basename(__filename)}:`); + + // Get PluginRepo + const {pluginRepo} = await findPluginRepo(hre); + if (pluginRepo === null) { + throw `PluginRepo '${pluginEnsDomain(hre)}' does not exist yet.`; } - const implementationAddress = await PluginSetup__factory.connect( - setup.address, - deployer - ).implementation(); + const pastVersions = await getPastVersionCreatedEvents(pluginRepo); - console.log( - `Published ${PLUGIN_SETUP_CONTRACT_NAME} at ${setup.address} in PluginRepo ${PLUGIN_REPO_ENS_NAME} at ${pluginRepo.address} at block ${blockNumberOfPublication}.` + // Check if the version was published already + const filteredLogs = pastVersions.filter( + items => + items.event.args.release === VERSION.release && + items.event.args.build === VERSION.build ); - addCreatedVersion( - network.name, - {release: VERSION.release, build: version.tag.build}, - {release: releaseMetadataURI, build: buildMetadataURI}, - blockNumberOfPublication, - { - name: PLUGIN_SETUP_CONTRACT_NAME, - address: setup.address, - args: [], - blockNumberOfDeployment: setup.receipt.blockNumber, - }, - { - name: PLUGIN_CONTRACT_NAME, - address: implementationAddress, - args: [], - blockNumberOfDeployment: setup.receipt.blockNumber, - }, - [] - ); -}; + if (filteredLogs.length !== 0) { + console.log( + `Build number ${VERSION.build} has already been published for release ${VERSION.release}. Skipping publication...` + ); + return true; + } -export default func; -func.tags = [PLUGIN_SETUP_CONTRACT_NAME, 'Publication']; + return false; +}; diff --git a/packages/contracts/deploy/30_upgrade_repo/31_upgrade_repo.ts b/packages/contracts/deploy/30_upgrade_repo/31_upgrade_repo.ts new file mode 100644 index 00000000..a6d47f77 --- /dev/null +++ b/packages/contracts/deploy/30_upgrade_repo/31_upgrade_repo.ts @@ -0,0 +1,146 @@ +import {findPluginRepo, getProductionNetworkName} from '../../utils/helpers'; +import { + getLatestNetworkDeployment, + getNetworkNameByAlias, +} from '@aragon/osx-commons-configs'; +import {PLUGIN_REPO_PERMISSIONS} from '@aragon/osx-commons-sdk'; +import {PluginRepo__factory} from '@aragon/osx-ethers'; +import {BytesLike} from 'ethers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import path from 'path'; + +type SemVer = [number, number, number]; + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const [deployer] = await hre.ethers.getSigners(); + const productionNetworkName: string = getProductionNetworkName(hre); + + // Get PluginRepo + const {pluginRepo, ensDomain} = await findPluginRepo(hre); + if (pluginRepo === null) { + throw `PluginRepo '${ensDomain}' does not exist yet.`; + } + + console.log( + `Upgrading plugin repo '${ensDomain}' (${pluginRepo.address})...` + ); + + // Get the latest `PluginRepo` implementation as the upgrade target + const latestPluginRepoImplementation = PluginRepo__factory.connect( + getLatestNetworkDeployment(getNetworkNameByAlias(productionNetworkName)!)! + .PluginRepoBase.address, + deployer + ); + + // Get the current OSX protocol version from the current plugin repo implementation + let current: SemVer; + try { + current = await pluginRepo.protocolVersion(); + } catch { + current = [1, 0, 0]; + } + + // Get the OSX protocol version from the latest plugin repo implementation + const latest: SemVer = await latestPluginRepoImplementation.protocolVersion(); + + console.log( + `Upgrading from current protocol version v${current[0]}.${current[1]}.${current[2]} to the latest version v${latest[0]}.${latest[1]}.${latest[2]}.` + ); + + // NOTE: The following code can be uncommented and `initData` can be filled + // with arguments in case re-initialization of the `PluginRepo` should become necessary. + // Re-initialization will happen through a call to `function initializeFrom(uint8[3] calldata _previousProtocolVersion, bytes calldata _initData)` + // that Aragon might add to the `PluginRepo` contract once it's required. + /* + // Define the `initData` arguments that + const initData: BytesLike[] = []; + // Encode the call to `function initializeFrom(uint8[3] calldata _previousProtocolVersion, bytes calldata _initData)` with `initData` + const initializeFromCalldata = + newPluginRepoImplementation.interface.encodeFunctionData('initializeFrom', [ + current, + initData, + ]); + */ + const initializeFromCalldata: BytesLike = []; + + // Check if deployer has the permission to upgrade the plugin repo + if ( + await pluginRepo.isGranted( + pluginRepo.address, + deployer.address, + PLUGIN_REPO_PERMISSIONS.UPGRADE_REPO_PERMISSION_ID, + [] + ) + ) { + // Use `upgradeToAndCall` if the new implementation must be re-initialized by calling + // on the `PluginRepo` proxy. If not, we use `upgradeTo`. + if (initializeFromCalldata.length > 0) { + await pluginRepo.upgradeToAndCall( + latestPluginRepoImplementation.address, + initializeFromCalldata + ); + } else { + await pluginRepo.upgradeTo(latestPluginRepoImplementation.address); + } + } else { + throw Error( + `The new version cannot be published because the deployer ('${deployer.address}') + is lacking the ${PLUGIN_REPO_PERMISSIONS.UPGRADE_REPO_PERMISSION_ID} permission.` + ); + } +}; +export default func; +func.tags = ['UpgradeRepo']; + +/** + * Skips the plugin repo upgrade if exists in the plugin repo. + * @param {HardhatRuntimeEnvironment} hre + */ +func.skip = async (hre: HardhatRuntimeEnvironment) => { + console.log(`\nšŸ—ļø ${path.basename(__filename)}:`); + + const [deployer] = await hre.ethers.getSigners(); + const productionNetworkName: string = getProductionNetworkName(hre); + + // Get the latest `PluginRepo` implementation as the upgrade target + const latestPluginRepoImplementation = PluginRepo__factory.connect( + getLatestNetworkDeployment(getNetworkNameByAlias(productionNetworkName)!)! + .PluginRepoBase.address, + deployer + ); + + const {pluginRepo, ensDomain} = await findPluginRepo(hre); + if (pluginRepo === null) { + throw `PluginRepo '${ensDomain}' does not exist yet.`; + } + + // Compare the current protocol version of the `PluginRepo` + let current: SemVer; + try { + current = await pluginRepo.protocolVersion(); + } catch { + current = [1, 0, 0]; + } + const target: SemVer = await latestPluginRepoImplementation.protocolVersion(); + + // Throw an error if attempting to upgrade to an earlier version + if ( + current[0] > target[0] || + current[1] > target[1] || + current[2] > target[2] + ) { + throw `The plugin repo, currently at 'v${current[0]}.${current[1]}.${current[2]}' cannot be upgraded to the earlier version v${target[0]}.${target[1]}.${target[2]}.`; + } + + // Skip if versions are equal + if (JSON.stringify(current) == JSON.stringify(target)) { + console.log( + `PluginRepo '${ensDomain}' (${pluginRepo.address}) has already been upgraded to + the current protocol version v${target[0]}.${target[1]}.${target[2]}. Skipping upgrade...` + ); + return true; + } + + return false; +}; diff --git a/packages/contracts/deploy/40_conclude/41_conclude.ts b/packages/contracts/deploy/40_conclude/41_conclude.ts new file mode 100644 index 00000000..938b59c3 --- /dev/null +++ b/packages/contracts/deploy/40_conclude/41_conclude.ts @@ -0,0 +1,25 @@ +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import path from 'path'; + +/** + * Prints the final deployer wallet balance. + * @param {HardhatRuntimeEnvironment} hre + */ +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + console.log(`\nāœ… ${path.basename(__filename)}:`); + + const [deployer] = await hre.ethers.getSigners(); + + console.log( + `The balance of account '${ + deployer.address + }' is now ${hre.ethers.utils.formatEther(await deployer.getBalance())}.` + ); + + console.log(`\nDone! šŸŽ‰ \n`); + console.log(`${'-'.repeat(60)}\n`); +}; + +export default func; +func.tags = ['Info', 'CreateRepo', 'NewVersion', 'UpgradeRepo']; diff --git a/packages/contracts/deploy/99_verification/10_verify-contracts.ts b/packages/contracts/deploy/99_verification/10_verify-contracts.ts index cd90c057..e46c331e 100644 --- a/packages/contracts/deploy/99_verification/10_verify-contracts.ts +++ b/packages/contracts/deploy/99_verification/10_verify-contracts.ts @@ -1,38 +1,50 @@ import {verifyContract} from '../../utils/etherscan'; +import {isLocal} from '../../utils/helpers'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import path from 'path'; -function delay(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)); -} - +/** + * Verifies the deployed contracts on the network's block explorer. + * @param {HardhatRuntimeEnvironment} hre + */ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { - console.log('\nVerifying contracts'); - - for (let index = 0; index < hre.aragonToVerifyContracts.length; index++) { - const element = hre.aragonToVerifyContracts[index]; - + hre.aragonToVerifyContracts.forEach(async contract => { console.log( - `Verifying address ${element.address} with constructor argument ${element.args}.` + `Verifying address ${contract.address} with constructor argument ${contract.args}.` ); - await verifyContract(element.address, element.args || []); + await verifyContract(contract.address, contract.args || []); // Etherscan Max rate limit is 1/5s, - // use 6s just to be safe. + // Wait 6s just to be safe. console.log( - `Delaying 6s, so we dont reach Etherscan's Max rate limit of 1/5s.` + `Delaying 6s, so we don't reach Etherscan's Max rate limit of 1/5s.` ); - await delay(6000); - } + await new Promise(resolve => setTimeout(resolve, 6000)); + }); + + console.log(`\n${'-'.repeat(60)}\n`); }; export default func; func.tags = ['Verification']; func.runAtTheEnd = true; -func.skip = (hre: HardhatRuntimeEnvironment) => - Promise.resolve( - hre.network.name === 'localhost' || - hre.network.name === 'hardhat' || - hre.network.name === 'coverage' - ); + +/** + * Skips verification for local networks. + * @param {HardhatRuntimeEnvironment} hre + */ +func.skip = async (hre: HardhatRuntimeEnvironment) => { + console.log(`\nšŸ“‹ ${path.basename(__filename)}:`); + + if (isLocal(hre)) { + console.log( + `Skipping verification for local network ${hre.network.name}...` + ); + return true; + } else { + console.log(`Starting verification on network ${hre.network.name}...`); + return false; + } +}; diff --git a/packages/contracts/deployments/baseGoerli/.chainId b/packages/contracts/deployments/baseGoerli/.chainId deleted file mode 100644 index 9b24bf02..00000000 --- a/packages/contracts/deployments/baseGoerli/.chainId +++ /dev/null @@ -1 +0,0 @@ -84531 \ No newline at end of file diff --git a/packages/contracts/deployments/baseGoerli/MyPluginSetup.json b/packages/contracts/deployments/baseGoerli/MyPluginSetup.json deleted file mode 100644 index a96a2232..00000000 --- a/packages/contracts/deployments/baseGoerli/MyPluginSetup.json +++ /dev/null @@ -1,380 +0,0 @@ -{ - "address": "0x604570fA0f83785ea925575d165725170eC316Cc", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_dao", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "prepareInstallation", - "outputs": [ - { - "internalType": "address", - "name": "plugin", - "type": "address" - }, - { - "components": [ - { - "internalType": "address[]", - "name": "helpers", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "enum PermissionLib.Operation", - "name": "operation", - "type": "uint8" - }, - { - "internalType": "address", - "name": "where", - "type": "address" - }, - { - "internalType": "address", - "name": "who", - "type": "address" - }, - { - "internalType": "address", - "name": "condition", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "permissionId", - "type": "bytes32" - } - ], - "internalType": "struct PermissionLib.MultiTargetPermission[]", - "name": "permissions", - "type": "tuple[]" - } - ], - "internalType": "struct IPluginSetup.PreparedSetupData", - "name": "preparedSetupData", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_dao", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "plugin", - "type": "address" - }, - { - "internalType": "address[]", - "name": "currentHelpers", - "type": "address[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct IPluginSetup.SetupPayload", - "name": "_payload", - "type": "tuple" - } - ], - "name": "prepareUninstallation", - "outputs": [ - { - "components": [ - { - "internalType": "enum PermissionLib.Operation", - "name": "operation", - "type": "uint8" - }, - { - "internalType": "address", - "name": "where", - "type": "address" - }, - { - "internalType": "address", - "name": "who", - "type": "address" - }, - { - "internalType": "address", - "name": "condition", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "permissionId", - "type": "bytes32" - } - ], - "internalType": "struct PermissionLib.MultiTargetPermission[]", - "name": "permissions", - "type": "tuple[]" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_dao", - "type": "address" - }, - { - "internalType": "uint16", - "name": "_currentBuild", - "type": "uint16" - }, - { - "components": [ - { - "internalType": "address", - "name": "plugin", - "type": "address" - }, - { - "internalType": "address[]", - "name": "currentHelpers", - "type": "address[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct IPluginSetup.SetupPayload", - "name": "_payload", - "type": "tuple" - } - ], - "name": "prepareUpdate", - "outputs": [ - { - "internalType": "bytes", - "name": "initData", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "address[]", - "name": "helpers", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "enum PermissionLib.Operation", - "name": "operation", - "type": "uint8" - }, - { - "internalType": "address", - "name": "where", - "type": "address" - }, - { - "internalType": "address", - "name": "who", - "type": "address" - }, - { - "internalType": "address", - "name": "condition", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "permissionId", - "type": "bytes32" - } - ], - "internalType": "struct PermissionLib.MultiTargetPermission[]", - "name": "permissions", - "type": "tuple[]" - } - ], - "internalType": "struct IPluginSetup.PreparedSetupData", - "name": "preparedSetupData", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "_interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x8895107db0d07e49b29e8bbf380f18c9a1e4bd7b5c43fb95d59b988e876f3af6", - "receipt": { - "to": null, - "from": "0xbeC907C237c5d27c7D4cB37b2c17CBB227B5f335", - "contractAddress": "0x604570fA0f83785ea925575d165725170eC316Cc", - "transactionIndex": 2, - "gasUsed": "1975545", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000010000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000", - "blockHash": "0x805302f77a0f9cf3d6185331e2f7137daf8f4dc1d4046efcdfe3568def32ce2a", - "transactionHash": "0x8895107db0d07e49b29e8bbf380f18c9a1e4bd7b5c43fb95d59b988e876f3af6", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 7850358, - "transactionHash": "0x8895107db0d07e49b29e8bbf380f18c9a1e4bd7b5c43fb95d59b988e876f3af6", - "address": "0x634a771777b306ba1B5F4ec85853b997d2Bf6827", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 0, - "blockHash": "0x805302f77a0f9cf3d6185331e2f7137daf8f4dc1d4046efcdfe3568def32ce2a" - } - ], - "blockNumber": 7850358, - "cumulativeGasUsed": "2046998", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "7d813fbc2dcf1a124495d2a664e7af9b", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"prepareInstallation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"helpers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"struct IPluginSetup.PreparedSetupData\",\"name\":\"preparedSetupData\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"currentHelpers\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IPluginSetup.SetupPayload\",\"name\":\"_payload\",\"type\":\"tuple\"}],\"name\":\"prepareUninstallation\",\"outputs\":[{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_currentBuild\",\"type\":\"uint16\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"currentHelpers\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IPluginSetup.SetupPayload\",\"name\":\"_payload\",\"type\":\"tuple\"}],\"name\":\"prepareUpdate\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"initData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"helpers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"struct IPluginSetup.PreparedSetupData\",\"name\":\"preparedSetupData\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"_interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Release 1, Build 1\",\"kind\":\"dev\",\"methods\":{\"implementation()\":{\"details\":\"The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\",\"returns\":{\"_0\":\"The address of the plugin implementation contract.\"}},\"prepareInstallation(address,bytes)\":{\"params\":{\"_dao\":\"The address of the installing DAO.\",\"_data\":\"The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\"},\"returns\":{\"plugin\":\"The address of the `Plugin` contract being prepared for installation.\",\"preparedSetupData\":\"The deployed plugin's relevant data which consists of helpers and permissions.\"}},\"prepareUninstallation(address,(address,address[],bytes))\":{\"params\":{\"_dao\":\"The address of the uninstalling DAO.\",\"_payload\":\"The relevant data necessary for the `prepareUninstallation`. See above.\"},\"returns\":{\"permissions\":\"The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\"}},\"prepareUpdate(address,uint16,(address,address[],bytes))\":{\"params\":{\"_currentBuild\":\"The build number of the plugin to update from.\",\"_dao\":\"The address of the updating DAO.\",\"_payload\":\"The relevant data necessary for the `prepareUpdate`. See above.\"},\"returns\":{\"initData\":\"The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\",\"preparedSetupData\":\"The deployed plugin's relevant data which consists of helpers and permissions.\"}},\"supportsInterface(bytes4)\":{\"params\":{\"_interfaceId\":\"The ID of the interface.\"},\"returns\":{\"_0\":\"Returns `true` if the interface is supported.\"}}},\"title\":\"MyPluginSetup\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"implementation()\":{\"notice\":\"Returns the plugin implementation address.\"},\"prepareInstallation(address,bytes)\":{\"notice\":\"Prepares the installation of a plugin.\"},\"prepareUninstallation(address,(address,address[],bytes))\":{\"notice\":\"Prepares the uninstallation of a plugin.\"},\"prepareUpdate(address,uint16,(address,address[],bytes))\":{\"notice\":\"Prepares the update of a plugin.\"},\"supportsInterface(bytes4)\":{\"notice\":\"Checks if this or the parent contract supports an interface by its ID.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/MyPluginSetup.sol\":\"MyPluginSetup\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"@aragon/osx/core/dao/IDAO.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IDAO\\n/// @author Aragon Association - 2022-2023\\n/// @notice The interface required for DAOs within the Aragon App DAO framework.\\ninterface IDAO {\\n /// @notice The action struct to be consumed by the DAO's `execute` function resulting in an external call.\\n /// @param to The address to call.\\n /// @param value The native token value to be sent with the call.\\n /// @param data The bytes-encoded function selector and calldata for the call.\\n struct Action {\\n address to;\\n uint256 value;\\n bytes data;\\n }\\n\\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\\n /// @param _where The address of the contract.\\n /// @param _who The address of a EOA or contract to give the permissions.\\n /// @param _permissionId The permission identifier.\\n /// @param _data The optional data passed to the `PermissionCondition` registered.\\n /// @return Returns true if the address has permission, false if not.\\n function hasPermission(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) external view returns (bool);\\n\\n /// @notice Updates the DAO metadata (e.g., an IPFS hash).\\n /// @param _metadata The IPFS hash of the new metadata object.\\n function setMetadata(bytes calldata _metadata) external;\\n\\n /// @notice Emitted when the DAO metadata is updated.\\n /// @param metadata The IPFS hash of the new metadata object.\\n event MetadataSet(bytes metadata);\\n\\n /// @notice Executes a list of actions. If a zero allow-failure map is provided, a failing action reverts the entire execution. If a non-zero allow-failure map is provided, allowed actions can fail without the entire call being reverted.\\n /// @param _callId The ID of the call. The definition of the value of `callId` is up to the calling contract and can be used, e.g., as a nonce.\\n /// @param _actions The array of actions.\\n /// @param _allowFailureMap A bitmap allowing execution to succeed, even if individual actions might revert. If the bit at index `i` is 1, the execution succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\\n /// @return The array of results obtained from the executed actions in `bytes`.\\n /// @return The resulting failure map containing the actions have actually failed.\\n function execute(\\n bytes32 _callId,\\n Action[] memory _actions,\\n uint256 _allowFailureMap\\n ) external returns (bytes[] memory, uint256);\\n\\n /// @notice Emitted when a proposal is executed.\\n /// @param actor The address of the caller.\\n /// @param callId The ID of the call.\\n /// @param actions The array of actions executed.\\n /// @param allowFailureMap The allow failure map encoding which actions are allowed to fail.\\n /// @param failureMap The failure map encoding which actions have failed.\\n /// @param execResults The array with the results of the executed actions.\\n /// @dev The value of `callId` is defined by the component/contract calling the execute function. A `Plugin` implementation can use it, for example, as a nonce.\\n event Executed(\\n address indexed actor,\\n bytes32 callId,\\n Action[] actions,\\n uint256 allowFailureMap,\\n uint256 failureMap,\\n bytes[] execResults\\n );\\n\\n /// @notice Emitted when a standard callback is registered.\\n /// @param interfaceId The ID of the interface.\\n /// @param callbackSelector The selector of the callback function.\\n /// @param magicNumber The magic number to be registered for the callback function selector.\\n event StandardCallbackRegistered(\\n bytes4 interfaceId,\\n bytes4 callbackSelector,\\n bytes4 magicNumber\\n );\\n\\n /// @notice Deposits (native) tokens to the DAO contract with a reference string.\\n /// @param _token The address of the token or address(0) in case of the native token.\\n /// @param _amount The amount of tokens to deposit.\\n /// @param _reference The reference describing the deposit reason.\\n function deposit(address _token, uint256 _amount, string calldata _reference) external payable;\\n\\n /// @notice Emitted when a token deposit has been made to the DAO.\\n /// @param sender The address of the sender.\\n /// @param token The address of the deposited token.\\n /// @param amount The amount of tokens deposited.\\n /// @param _reference The reference describing the deposit reason.\\n event Deposited(\\n address indexed sender,\\n address indexed token,\\n uint256 amount,\\n string _reference\\n );\\n\\n /// @notice Emitted when a native token deposit has been made to the DAO.\\n /// @dev This event is intended to be emitted in the `receive` function and is therefore bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\\n /// @param sender The address of the sender.\\n /// @param amount The amount of native tokens deposited.\\n event NativeTokenDeposited(address sender, uint256 amount);\\n\\n /// @notice Setter for the trusted forwarder verifying the meta transaction.\\n /// @param _trustedForwarder The trusted forwarder address.\\n function setTrustedForwarder(address _trustedForwarder) external;\\n\\n /// @notice Getter for the trusted forwarder verifying the meta transaction.\\n /// @return The trusted forwarder address.\\n function getTrustedForwarder() external view returns (address);\\n\\n /// @notice Emitted when a new TrustedForwarder is set on the DAO.\\n /// @param forwarder the new forwarder address.\\n event TrustedForwarderSet(address forwarder);\\n\\n /// @notice Setter for the [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @param _signatureValidator The address of the signature validator.\\n function setSignatureValidator(address _signatureValidator) external;\\n\\n /// @notice Emitted when the signature validator address is updated.\\n /// @param signatureValidator The address of the signature validator.\\n event SignatureValidatorSet(address signatureValidator);\\n\\n /// @notice Checks whether a signature is valid for the provided hash by forwarding the call to the set [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @param _hash The hash of the data to be signed.\\n /// @param _signature The signature byte array associated with `_hash`.\\n /// @return Returns the `bytes4` magic value `0x1626ba7e` if the signature is valid.\\n function isValidSignature(bytes32 _hash, bytes memory _signature) external returns (bytes4);\\n\\n /// @notice Registers an ERC standard having a callback by registering its [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID and callback function signature.\\n /// @param _interfaceId The ID of the interface.\\n /// @param _callbackSelector The selector of the callback function.\\n /// @param _magicNumber The magic number to be registered for the function signature.\\n function registerStandardCallback(\\n bytes4 _interfaceId,\\n bytes4 _callbackSelector,\\n bytes4 _magicNumber\\n ) external;\\n}\\n\",\"keccak256\":\"0x3876d62c73312234c1e2ab4e75cdac2783a6688c3445a67a15b767cd98e01f80\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/PermissionLib.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title PermissionLib\\n/// @author Aragon Association - 2021-2023\\n/// @notice A library containing objects for permission processing.\\nlibrary PermissionLib {\\n /// @notice A constant expressing that no condition is applied to a permission.\\n address public constant NO_CONDITION = address(0);\\n\\n /// @notice The types of permission operations available in the `PermissionManager`.\\n /// @param Grant The grant operation setting a permission without a condition.\\n /// @param Revoke The revoke operation removing a permission (that was granted with or without a condition).\\n /// @param GrantWithCondition The grant operation setting a permission with a condition.\\n enum Operation {\\n Grant,\\n Revoke,\\n GrantWithCondition\\n }\\n\\n /// @notice A struct containing the information for a permission to be applied on a single target contract without a condition.\\n /// @param operation The permission operation type.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param permissionId The permission identifier.\\n struct SingleTargetPermission {\\n Operation operation;\\n address who;\\n bytes32 permissionId;\\n }\\n\\n /// @notice A struct containing the information for a permission to be applied on multiple target contracts, optionally, with a condition.\\n /// @param operation The permission operation type.\\n /// @param where The address of the target contract for which `who` receives permission.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\\n /// @param permissionId The permission identifier.\\n struct MultiTargetPermission {\\n Operation operation;\\n address where;\\n address who;\\n address condition;\\n bytes32 permissionId;\\n }\\n}\\n\",\"keccak256\":\"0x9b27fa8990e0f1623055187b8ade9363a6c8a1f15aab900e3a6e5cb312545c02\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/IPlugin.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IPlugin\\n/// @author Aragon Association - 2022-2023\\n/// @notice An interface defining the traits of a plugin.\\ninterface IPlugin {\\n enum PluginType {\\n UUPS,\\n Cloneable,\\n Constructable\\n }\\n\\n /// @notice Returns the plugin's type\\n function pluginType() external view returns (PluginType);\\n}\\n\",\"keccak256\":\"0xcdb72c04ca35478e4d786fbbe12cf0e6de7d76aa0510028432312697f42c7355\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {UUPSUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport {IERC1822ProxiableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"../dao/IDAO.sol\\\";\\nimport {DaoAuthorizableUpgradeable} from \\\"./dao-authorizable/DaoAuthorizableUpgradeable.sol\\\";\\nimport {IPlugin} from \\\"./IPlugin.sol\\\";\\n\\n/// @title PluginUUPSUpgradeable\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract, upgradeable contract to inherit from when creating a plugin being deployed via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\nabstract contract PluginUUPSUpgradeable is\\n IPlugin,\\n ERC165Upgradeable,\\n UUPSUpgradeable,\\n DaoAuthorizableUpgradeable\\n{\\n // NOTE: When adding new state variables to the contract, the size of `_gap` has to be adapted below as well.\\n\\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @inheritdoc IPlugin\\n function pluginType() public pure override returns (PluginType) {\\n return PluginType.UUPS;\\n }\\n\\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\\n bytes32 public constant UPGRADE_PLUGIN_PERMISSION_ID = keccak256(\\\"UPGRADE_PLUGIN_PERMISSION\\\");\\n\\n /// @notice Initializes the plugin by storing the associated DAO.\\n /// @param _dao The DAO contract.\\n function __PluginUUPSUpgradeable_init(IDAO _dao) internal virtual onlyInitializing {\\n __DaoAuthorizableUpgradeable_init(_dao);\\n }\\n\\n /// @notice Checks if an interface is supported by this or its parent contract.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPlugin).interfaceId ||\\n _interfaceId == type(IERC1822ProxiableUpgradeable).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @notice Returns the address of the implementation contract in the [proxy storage slot](https://eips.ethereum.org/EIPS/eip-1967) slot the [UUPS proxy](https://eips.ethereum.org/EIPS/eip-1822) is pointing to.\\n /// @return The address of the implementation contract.\\n function implementation() public view returns (address) {\\n return _getImplementation();\\n }\\n\\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n /// @dev The caller must have the `UPGRADE_PLUGIN_PERMISSION_ID` permission.\\n function _authorizeUpgrade(\\n address\\n ) internal virtual override auth(UPGRADE_PLUGIN_PERMISSION_ID) {}\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5b12df9d646c59629dbaeb0a70df476a867a82887f5ef7d8b35697c01fcb45f3\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ContextUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"../../dao/IDAO.sol\\\";\\nimport {_auth} from \\\"../../utils/auth.sol\\\";\\n\\n/// @title DaoAuthorizableUpgradeable\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract contract providing a meta-transaction compatible modifier for upgradeable or cloneable contracts to authorize function calls through an associated DAO.\\n/// @dev Make sure to call `__DaoAuthorizableUpgradeable_init` during initialization of the inheriting contract.\\nabstract contract DaoAuthorizableUpgradeable is ContextUpgradeable {\\n /// @notice The associated DAO managing the permissions of inheriting contracts.\\n IDAO private dao_;\\n\\n /// @notice Initializes the contract by setting the associated DAO.\\n /// @param _dao The associated DAO address.\\n function __DaoAuthorizableUpgradeable_init(IDAO _dao) internal onlyInitializing {\\n dao_ = _dao;\\n }\\n\\n /// @notice Returns the DAO contract.\\n /// @return The DAO contract.\\n function dao() public view returns (IDAO) {\\n return dao_;\\n }\\n\\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through the associated DAO's permission manager.\\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\\n modifier auth(bytes32 _permissionId) {\\n _auth(dao_, address(this), _msgSender(), _permissionId, _msgData());\\n _;\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xd21dcde806070ad8f62acc81d986e517edb5a60ebdff8419660763018f7895e8\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/utils/auth.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {IDAO} from \\\"../dao/IDAO.sol\\\";\\n\\n/// @notice Thrown if a call is unauthorized in the associated DAO.\\n/// @param dao The associated DAO.\\n/// @param where The context in which the authorization reverted.\\n/// @param who The address (EOA or contract) missing the permission.\\n/// @param permissionId The permission identifier.\\nerror DaoUnauthorized(address dao, address where, address who, bytes32 permissionId);\\n\\n/// @notice A free function checking if a caller is granted permissions on a target contract via a permission identifier that redirects the approval to a `PermissionCondition` if this was specified in the setup.\\n/// @param _where The address of the target contract for which `who` receives permission.\\n/// @param _who The address (EOA or contract) owning the permission.\\n/// @param _permissionId The permission identifier.\\n/// @param _data The optional data passed to the `PermissionCondition` registered.\\nfunction _auth(\\n IDAO _dao,\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes calldata _data\\n) view {\\n if (!_dao.hasPermission(_where, _who, _permissionId, _data))\\n revert DaoUnauthorized({\\n dao: address(_dao),\\n where: _where,\\n who: _who,\\n permissionId: _permissionId\\n });\\n}\\n\",\"keccak256\":\"0x1c9cf22583c8b5a08c6d2c02a68d9f05e58900a9bb27efa3b30abca2ecfabfe4\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/framework/plugin/setup/IPluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {PermissionLib} from \\\"../../../core/permission/PermissionLib.sol\\\";\\nimport {IDAO} from \\\"../../../core/dao/IDAO.sol\\\";\\n\\n/// @title IPluginSetup\\n/// @author Aragon Association - 2022-2023\\n/// @notice The interface required for a plugin setup contract to be consumed by the `PluginSetupProcessor` for plugin installations, updates, and uninstallations.\\ninterface IPluginSetup {\\n /// @notice The data associated with a prepared setup.\\n /// @param helpers The address array of helpers (contracts or EOAs) associated with this plugin version after the installation or update.\\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the installing or updating DAO.\\n struct PreparedSetupData {\\n address[] helpers;\\n PermissionLib.MultiTargetPermission[] permissions;\\n }\\n\\n /// @notice The payload for plugin updates and uninstallations containing the existing contracts as well as optional data to be consumed by the plugin setup.\\n /// @param plugin The address of the `Plugin`.\\n /// @param currentHelpers The address array of all current helpers (contracts or EOAs) associated with the plugin to update from.\\n /// @param data The bytes-encoded data containing the input parameters for the preparation of update/uninstall as specified in the corresponding ABI on the version's metadata.\\n struct SetupPayload {\\n address plugin;\\n address[] currentHelpers;\\n bytes data;\\n }\\n\\n /// @notice Prepares the installation of a plugin.\\n /// @param _dao The address of the installing DAO.\\n /// @param _data The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\\n /// @return plugin The address of the `Plugin` contract being prepared for installation.\\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\\n function prepareInstallation(\\n address _dao,\\n bytes calldata _data\\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData);\\n\\n /// @notice Prepares the update of a plugin.\\n /// @param _dao The address of the updating DAO.\\n /// @param _currentBuild The build number of the plugin to update from.\\n /// @param _payload The relevant data necessary for the `prepareUpdate`. See above.\\n /// @return initData The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\\n function prepareUpdate(\\n address _dao,\\n uint16 _currentBuild,\\n SetupPayload calldata _payload\\n ) external returns (bytes memory initData, PreparedSetupData memory preparedSetupData);\\n\\n /// @notice Prepares the uninstallation of a plugin.\\n /// @param _dao The address of the uninstalling DAO.\\n /// @param _payload The relevant data necessary for the `prepareUninstallation`. See above.\\n /// @return permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\\n function prepareUninstallation(\\n address _dao,\\n SetupPayload calldata _payload\\n ) external returns (PermissionLib.MultiTargetPermission[] memory permissions);\\n\\n /// @notice Returns the plugin implementation address.\\n /// @return The address of the plugin implementation contract.\\n /// @dev The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x81d1e60154e672372318f6fccf337b6094bb8fe1192e2f755b8cc0d645ff5332\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/framework/plugin/setup/PluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ERC165} from \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {ERC165Checker} from \\\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\\\";\\nimport {Clones} from \\\"@openzeppelin/contracts/proxy/Clones.sol\\\";\\n\\nimport {PermissionLib} from \\\"../../../core/permission/PermissionLib.sol\\\";\\nimport {createERC1967Proxy as createERC1967} from \\\"../../../utils/Proxy.sol\\\";\\nimport {IPluginSetup} from \\\"./IPluginSetup.sol\\\";\\n\\n/// @title PluginSetup\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract contract that developers have to inherit from to write the setup of a plugin.\\nabstract contract PluginSetup is ERC165, IPluginSetup {\\n /// @inheritdoc IPluginSetup\\n function prepareUpdate(\\n address _dao,\\n uint16 _currentBuild,\\n SetupPayload calldata _payload\\n )\\n external\\n virtual\\n override\\n returns (bytes memory initData, PreparedSetupData memory preparedSetupData)\\n {}\\n\\n /// @notice A convenience function to create an [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract pointing to an implementation and being associated to a DAO.\\n /// @param _implementation The address of the implementation contract to which the proxy is pointing to.\\n /// @param _data The data to initialize the storage of the proxy contract.\\n /// @return The address of the created proxy contract.\\n function createERC1967Proxy(\\n address _implementation,\\n bytes memory _data\\n ) internal returns (address) {\\n return createERC1967(_implementation, _data);\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPluginSetup).interfaceId || super.supportsInterface(_interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x04ff3ec8a5b121ef3972dbb8140b7cf313f9ed514f8471841e3dcf5304ef6950\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/// @notice Free function to create a [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract based on the passed base contract address.\\n/// @param _logic The base contract address.\\n/// @param _data The constructor arguments for this contract.\\n/// @return The address of the proxy contract created.\\n/// @dev Initializes the upgradeable proxy with an initial implementation specified by _logic. If _data is non-empty, it\\u2019s used as data in a delegate call to _logic. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor (see [OpenZeppelin ERC1967Proxy-constructor](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Proxy-constructor-address-bytes-)).\\nfunction createERC1967Proxy(address _logic, bytes memory _data) returns (address) {\\n return address(new ERC1967Proxy(_logic, _data));\\n}\\n\",\"keccak256\":\"0x9d871292dfac2f42957e4d10eec56fd74dda0bd7803c01e849d2e9f5e2799fff\",\"license\":\"AGPL-3.0-or-later\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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.8.3._\\n */\\ninterface IERC1967Upgradeable {\\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\",\"keccak256\":\"0x47d6e06872b12e72c79d1b5eb55842f860b5fb1207b2317c2358d2766b950a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.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 IERC1822ProxiableUpgradeable {\\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\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC1967Upgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n AddressUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) 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 (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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(address newBeacon, bytes memory data, bool forceCall) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x584ebdf9c1118a7c773f98788e3f3ede01982bdf8932aa06f5acc7d54876e161\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.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 IBeaconUpgradeable {\\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\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\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. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n *\\n * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\\n */\\n function upgradeTo(address newImplementation) public virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n *\\n * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xb607cb94c27e89750f5ae2ccebcb94e654e926f6125f4fd4c6262c89875118ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\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 ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\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 /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\n */\\nlibrary StorageSlotUpgradeable {\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x07ac95acad040f1fb1f6120dd0aa5f702db69446e95f82613721879d30de0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable {\\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\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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.8.3._\\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\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Clones.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\\n * deploying minimal proxy contracts, also known as \\\"clones\\\".\\n *\\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\\n *\\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\\n * deterministic method.\\n *\\n * _Available since v3.4._\\n */\\nlibrary Clones {\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\\n *\\n * This function uses the create opcode, which should never revert.\\n */\\n function clone(address implementation) internal returns (address instance) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\\n // of the `implementation` address with the bytecode before the address.\\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\\n instance := create(0, 0x09, 0x37)\\n }\\n require(instance != address(0), \\\"ERC1167: create failed\\\");\\n }\\n\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\\n *\\n * This function uses the create2 opcode and a `salt` to deterministically deploy\\n * the clone. Using the same `implementation` and `salt` multiple time will revert, since\\n * the clones cannot be deployed twice at the same address.\\n */\\n function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\\n // of the `implementation` address with the bytecode before the address.\\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\\n instance := create2(0, 0x09, 0x37, salt)\\n }\\n require(instance != address(0), \\\"ERC1167: create2 failed\\\");\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(\\n address implementation,\\n bytes32 salt,\\n address deployer\\n ) internal pure returns (address predicted) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(add(ptr, 0x38), deployer)\\n mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\\n mstore(add(ptr, 0x14), implementation)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\\n mstore(add(ptr, 0x58), salt)\\n mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\\n predicted := keccak256(add(ptr, 0x43), 0x55)\\n }\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(\\n address implementation,\\n bytes32 salt\\n ) internal view returns (address predicted) {\\n return predictDeterministicAddress(implementation, salt, address(this));\\n }\\n}\\n\",\"keccak256\":\"0x01f055f5c26ba25d7f83e9aa9ba877fbea4d0bf22227de046ea67494bc932999\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 */\\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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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(address newBeacon, bytes memory data, bool forceCall) 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\",\"keccak256\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Library used to query support of an interface declared via {IERC165}.\\n *\\n * Note that these functions return the actual result of the query: they do not\\n * `revert` if an interface is not supported. It is up to the caller to decide\\n * what to do in these cases.\\n */\\nlibrary ERC165Checker {\\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\\n\\n /**\\n * @dev Returns true if `account` supports the {IERC165} interface.\\n */\\n function supportsERC165(address account) internal view returns (bool) {\\n // Any contract that implements ERC165 must explicitly indicate support of\\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\\n return\\n supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&\\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\\n }\\n\\n /**\\n * @dev Returns true if `account` supports the interface defined by\\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\\n // query support of both ERC165 as per the spec and support of _interfaceId\\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\\n }\\n\\n /**\\n * @dev Returns a boolean array where each value corresponds to the\\n * interfaces passed in and whether they're supported or not. This allows\\n * you to batch check interfaces for a contract where your expectation\\n * is that some interfaces may not be supported.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * _Available since v3.4._\\n */\\n function getSupportedInterfaces(\\n address account,\\n bytes4[] memory interfaceIds\\n ) internal view returns (bool[] memory) {\\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\\n\\n // query support of ERC165 itself\\n if (supportsERC165(account)) {\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\\n }\\n }\\n\\n return interfaceIdsSupported;\\n }\\n\\n /**\\n * @dev Returns true if `account` supports all the interfaces defined in\\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\\n *\\n * Batch-querying can lead to gas savings by skipping repeated checks for\\n * {IERC165} support.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\\n // query support of ERC165 itself\\n if (!supportsERC165(account)) {\\n return false;\\n }\\n\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\\n return false;\\n }\\n }\\n\\n // all interfaces supported\\n return true;\\n }\\n\\n /**\\n * @notice Query if a contract implements an interface, does not check ERC165 support\\n * @param account The address of the contract to query for support of an interface\\n * @param interfaceId The interface identifier, as specified in ERC-165\\n * @return true if the contract at account indicates support of the interface with\\n * identifier interfaceId, false otherwise\\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\\n * the behavior of this method is undefined. This precondition can be checked\\n * with {supportsERC165}.\\n *\\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\\n * should be exercised when using this function.\\n *\\n * Interface identification is specified in ERC-165.\\n */\\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\\n // prepare call\\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\\n\\n // perform static call\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly {\\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0x00)\\n }\\n\\n return success && returnSize >= 0x20 && returnValue > 0;\\n }\\n}\\n\",\"keccak256\":\"0x5a08ad61f4e82b8a3323562661a86fb10b10190848073fdc13d4ac43710ffba5\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"src/MyPlugin.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity ^0.8.8;\\n\\nimport {IDAO, PluginUUPSUpgradeable} from \\\"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\\\";\\n\\n/// @title MyPlugin\\n/// @dev Release 1, Build 1\\ncontract MyPlugin is PluginUUPSUpgradeable {\\n bytes32 public constant STORE_PERMISSION_ID = keccak256(\\\"STORE_PERMISSION\\\");\\n\\n uint256 public number; // added in build 1\\n\\n /// @notice Emitted when a number is stored.\\n /// @param number The number.\\n event NumberStored(uint256 number);\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the plugin when build 1 is installed.\\n /// @param _number The number to be stored.\\n function initialize(IDAO _dao, uint256 _number) external initializer {\\n __PluginUUPSUpgradeable_init(_dao);\\n number = _number;\\n\\n emit NumberStored({number: _number});\\n }\\n\\n /// @notice Stores a new number to storage. Caller needs STORE_PERMISSION.\\n /// @param _number The number to be stored.\\n function storeNumber(uint256 _number) external auth(STORE_PERMISSION_ID) {\\n number = _number;\\n\\n emit NumberStored({number: _number});\\n }\\n}\\n\",\"keccak256\":\"0x754cec56b491627ba8a8bcc7519a34bb40e746ece83625651e8292845e975b9d\",\"license\":\"AGPL-3.0-or-later\"},\"src/MyPluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {PermissionLib} from \\\"@aragon/osx/core/permission/PermissionLib.sol\\\";\\nimport {PluginSetup, IPluginSetup} from \\\"@aragon/osx/framework/plugin/setup/PluginSetup.sol\\\";\\nimport {MyPlugin} from \\\"./MyPlugin.sol\\\";\\n\\n/// @title MyPluginSetup\\n/// @dev Release 1, Build 1\\ncontract MyPluginSetup is PluginSetup {\\n address private immutable myPluginImplementation;\\n\\n constructor() {\\n myPluginImplementation = address(new MyPlugin());\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function prepareInstallation(\\n address _dao,\\n bytes memory _data\\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData) {\\n uint256 number = abi.decode(_data, (uint256));\\n\\n plugin = createERC1967Proxy(\\n myPluginImplementation,\\n abi.encodeWithSelector(MyPlugin.initialize.selector, _dao, number)\\n );\\n\\n PermissionLib.MultiTargetPermission[]\\n memory permissions = new PermissionLib.MultiTargetPermission[](1);\\n\\n permissions[0] = PermissionLib.MultiTargetPermission({\\n operation: PermissionLib.Operation.Grant,\\n where: plugin,\\n who: _dao,\\n condition: PermissionLib.NO_CONDITION,\\n permissionId: keccak256(\\\"STORE_PERMISSION\\\")\\n });\\n\\n preparedSetupData.permissions = permissions;\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function prepareUninstallation(\\n address _dao,\\n SetupPayload calldata _payload\\n ) external pure returns (PermissionLib.MultiTargetPermission[] memory permissions) {\\n permissions = new PermissionLib.MultiTargetPermission[](1);\\n\\n permissions[0] = PermissionLib.MultiTargetPermission({\\n operation: PermissionLib.Operation.Revoke,\\n where: _payload.plugin,\\n who: _dao,\\n condition: PermissionLib.NO_CONDITION,\\n permissionId: keccak256(\\\"STORE_PERMISSION\\\")\\n });\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function implementation() external view returns (address) {\\n return myPluginImplementation;\\n }\\n}\\n\",\"keccak256\":\"0x2e825f84bced1da3770994e4fe8da0d0d98cc8091c9302397210f71bbf681ae9\",\"license\":\"AGPL-3.0-or-later\"}},\"version\":1}", - "bytecode": "0x60a060405234801561001057600080fd5b5060405161001d9061004b565b604051809103906000f080158015610039573d6000803e3d6000fd5b506001600160a01b0316608052610058565b6112ae806110aa83390190565b6080516110316100796000396000818160ad015261033a01526110316000f3fe60806040523480156200001157600080fd5b50600436106200006f5760003560e01c80639cb0a12411620000565780639cb0a12414620000d8578063a8a9c29e14620000fe578063f10832f1146200012557600080fd5b806301ffc9a714620000745780635c60da1b14620000a0575b600080fd5b6200008b62000085366004620004b9565b6200014c565b60405190151581526020015b60405180910390f35b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016815260200162000097565b620000ef620000e93660046200051b565b62000184565b604051620000979190620005d6565b620001156200010f36600462000623565b62000274565b6040516200009792919062000772565b6200013c62000136366004620007ba565b6200029c565b6040516200009792919062000888565b60006001600160e01b0319821663099718b560e41b14806200017e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b604080516001808252818301909252606091816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816200019b5750506040805160a0810190915260018152909150602080820190620001fc90850185620008b4565b6001600160a01b03168152602001846001600160a01b0316815260200160006001600160a01b031681526020017ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981525081600081518110620002635762000263620008d2565b602002602001018190525092915050565b606062000294604051806040016040528060608152602001606081525090565b935093915050565b6000620002bc604051806040016040528060608152602001606081525090565b600083806020019051810190620002d49190620008e8565b604080516001600160a01b038816602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663cd6dc68760e01b17905290915062000360907f00000000000000000000000000000000000000000000000000000000000000009062000452565b60408051600180825281830190925291945060009190816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816200037b579050506040805160a081019091529091508060008152602001856001600160a01b03168152602001876001600160a01b0316815260200160006001600160a01b031681526020017ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981525081600081518110620004355762000435620008d2565b602002602001018190525080836020018190525050509250929050565b600062000460838362000467565b9392505050565b600082826040516200047990620004ab565b6200048692919062000902565b604051809103906000f080158015620004a3573d6000803e3d6000fd5b509392505050565b6106fe806200092783390190565b600060208284031215620004cc57600080fd5b81356001600160e01b0319811681146200046057600080fd5b80356001600160a01b0381168114620004fd57600080fd5b919050565b6000606082840312156200051557600080fd5b50919050565b600080604083850312156200052f57600080fd5b6200053a83620004e5565b9150602083013567ffffffffffffffff8111156200055757600080fd5b620005658582860162000502565b9150509250929050565b60008151600381106200059257634e487b7160e01b600052602160045260246000fd5b8352506020818101516001600160a01b0390811691840191909152604080830151821690840152606080830151909116908301526080908101519082015260a00190565b6020808252825182820181905260009190848201906040850190845b818110156200061757620006088385516200056f565b938501939250600101620005f2565b50909695505050505050565b6000806000606084860312156200063957600080fd5b6200064484620004e5565b9250602084013561ffff811681146200065c57600080fd5b9150604084013567ffffffffffffffff8111156200067957600080fd5b620006878682870162000502565b9150509250925092565b6000815180845260005b81811015620006b9576020818501810151868301820152016200069b565b506000602082860101526020601f19601f83011685010191505092915050565b805160408084528151908401819052600091602091908201906060860190845b81811015620007205783516001600160a01b031683529284019291840191600101620006f9565b50508483015186820387850152805180835290840192506000918401905b808310156200076757620007548285516200056f565b915084840193506001830192506200073e565b509695505050505050565b60408152600062000787604083018562000691565b82810360208401526200079b8185620006d9565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620007ce57600080fd5b620007d983620004e5565b9150602083013567ffffffffffffffff80821115620007f757600080fd5b818501915085601f8301126200080c57600080fd5b813581811115620008215762000821620007a4565b604051601f8201601f19908116603f011681019083821181831017156200084c576200084c620007a4565b816040528281528860208487010111156200086657600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6001600160a01b0383168152604060208201526000620008ac6040830184620006d9565b949350505050565b600060208284031215620008c757600080fd5b6200046082620004e5565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620008fb57600080fd5b5051919050565b6001600160a01b0383168152604060208201526000620008ac60408301846200069156fe60806040526040516106fe3803806106fe83398101604081905261002291610319565b61002e82826000610035565b5050610436565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106d7602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103e7565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b81526004016101489190610403565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b50506000910152565b6000806040838503121561032c57600080fd5b82516001600160a01b038116811461034357600080fd5b60208401519092506001600160401b038082111561036057600080fd5b818501915085601f83011261037457600080fd5b815181811115610386576103866102df565b604051601f8201601f19908116603f011681019083821181831017156103ae576103ae6102df565b816040528281528860208487010111156103c757600080fd5b6103d88360208301602088016102f5565b80955050505050509250929050565b600082516103f98184602087016102f5565b9190910192915050565b60208152600082518060208401526104228160408501602087016102f5565b601f01601f19169190910160400192915050565b610292806104456000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025f602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061020f565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f919061022b565b60005b838110156102065781810151838201526020016101ee565b50506000910152565b600082516102218184602087016101eb565b9190910192915050565b602081526000825180602084015261024a8160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a60a06040523060805234801561001457600080fd5b5061001d61002a565b61002561002a565b6100e9565b600054610100900460ff16156100965760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146100e7576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805161118e610120600039600081816102d70152818161036101528181610457015281816104dc01526105c6015261118e6000f3fe6080604052600436106100c75760003560e01c80635c60da1b11610074578063b63394181161004e578063b633941814610207578063c9c4bfca14610227578063cd6dc6871461025b57600080fd5b80635c60da1b146101a75780638381f58a146101bc5780639c61f97e146101d357600080fd5b806341de6830116100a557806341de6830146101555780634f1ef2861461017157806352d1902d1461018457600080fd5b806301ffc9a7146100cc5780633659cfe6146101015780634162169f14610123575b600080fd5b3480156100d857600080fd5b506100ec6100e7366004610eb5565b61027b565b60405190151581526020015b60405180910390f35b34801561010d57600080fd5b5061012161011c366004610ef4565b6102cd565b005b34801561012f57600080fd5b5060c9546001600160a01b03165b6040516001600160a01b0390911681526020016100f8565b34801561016157600080fd5b5060006040516100f89190610f11565b61012161017f366004610f4f565b61044d565b34801561019057600080fd5b506101996105b9565b6040519081526020016100f8565b3480156101b357600080fd5b5061013d61067e565b3480156101c857600080fd5b5061019961012d5481565b3480156101df57600080fd5b506101997ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981565b34801561021357600080fd5b50610121610222366004611013565b6106b6565b34801561023357600080fd5b506101997f821b6e3a557148015a918c89e5d092e878a69854a2d1a410635f771bd5a8a3f581565b34801561026757600080fd5b5061012161027636600461102c565b610731565b60006001600160e01b0319821663041de68360e41b14806102ac57506001600160e01b031982166352d1902d60e01b145b806102c757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361035f5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103ba7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146104255760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610356565b61042e8161088d565b6040805160008082526020820190925261044a918391906108c6565b50565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036104da5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610356565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166105357f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146105a05760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610356565b6105a98261088d565b6105b5828260016108c6565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106595760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610356565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b60006106b17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b60c9547ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e69906106f4906001600160a01b031630335b84600036610a66565b61012d8290556040518281527f3564ffb2fd8f93d7b0e9d1173ffdff5ee9775d860bfe82eaca0d0dbe07c8b6349060200160405180910390a15050565b600054610100900460ff16158080156107515750600054600160ff909116105b8061076b5750303b15801561076b575060005460ff166001145b6107dd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610356565b6000805460ff191660011790558015610800576000805461ff0019166101001790555b61080983610b22565b61012d8290556040518281527f3564ffb2fd8f93d7b0e9d1173ffdff5ee9775d860bfe82eaca0d0dbe07c8b6349060200160405180910390a18015610888576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60c9547f821b6e3a557148015a918c89e5d092e878a69854a2d1a410635f771bd5a8a3f5906105b5906001600160a01b031630336106eb565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156108f95761088883610b96565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610953575060408051601f3d908101601f1916820190925261095091810190611058565b60015b6109c55760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610356565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114610a5a5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610356565b50610888838383610c61565b604051637ef7c88360e11b81526001600160a01b0387169063fdef910690610a9a9088908890889088908890600401611071565b602060405180830381865afa158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb91906110c5565b610b1a57604051630cb6f8ed60e21b81526001600160a01b03808816600483015280871660248301528516604482015260648101849052608401610356565b505050505050565b600054610100900460ff16610b8d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610356565b61044a81610c8c565b6001600160a01b0381163b610c135760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610356565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610c6a83610d26565b600082511180610c775750805b1561088857610c868383610d66565b50505050565b600054610100900460ff16610cf75760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610356565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610d2f81610b96565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610d8b838360405180606001604052806027815260200161115b60279139610d92565b9392505050565b6060600080856001600160a01b031685604051610daf919061110b565b600060405180830381855af49150503d8060008114610dea576040519150601f19603f3d011682016040523d82523d6000602084013e610def565b606091505b5091509150610e0086838387610e0a565b9695505050505050565b60608315610e79578251600003610e72576001600160a01b0385163b610e725760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610356565b5081610e83565b610e838383610e8b565b949350505050565b815115610e9b5781518083602001fd5b8060405162461bcd60e51b81526004016103569190611127565b600060208284031215610ec757600080fd5b81356001600160e01b031981168114610d8b57600080fd5b6001600160a01b038116811461044a57600080fd5b600060208284031215610f0657600080fd5b8135610d8b81610edf565b6020810160038310610f3357634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610f6257600080fd5b8235610f6d81610edf565b9150602083013567ffffffffffffffff80821115610f8a57600080fd5b818501915085601f830112610f9e57600080fd5b813581811115610fb057610fb0610f39565b604051601f8201601f19908116603f01168101908382118183101715610fd857610fd8610f39565b81604052828152886020848701011115610ff157600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60006020828403121561102557600080fd5b5035919050565b6000806040838503121561103f57600080fd5b823561104a81610edf565b946020939093013593505050565b60006020828403121561106a57600080fd5b5051919050565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000602082840312156110d757600080fd5b81518015158114610d8b57600080fd5b60005b838110156111025781810151838201526020016110ea565b50506000910152565b6000825161111d8184602087016110e7565b9190910192915050565b60208152600082518060208401526111468160408501602087016110e7565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a", - "deployedBytecode": "0x60806040523480156200001157600080fd5b50600436106200006f5760003560e01c80639cb0a12411620000565780639cb0a12414620000d8578063a8a9c29e14620000fe578063f10832f1146200012557600080fd5b806301ffc9a714620000745780635c60da1b14620000a0575b600080fd5b6200008b62000085366004620004b9565b6200014c565b60405190151581526020015b60405180910390f35b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016815260200162000097565b620000ef620000e93660046200051b565b62000184565b604051620000979190620005d6565b620001156200010f36600462000623565b62000274565b6040516200009792919062000772565b6200013c62000136366004620007ba565b6200029c565b6040516200009792919062000888565b60006001600160e01b0319821663099718b560e41b14806200017e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b604080516001808252818301909252606091816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816200019b5750506040805160a0810190915260018152909150602080820190620001fc90850185620008b4565b6001600160a01b03168152602001846001600160a01b0316815260200160006001600160a01b031681526020017ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981525081600081518110620002635762000263620008d2565b602002602001018190525092915050565b606062000294604051806040016040528060608152602001606081525090565b935093915050565b6000620002bc604051806040016040528060608152602001606081525090565b600083806020019051810190620002d49190620008e8565b604080516001600160a01b038816602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663cd6dc68760e01b17905290915062000360907f00000000000000000000000000000000000000000000000000000000000000009062000452565b60408051600180825281830190925291945060009190816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816200037b579050506040805160a081019091529091508060008152602001856001600160a01b03168152602001876001600160a01b0316815260200160006001600160a01b031681526020017ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981525081600081518110620004355762000435620008d2565b602002602001018190525080836020018190525050509250929050565b600062000460838362000467565b9392505050565b600082826040516200047990620004ab565b6200048692919062000902565b604051809103906000f080158015620004a3573d6000803e3d6000fd5b509392505050565b6106fe806200092783390190565b600060208284031215620004cc57600080fd5b81356001600160e01b0319811681146200046057600080fd5b80356001600160a01b0381168114620004fd57600080fd5b919050565b6000606082840312156200051557600080fd5b50919050565b600080604083850312156200052f57600080fd5b6200053a83620004e5565b9150602083013567ffffffffffffffff8111156200055757600080fd5b620005658582860162000502565b9150509250929050565b60008151600381106200059257634e487b7160e01b600052602160045260246000fd5b8352506020818101516001600160a01b0390811691840191909152604080830151821690840152606080830151909116908301526080908101519082015260a00190565b6020808252825182820181905260009190848201906040850190845b818110156200061757620006088385516200056f565b938501939250600101620005f2565b50909695505050505050565b6000806000606084860312156200063957600080fd5b6200064484620004e5565b9250602084013561ffff811681146200065c57600080fd5b9150604084013567ffffffffffffffff8111156200067957600080fd5b620006878682870162000502565b9150509250925092565b6000815180845260005b81811015620006b9576020818501810151868301820152016200069b565b506000602082860101526020601f19601f83011685010191505092915050565b805160408084528151908401819052600091602091908201906060860190845b81811015620007205783516001600160a01b031683529284019291840191600101620006f9565b50508483015186820387850152805180835290840192506000918401905b808310156200076757620007548285516200056f565b915084840193506001830192506200073e565b509695505050505050565b60408152600062000787604083018562000691565b82810360208401526200079b8185620006d9565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620007ce57600080fd5b620007d983620004e5565b9150602083013567ffffffffffffffff80821115620007f757600080fd5b818501915085601f8301126200080c57600080fd5b813581811115620008215762000821620007a4565b604051601f8201601f19908116603f011681019083821181831017156200084c576200084c620007a4565b816040528281528860208487010111156200086657600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6001600160a01b0383168152604060208201526000620008ac6040830184620006d9565b949350505050565b600060208284031215620008c757600080fd5b6200046082620004e5565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620008fb57600080fd5b5051919050565b6001600160a01b0383168152604060208201526000620008ac60408301846200069156fe60806040526040516106fe3803806106fe83398101604081905261002291610319565b61002e82826000610035565b5050610436565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106d7602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103e7565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b81526004016101489190610403565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b50506000910152565b6000806040838503121561032c57600080fd5b82516001600160a01b038116811461034357600080fd5b60208401519092506001600160401b038082111561036057600080fd5b818501915085601f83011261037457600080fd5b815181811115610386576103866102df565b604051601f8201601f19908116603f011681019083821181831017156103ae576103ae6102df565b816040528281528860208487010111156103c757600080fd5b6103d88360208301602088016102f5565b80955050505050509250929050565b600082516103f98184602087016102f5565b9190910192915050565b60208152600082518060208401526104228160408501602087016102f5565b601f01601f19169190910160400192915050565b610292806104456000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025f602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061020f565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f919061022b565b60005b838110156102065781810151838201526020016101ee565b50506000910152565b600082516102218184602087016101eb565b9190910192915050565b602081526000825180602084015261024a8160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a", - "devdoc": { - "details": "Release 1, Build 1", - "kind": "dev", - "methods": { - "implementation()": { - "details": "The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).", - "returns": { - "_0": "The address of the plugin implementation contract." - } - }, - "prepareInstallation(address,bytes)": { - "params": { - "_dao": "The address of the installing DAO.", - "_data": "The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file." - }, - "returns": { - "plugin": "The address of the `Plugin` contract being prepared for installation.", - "preparedSetupData": "The deployed plugin's relevant data which consists of helpers and permissions." - } - }, - "prepareUninstallation(address,(address,address[],bytes))": { - "params": { - "_dao": "The address of the uninstalling DAO.", - "_payload": "The relevant data necessary for the `prepareUninstallation`. See above." - }, - "returns": { - "permissions": "The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO." - } - }, - "prepareUpdate(address,uint16,(address,address[],bytes))": { - "params": { - "_currentBuild": "The build number of the plugin to update from.", - "_dao": "The address of the updating DAO.", - "_payload": "The relevant data necessary for the `prepareUpdate`. See above." - }, - "returns": { - "initData": "The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.", - "preparedSetupData": "The deployed plugin's relevant data which consists of helpers and permissions." - } - }, - "supportsInterface(bytes4)": { - "params": { - "_interfaceId": "The ID of the interface." - }, - "returns": { - "_0": "Returns `true` if the interface is supported." - } - } - }, - "title": "MyPluginSetup", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "implementation()": { - "notice": "Returns the plugin implementation address." - }, - "prepareInstallation(address,bytes)": { - "notice": "Prepares the installation of a plugin." - }, - "prepareUninstallation(address,(address,address[],bytes))": { - "notice": "Prepares the uninstallation of a plugin." - }, - "prepareUpdate(address,uint16,(address,address[],bytes))": { - "notice": "Prepares the update of a plugin." - }, - "supportsInterface(bytes4)": { - "notice": "Checks if this or the parent contract supports an interface by its ID." - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/packages/contracts/deployments/baseGoerli/solcInputs/7d813fbc2dcf1a124495d2a664e7af9b.json b/packages/contracts/deployments/baseGoerli/solcInputs/7d813fbc2dcf1a124495d2a664e7af9b.json deleted file mode 100644 index a2a2555b..00000000 --- a/packages/contracts/deployments/baseGoerli/solcInputs/7d813fbc2dcf1a124495d2a664e7af9b.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "@aragon/osx/core/dao/DAO.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\nimport \"@openzeppelin/contracts/interfaces/IERC1271.sol\";\n\nimport {IProtocolVersion} from \"../../utils/protocol/IProtocolVersion.sol\";\nimport {ProtocolVersion} from \"../../utils/protocol/ProtocolVersion.sol\";\nimport {PermissionManager} from \"../permission/PermissionManager.sol\";\nimport {CallbackHandler} from \"../utils/CallbackHandler.sol\";\nimport {hasBit, flipBit} from \"../utils/BitMap.sol\";\nimport {IEIP4824} from \"./IEIP4824.sol\";\nimport {IDAO} from \"./IDAO.sol\";\n\n/// @title DAO\n/// @author Aragon Association - 2021-2023\n/// @notice This contract is the entry point to the Aragon DAO framework and provides our users a simple and easy to use public interface.\n/// @dev Public API of the Aragon DAO framework.\ncontract DAO is\n IEIP4824,\n Initializable,\n IERC1271,\n ERC165StorageUpgradeable,\n IDAO,\n UUPSUpgradeable,\n ProtocolVersion,\n PermissionManager,\n CallbackHandler\n{\n using SafeERC20Upgradeable for IERC20Upgradeable;\n using AddressUpgradeable for address;\n\n /// @notice The ID of the permission required to call the `execute` function.\n bytes32 public constant EXECUTE_PERMISSION_ID = keccak256(\"EXECUTE_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\n bytes32 public constant UPGRADE_DAO_PERMISSION_ID = keccak256(\"UPGRADE_DAO_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `setMetadata` function.\n bytes32 public constant SET_METADATA_PERMISSION_ID = keccak256(\"SET_METADATA_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `setTrustedForwarder` function.\n bytes32 public constant SET_TRUSTED_FORWARDER_PERMISSION_ID =\n keccak256(\"SET_TRUSTED_FORWARDER_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `setSignatureValidator` function.\n bytes32 public constant SET_SIGNATURE_VALIDATOR_PERMISSION_ID =\n keccak256(\"SET_SIGNATURE_VALIDATOR_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `registerStandardCallback` function.\n bytes32 public constant REGISTER_STANDARD_CALLBACK_PERMISSION_ID =\n keccak256(\"REGISTER_STANDARD_CALLBACK_PERMISSION\");\n\n /// @notice The internal constant storing the maximal action array length.\n uint256 internal constant MAX_ACTIONS = 256;\n\n /// @notice The first out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set inidicating that a function was not entered.\n uint256 private constant _NOT_ENTERED = 1;\n\n /// @notice The second out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set inidicating that a function was entered.\n uint256 private constant _ENTERED = 2;\n\n /// @notice The [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\n /// @dev Added in v1.0.0.\n IERC1271 public signatureValidator;\n\n /// @notice The address of the trusted forwarder verifying meta transactions.\n /// @dev Added in v1.0.0.\n address private trustedForwarder;\n\n /// @notice The [EIP-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI.\n /// @dev Added in v1.0.0.\n string private _daoURI;\n\n /// @notice The state variable for the reentrancy guard of the `execute` function.\n /// @dev Added in v1.3.0. The variable can be of value `_NOT_ENTERED = 1` or `_ENTERED = 2` in usage and is initialized with `_NOT_ENTERED`.\n uint256 private _reentrancyStatus;\n\n /// @notice Thrown if a call is reentrant.\n error ReentrantCall();\n\n /// @notice Thrown if the action array length is larger than `MAX_ACTIONS`.\n error TooManyActions();\n\n /// @notice Thrown if action execution has failed.\n /// @param index The index of the action in the action array that failed.\n error ActionFailed(uint256 index);\n\n /// @notice Thrown if an action has insufficent gas left.\n error InsufficientGas();\n\n /// @notice Thrown if the deposit amount is zero.\n error ZeroAmount();\n\n /// @notice Thrown if there is a mismatch between the expected and actually deposited amount of native tokens.\n /// @param expected The expected native token amount.\n /// @param actual The actual native token amount deposited.\n error NativeTokenDepositAmountMismatch(uint256 expected, uint256 actual);\n\n /// @notice Thrown if an upgrade is not supported from a specific protocol version .\n error ProtocolVersionUpgradeNotSupported(uint8[3] protocolVersion);\n\n /// @notice Emitted when a new DAO URI is set.\n /// @param daoURI The new URI.\n event NewURI(string daoURI);\n\n /// @notice A modifier to protect a function from calling itself, directly or indirectly (reentrancy).\n /// @dev Currently, this modifier is only applied to the `execute()` function. If this is used multiple times, private `_beforeNonReentrant()` and `_afterNonReentrant()` functions should be created to prevent code duplication.\n modifier nonReentrant() {\n if (_reentrancyStatus == _ENTERED) {\n revert ReentrantCall();\n }\n _reentrancyStatus = _ENTERED;\n\n _;\n\n _reentrancyStatus = _NOT_ENTERED;\n }\n\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the DAO by\n /// - setting the reentrancy status variable to `_NOT_ENTERED`\n /// - registering the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID\n /// - setting the trusted forwarder for meta transactions\n /// - giving the `ROOT_PERMISSION_ID` permission to the initial owner (that should be revoked and transferred to the DAO after setup).\n /// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).\n /// @param _metadata IPFS hash that points to all the metadata (logo, description, tags, etc.) of a DAO.\n /// @param _initialOwner The initial owner of the DAO having the `ROOT_PERMISSION_ID` permission.\n /// @param _trustedForwarder The trusted forwarder responsible for verifying meta transactions.\n /// @param daoURI_ The DAO URI required to support [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824).\n function initialize(\n bytes calldata _metadata,\n address _initialOwner,\n address _trustedForwarder,\n string calldata daoURI_\n ) external reinitializer(2) {\n _reentrancyStatus = _NOT_ENTERED; // added in v1.3.0\n\n _registerInterface(type(IDAO).interfaceId);\n _registerInterface(type(IERC1271).interfaceId);\n _registerInterface(type(IEIP4824).interfaceId);\n _registerInterface(type(IProtocolVersion).interfaceId); // added in v1.3.0\n _registerTokenInterfaces();\n\n _setMetadata(_metadata);\n _setTrustedForwarder(_trustedForwarder);\n _setDaoURI(daoURI_);\n __PermissionManager_init(_initialOwner);\n }\n\n /// @notice Initializes the DAO after an upgrade from a previous protocol version.\n /// @param _previousProtocolVersion The semantic protocol version number of the previous DAO implementation contract this upgrade is transitioning from.\n /// @param _initData The initialization data to be passed to via `upgradeToAndCall` (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)).\n function initializeFrom(\n uint8[3] calldata _previousProtocolVersion,\n bytes calldata _initData\n ) external reinitializer(2) {\n _initData; // Silences the unused function parameter warning.\n\n // Check that the contract is not upgrading from a different major release.\n if (_previousProtocolVersion[0] != 1) {\n revert ProtocolVersionUpgradeNotSupported(_previousProtocolVersion);\n }\n\n // Initialize `_reentrancyStatus` that was added in v1.3.0.\n // Register Interface `ProtocolVersion` that was added in v1.3.0.\n if (_previousProtocolVersion[1] <= 2) {\n _reentrancyStatus = _NOT_ENTERED;\n _registerInterface(type(IProtocolVersion).interfaceId);\n }\n }\n\n /// @inheritdoc PermissionManager\n function isPermissionRestrictedForAnyAddr(\n bytes32 _permissionId\n ) internal pure override returns (bool) {\n return\n _permissionId == EXECUTE_PERMISSION_ID ||\n _permissionId == UPGRADE_DAO_PERMISSION_ID ||\n _permissionId == SET_METADATA_PERMISSION_ID ||\n _permissionId == SET_TRUSTED_FORWARDER_PERMISSION_ID ||\n _permissionId == SET_SIGNATURE_VALIDATOR_PERMISSION_ID ||\n _permissionId == REGISTER_STANDARD_CALLBACK_PERMISSION_ID;\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_DAO_PERMISSION_ID` permission.\n function _authorizeUpgrade(address) internal virtual override auth(UPGRADE_DAO_PERMISSION_ID) {}\n\n /// @inheritdoc IDAO\n function setTrustedForwarder(\n address _newTrustedForwarder\n ) external override auth(SET_TRUSTED_FORWARDER_PERMISSION_ID) {\n _setTrustedForwarder(_newTrustedForwarder);\n }\n\n /// @inheritdoc IDAO\n function getTrustedForwarder() external view virtual override returns (address) {\n return trustedForwarder;\n }\n\n /// @inheritdoc IDAO\n function hasPermission(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes memory _data\n ) external view override returns (bool) {\n return isGranted(_where, _who, _permissionId, _data);\n }\n\n /// @inheritdoc IDAO\n function setMetadata(\n bytes calldata _metadata\n ) external override auth(SET_METADATA_PERMISSION_ID) {\n _setMetadata(_metadata);\n }\n\n /// @inheritdoc IDAO\n function execute(\n bytes32 _callId,\n Action[] calldata _actions,\n uint256 _allowFailureMap\n )\n external\n override\n nonReentrant\n auth(EXECUTE_PERMISSION_ID)\n returns (bytes[] memory execResults, uint256 failureMap)\n {\n // Check that the action array length is within bounds.\n if (_actions.length > MAX_ACTIONS) {\n revert TooManyActions();\n }\n\n execResults = new bytes[](_actions.length);\n\n uint256 gasBefore;\n uint256 gasAfter;\n\n for (uint256 i = 0; i < _actions.length; ) {\n gasBefore = gasleft();\n\n (bool success, bytes memory result) = _actions[i].to.call{value: _actions[i].value}(\n _actions[i].data\n );\n gasAfter = gasleft();\n\n // Check if failure is allowed\n if (!hasBit(_allowFailureMap, uint8(i))) {\n // Check if the call failed.\n if (!success) {\n revert ActionFailed(i);\n }\n } else {\n // Check if the call failed.\n if (!success) {\n // Make sure that the action call did not fail because 63/64 of `gasleft()` was insufficient to execute the external call `.to.call` (see [ERC-150](https://eips.ethereum.org/EIPS/eip-150)).\n // In specific scenarios, i.e. proposal execution where the last action in the action array is allowed to fail, the account calling `execute` could force-fail this action by setting a gas limit\n // where 63/64 is insufficient causing the `.to.call` to fail, but where the remaining 1/64 gas are sufficient to successfully finish the `execute` call.\n if (gasAfter < gasBefore / 64) {\n revert InsufficientGas();\n }\n\n // Store that this action failed.\n failureMap = flipBit(failureMap, uint8(i));\n }\n }\n\n execResults[i] = result;\n\n unchecked {\n ++i;\n }\n }\n\n emit Executed({\n actor: msg.sender,\n callId: _callId,\n actions: _actions,\n allowFailureMap: _allowFailureMap,\n failureMap: failureMap,\n execResults: execResults\n });\n }\n\n /// @inheritdoc IDAO\n function deposit(\n address _token,\n uint256 _amount,\n string calldata _reference\n ) external payable override {\n if (_amount == 0) revert ZeroAmount();\n\n if (_token == address(0)) {\n if (msg.value != _amount)\n revert NativeTokenDepositAmountMismatch({expected: _amount, actual: msg.value});\n } else {\n if (msg.value != 0)\n revert NativeTokenDepositAmountMismatch({expected: 0, actual: msg.value});\n\n IERC20Upgradeable(_token).safeTransferFrom(msg.sender, address(this), _amount);\n }\n\n emit Deposited(msg.sender, _token, _amount, _reference);\n }\n\n /// @inheritdoc IDAO\n function setSignatureValidator(\n address _signatureValidator\n ) external override auth(SET_SIGNATURE_VALIDATOR_PERMISSION_ID) {\n signatureValidator = IERC1271(_signatureValidator);\n\n emit SignatureValidatorSet({signatureValidator: _signatureValidator});\n }\n\n /// @inheritdoc IDAO\n function isValidSignature(\n bytes32 _hash,\n bytes memory _signature\n ) external view override(IDAO, IERC1271) returns (bytes4) {\n if (address(signatureValidator) == address(0)) {\n // Return the invalid magic number\n return bytes4(0);\n }\n // Forward the call to the set signature validator contract\n return signatureValidator.isValidSignature(_hash, _signature);\n }\n\n /// @notice Emits the `NativeTokenDeposited` event to track native token deposits that weren't made via the deposit method.\n /// @dev This call is bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\n /// Gas cost increases in future hard forks might break this function. As an alternative, [ERC-2930](https://eips.ethereum.org/EIPS/eip-2930)-type transactions using access lists can be employed.\n receive() external payable {\n emit NativeTokenDeposited(msg.sender, msg.value);\n }\n\n /// @notice Fallback to handle future versions of the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) standard.\n /// @param _input An alias being equivalent to `msg.data`. This feature of the fallback function was introduced with the [solidity compiler version 0.7.6](https://github.com/ethereum/solidity/releases/tag/v0.7.6)\n /// @return The magic number registered for the function selector triggering the fallback.\n fallback(bytes calldata _input) external returns (bytes memory) {\n bytes4 magicNumber = _handleCallback(msg.sig, _input);\n return abi.encode(magicNumber);\n }\n\n /// @notice Emits the MetadataSet event if new metadata is set.\n /// @param _metadata Hash of the IPFS metadata object.\n function _setMetadata(bytes calldata _metadata) internal {\n emit MetadataSet(_metadata);\n }\n\n /// @notice Sets the trusted forwarder on the DAO and emits the associated event.\n /// @param _trustedForwarder The trusted forwarder address.\n function _setTrustedForwarder(address _trustedForwarder) internal {\n trustedForwarder = _trustedForwarder;\n\n emit TrustedForwarderSet(_trustedForwarder);\n }\n\n /// @notice Registers the [ERC-721](https://eips.ethereum.org/EIPS/eip-721) and [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) interfaces and callbacks.\n function _registerTokenInterfaces() private {\n _registerInterface(type(IERC721ReceiverUpgradeable).interfaceId);\n _registerInterface(type(IERC1155ReceiverUpgradeable).interfaceId);\n\n _registerCallback(\n IERC721ReceiverUpgradeable.onERC721Received.selector,\n IERC721ReceiverUpgradeable.onERC721Received.selector\n );\n _registerCallback(\n IERC1155ReceiverUpgradeable.onERC1155Received.selector,\n IERC1155ReceiverUpgradeable.onERC1155Received.selector\n );\n _registerCallback(\n IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector,\n IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector\n );\n }\n\n /// @inheritdoc IDAO\n function registerStandardCallback(\n bytes4 _interfaceId,\n bytes4 _callbackSelector,\n bytes4 _magicNumber\n ) external override auth(REGISTER_STANDARD_CALLBACK_PERMISSION_ID) {\n _registerInterface(_interfaceId);\n _registerCallback(_callbackSelector, _magicNumber);\n emit StandardCallbackRegistered(_interfaceId, _callbackSelector, _magicNumber);\n }\n\n /// @inheritdoc IEIP4824\n function daoURI() external view returns (string memory) {\n return _daoURI;\n }\n\n /// @notice Updates the set DAO URI to a new value.\n /// @param newDaoURI The new DAO URI to be set.\n function setDaoURI(string calldata newDaoURI) external auth(SET_METADATA_PERMISSION_ID) {\n _setDaoURI(newDaoURI);\n }\n\n /// @notice Sets the new [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI and emits the associated event.\n /// @param daoURI_ The new DAO URI.\n function _setDaoURI(string calldata daoURI_) internal {\n _daoURI = daoURI_;\n\n emit NewURI(daoURI_);\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[46] private __gap;\n}\n" - }, - "@aragon/osx/core/dao/IDAO.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IDAO\n/// @author Aragon Association - 2022-2023\n/// @notice The interface required for DAOs within the Aragon App DAO framework.\ninterface IDAO {\n /// @notice The action struct to be consumed by the DAO's `execute` function resulting in an external call.\n /// @param to The address to call.\n /// @param value The native token value to be sent with the call.\n /// @param data The bytes-encoded function selector and calldata for the call.\n struct Action {\n address to;\n uint256 value;\n bytes data;\n }\n\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\n /// @param _where The address of the contract.\n /// @param _who The address of a EOA or contract to give the permissions.\n /// @param _permissionId The permission identifier.\n /// @param _data The optional data passed to the `PermissionCondition` registered.\n /// @return Returns true if the address has permission, false if not.\n function hasPermission(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes memory _data\n ) external view returns (bool);\n\n /// @notice Updates the DAO metadata (e.g., an IPFS hash).\n /// @param _metadata The IPFS hash of the new metadata object.\n function setMetadata(bytes calldata _metadata) external;\n\n /// @notice Emitted when the DAO metadata is updated.\n /// @param metadata The IPFS hash of the new metadata object.\n event MetadataSet(bytes metadata);\n\n /// @notice Executes a list of actions. If a zero allow-failure map is provided, a failing action reverts the entire execution. If a non-zero allow-failure map is provided, allowed actions can fail without the entire call being reverted.\n /// @param _callId The ID of the call. The definition of the value of `callId` is up to the calling contract and can be used, e.g., as a nonce.\n /// @param _actions The array of actions.\n /// @param _allowFailureMap A bitmap allowing execution to succeed, even if individual actions might revert. If the bit at index `i` is 1, the execution succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\n /// @return The array of results obtained from the executed actions in `bytes`.\n /// @return The resulting failure map containing the actions have actually failed.\n function execute(\n bytes32 _callId,\n Action[] memory _actions,\n uint256 _allowFailureMap\n ) external returns (bytes[] memory, uint256);\n\n /// @notice Emitted when a proposal is executed.\n /// @param actor The address of the caller.\n /// @param callId The ID of the call.\n /// @param actions The array of actions executed.\n /// @param allowFailureMap The allow failure map encoding which actions are allowed to fail.\n /// @param failureMap The failure map encoding which actions have failed.\n /// @param execResults The array with the results of the executed actions.\n /// @dev The value of `callId` is defined by the component/contract calling the execute function. A `Plugin` implementation can use it, for example, as a nonce.\n event Executed(\n address indexed actor,\n bytes32 callId,\n Action[] actions,\n uint256 allowFailureMap,\n uint256 failureMap,\n bytes[] execResults\n );\n\n /// @notice Emitted when a standard callback is registered.\n /// @param interfaceId The ID of the interface.\n /// @param callbackSelector The selector of the callback function.\n /// @param magicNumber The magic number to be registered for the callback function selector.\n event StandardCallbackRegistered(\n bytes4 interfaceId,\n bytes4 callbackSelector,\n bytes4 magicNumber\n );\n\n /// @notice Deposits (native) tokens to the DAO contract with a reference string.\n /// @param _token The address of the token or address(0) in case of the native token.\n /// @param _amount The amount of tokens to deposit.\n /// @param _reference The reference describing the deposit reason.\n function deposit(address _token, uint256 _amount, string calldata _reference) external payable;\n\n /// @notice Emitted when a token deposit has been made to the DAO.\n /// @param sender The address of the sender.\n /// @param token The address of the deposited token.\n /// @param amount The amount of tokens deposited.\n /// @param _reference The reference describing the deposit reason.\n event Deposited(\n address indexed sender,\n address indexed token,\n uint256 amount,\n string _reference\n );\n\n /// @notice Emitted when a native token deposit has been made to the DAO.\n /// @dev This event is intended to be emitted in the `receive` function and is therefore bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\n /// @param sender The address of the sender.\n /// @param amount The amount of native tokens deposited.\n event NativeTokenDeposited(address sender, uint256 amount);\n\n /// @notice Setter for the trusted forwarder verifying the meta transaction.\n /// @param _trustedForwarder The trusted forwarder address.\n function setTrustedForwarder(address _trustedForwarder) external;\n\n /// @notice Getter for the trusted forwarder verifying the meta transaction.\n /// @return The trusted forwarder address.\n function getTrustedForwarder() external view returns (address);\n\n /// @notice Emitted when a new TrustedForwarder is set on the DAO.\n /// @param forwarder the new forwarder address.\n event TrustedForwarderSet(address forwarder);\n\n /// @notice Setter for the [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\n /// @param _signatureValidator The address of the signature validator.\n function setSignatureValidator(address _signatureValidator) external;\n\n /// @notice Emitted when the signature validator address is updated.\n /// @param signatureValidator The address of the signature validator.\n event SignatureValidatorSet(address signatureValidator);\n\n /// @notice Checks whether a signature is valid for the provided hash by forwarding the call to the set [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\n /// @param _hash The hash of the data to be signed.\n /// @param _signature The signature byte array associated with `_hash`.\n /// @return Returns the `bytes4` magic value `0x1626ba7e` if the signature is valid.\n function isValidSignature(bytes32 _hash, bytes memory _signature) external returns (bytes4);\n\n /// @notice Registers an ERC standard having a callback by registering its [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID and callback function signature.\n /// @param _interfaceId The ID of the interface.\n /// @param _callbackSelector The selector of the callback function.\n /// @param _magicNumber The magic number to be registered for the function signature.\n function registerStandardCallback(\n bytes4 _interfaceId,\n bytes4 _callbackSelector,\n bytes4 _magicNumber\n ) external;\n}\n" - }, - "@aragon/osx/core/dao/IEIP4824.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @title EIP-4824 Common Interfaces for DAOs\n/// @dev See https://eips.ethereum.org/EIPS/eip-4824\n/// @author Aragon Association - 2021-2023\ninterface IEIP4824 {\n /// @notice A distinct Uniform Resource Identifier (URI) pointing to a JSON object following the \"EIP-4824 DAO JSON-LD Schema\". This JSON file splits into four URIs: membersURI, proposalsURI, activityLogURI, and governanceURI. The membersURI should point to a JSON file that conforms to the \"EIP-4824 Members JSON-LD Schema\". The proposalsURI should point to a JSON file that conforms to the \"EIP-4824 Proposals JSON-LD Schema\". The activityLogURI should point to a JSON file that conforms to the \"EIP-4824 Activity Log JSON-LD Schema\". The governanceURI should point to a flatfile, normatively a .md file. Each of the JSON files named above can be statically hosted or dynamically-generated.\n /// @return _daoURI The DAO URI.\n function daoURI() external view returns (string memory _daoURI);\n}\n" - }, - "@aragon/osx/core/permission/IPermissionCondition.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IPermissionCondition\n/// @author Aragon Association - 2021-2023\n/// @notice This interface can be implemented to support more customary permissions depending on on- or off-chain state, e.g., by querying token ownershop or a secondary condition, respectively.\ninterface IPermissionCondition {\n /// @notice This method is used to check if a call is permitted.\n /// @param _where The address of the target contract.\n /// @param _who The address (EOA or contract) for which the permissions are checked.\n /// @param _permissionId The permission identifier.\n /// @param _data Optional data passed to the `PermissionCondition` implementation.\n /// @return allowed Returns true if the call is permitted.\n function isGranted(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes calldata _data\n ) external view returns (bool allowed);\n}\n" - }, - "@aragon/osx/core/permission/PermissionCondition.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nimport {IPermissionCondition} from \"./IPermissionCondition.sol\";\n\n/// @title PermissionCondition\n/// @author Aragon Association - 2023\n/// @notice An abstract contract for non-upgradeable contracts instantiated via the `new` keyword to inherit from to support customary permissions depending on arbitrary on-chain state.\nabstract contract PermissionCondition is ERC165, IPermissionCondition {\n /// @notice Checks if an interface is supported by this or its parent contract.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view override returns (bool) {\n return\n _interfaceId == type(IPermissionCondition).interfaceId ||\n super.supportsInterface(_interfaceId);\n }\n}\n" - }, - "@aragon/osx/core/permission/PermissionLib.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title PermissionLib\n/// @author Aragon Association - 2021-2023\n/// @notice A library containing objects for permission processing.\nlibrary PermissionLib {\n /// @notice A constant expressing that no condition is applied to a permission.\n address public constant NO_CONDITION = address(0);\n\n /// @notice The types of permission operations available in the `PermissionManager`.\n /// @param Grant The grant operation setting a permission without a condition.\n /// @param Revoke The revoke operation removing a permission (that was granted with or without a condition).\n /// @param GrantWithCondition The grant operation setting a permission with a condition.\n enum Operation {\n Grant,\n Revoke,\n GrantWithCondition\n }\n\n /// @notice A struct containing the information for a permission to be applied on a single target contract without a condition.\n /// @param operation The permission operation type.\n /// @param who The address (EOA or contract) receiving the permission.\n /// @param permissionId The permission identifier.\n struct SingleTargetPermission {\n Operation operation;\n address who;\n bytes32 permissionId;\n }\n\n /// @notice A struct containing the information for a permission to be applied on multiple target contracts, optionally, with a condition.\n /// @param operation The permission operation type.\n /// @param where The address of the target contract for which `who` receives permission.\n /// @param who The address (EOA or contract) receiving the permission.\n /// @param condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\n /// @param permissionId The permission identifier.\n struct MultiTargetPermission {\n Operation operation;\n address where;\n address who;\n address condition;\n bytes32 permissionId;\n }\n}\n" - }, - "@aragon/osx/core/permission/PermissionManager.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\n\nimport {IPermissionCondition} from \"./IPermissionCondition.sol\";\nimport {PermissionCondition} from \"./PermissionCondition.sol\";\nimport \"./PermissionLib.sol\";\n\n/// @title PermissionManager\n/// @author Aragon Association - 2021-2023\n/// @notice The abstract permission manager used in a DAO, its associated plugins, and other framework-related components.\nabstract contract PermissionManager is Initializable {\n using AddressUpgradeable for address;\n\n /// @notice The ID of the permission required to call the `grant`, `grantWithCondition`, `revoke`, and `bulk` function.\n bytes32 public constant ROOT_PERMISSION_ID = keccak256(\"ROOT_PERMISSION\");\n\n /// @notice A special address encoding permissions that are valid for any address `who` or `where`.\n address internal constant ANY_ADDR = address(type(uint160).max);\n\n /// @notice A special address encoding if a permissions is not set and therefore not allowed.\n address internal constant UNSET_FLAG = address(0);\n\n /// @notice A special address encoding if a permission is allowed.\n address internal constant ALLOW_FLAG = address(2);\n\n /// @notice A mapping storing permissions as hashes (i.e., `permissionHash(where, who, permissionId)`) and their status encoded by an address (unset, allowed, or redirecting to a `PermissionCondition`).\n mapping(bytes32 => address) internal permissionsHashed;\n\n /// @notice Thrown if a call is unauthorized.\n /// @param where The context in which the authorization reverted.\n /// @param who The address (EOA or contract) missing the permission.\n /// @param permissionId The permission identifier.\n error Unauthorized(address where, address who, bytes32 permissionId);\n\n /// @notice Thrown if a permission has been already granted with a different condition.\n /// @dev This makes sure that condition on the same permission can not be overwriten by a different condition.\n /// @param where The address of the target contract to grant `_who` permission to.\n /// @param who The address (EOA or contract) to which the permission has already been granted.\n /// @param permissionId The permission identifier.\n /// @param currentCondition The current condition set for permissionId.\n /// @param newCondition The new condition it tries to set for permissionId.\n error PermissionAlreadyGrantedForDifferentCondition(\n address where,\n address who,\n bytes32 permissionId,\n address currentCondition,\n address newCondition\n );\n\n /// @notice Thrown if a condition address is not a contract.\n /// @param condition The address that is not a contract.\n error ConditionNotAContract(IPermissionCondition condition);\n\n /// @notice Thrown if a condition contract does not support the `IPermissionCondition` interface.\n /// @param condition The address that is not a contract.\n error ConditionInterfacNotSupported(IPermissionCondition condition);\n\n /// @notice Thrown for `ROOT_PERMISSION_ID` or `EXECUTE_PERMISSION_ID` permission grants where `who` or `where` is `ANY_ADDR`.\n\n error PermissionsForAnyAddressDisallowed();\n\n /// @notice Thrown for permission grants where `who` and `where` are both `ANY_ADDR`.\n error AnyAddressDisallowedForWhoAndWhere();\n\n /// @notice Thrown if `Operation.GrantWithCondition` is requested as an operation but the method does not support it.\n error GrantWithConditionNotSupported();\n\n /// @notice Emitted when a permission `permission` is granted in the context `here` to the address `_who` for the contract `_where`.\n /// @param permissionId The permission identifier.\n /// @param here The address of the context in which the permission is granted.\n /// @param where The address of the target contract for which `_who` receives permission.\n /// @param who The address (EOA or contract) receiving the permission.\n /// @param condition The address `ALLOW_FLAG` for regular permissions or, alternatively, the `IPermissionCondition` contract implementation to be used.\n event Granted(\n bytes32 indexed permissionId,\n address indexed here,\n address where,\n address indexed who,\n address condition\n );\n\n /// @notice Emitted when a permission `permission` is revoked in the context `here` from the address `_who` for the contract `_where`.\n /// @param permissionId The permission identifier.\n /// @param here The address of the context in which the permission is revoked.\n /// @param where The address of the target contract for which `_who` loses permission.\n /// @param who The address (EOA or contract) losing the permission.\n event Revoked(\n bytes32 indexed permissionId,\n address indexed here,\n address where,\n address indexed who\n );\n\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through this permission manager.\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\n modifier auth(bytes32 _permissionId) {\n _auth(_permissionId);\n _;\n }\n\n /// @notice Initialization method to set the initial owner of the permission manager.\n /// @dev The initial owner is granted the `ROOT_PERMISSION_ID` permission.\n /// @param _initialOwner The initial owner of the permission manager.\n function __PermissionManager_init(address _initialOwner) internal onlyInitializing {\n _initializePermissionManager(_initialOwner);\n }\n\n /// @notice Grants permission to an address to call methods in a contract guarded by an auth modifier with the specified permission identifier.\n /// @dev Requires the `ROOT_PERMISSION_ID` permission.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) receiving the permission.\n /// @param _permissionId The permission identifier.\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function grant(\n address _where,\n address _who,\n bytes32 _permissionId\n ) external virtual auth(ROOT_PERMISSION_ID) {\n _grant(_where, _who, _permissionId);\n }\n\n /// @notice Grants permission to an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier if the referenced condition permits it.\n /// @dev Requires the `ROOT_PERMISSION_ID` permission\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) receiving the permission.\n /// @param _permissionId The permission identifier.\n /// @param _condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function grantWithCondition(\n address _where,\n address _who,\n bytes32 _permissionId,\n IPermissionCondition _condition\n ) external virtual auth(ROOT_PERMISSION_ID) {\n _grantWithCondition(_where, _who, _permissionId, _condition);\n }\n\n /// @notice Revokes permission from an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier.\n /// @dev Requires the `ROOT_PERMISSION_ID` permission.\n /// @param _where The address of the target contract for which `_who` loses permission.\n /// @param _who The address (EOA or contract) losing the permission.\n /// @param _permissionId The permission identifier.\n /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function revoke(\n address _where,\n address _who,\n bytes32 _permissionId\n ) external virtual auth(ROOT_PERMISSION_ID) {\n _revoke(_where, _who, _permissionId);\n }\n\n /// @notice Applies an array of permission operations on a single target contracts `_where`.\n /// @param _where The address of the single target contract.\n /// @param items The array of single-targeted permission operations to apply.\n function applySingleTargetPermissions(\n address _where,\n PermissionLib.SingleTargetPermission[] calldata items\n ) external virtual auth(ROOT_PERMISSION_ID) {\n for (uint256 i; i < items.length; ) {\n PermissionLib.SingleTargetPermission memory item = items[i];\n\n if (item.operation == PermissionLib.Operation.Grant) {\n _grant(_where, item.who, item.permissionId);\n } else if (item.operation == PermissionLib.Operation.Revoke) {\n _revoke(_where, item.who, item.permissionId);\n } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\n revert GrantWithConditionNotSupported();\n }\n\n unchecked {\n ++i;\n }\n }\n }\n\n /// @notice Applies an array of permission operations on multiple target contracts `items[i].where`.\n /// @param _items The array of multi-targeted permission operations to apply.\n function applyMultiTargetPermissions(\n PermissionLib.MultiTargetPermission[] calldata _items\n ) external virtual auth(ROOT_PERMISSION_ID) {\n for (uint256 i; i < _items.length; ) {\n PermissionLib.MultiTargetPermission memory item = _items[i];\n\n if (item.operation == PermissionLib.Operation.Grant) {\n _grant(item.where, item.who, item.permissionId);\n } else if (item.operation == PermissionLib.Operation.Revoke) {\n _revoke(item.where, item.who, item.permissionId);\n } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\n _grantWithCondition(\n item.where,\n item.who,\n item.permissionId,\n IPermissionCondition(item.condition)\n );\n }\n\n unchecked {\n ++i;\n }\n }\n }\n\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) for which the permission is checked.\n /// @param _permissionId The permission identifier.\n /// @param _data The optional data passed to the `PermissionCondition` registered.\n /// @return Returns true if `_who` has the permissions on the target contract via the specified permission identifier.\n function isGranted(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes memory _data\n ) public view virtual returns (bool) {\n return\n _isGranted(_where, _who, _permissionId, _data) || // check if `_who` has permission for `_permissionId` on `_where`\n _isGranted(_where, ANY_ADDR, _permissionId, _data) || // check if anyone has permission for `_permissionId` on `_where`\n _isGranted(ANY_ADDR, _who, _permissionId, _data); // check if `_who` has permission for `_permissionI` on any contract\n }\n\n /// @notice Grants the `ROOT_PERMISSION_ID` permission to the initial owner during initialization of the permission manager.\n /// @param _initialOwner The initial owner of the permission manager.\n function _initializePermissionManager(address _initialOwner) internal {\n _grant(address(this), _initialOwner, ROOT_PERMISSION_ID);\n }\n\n /// @notice This method is used in the external `grant` method of the permission manager.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function _grant(address _where, address _who, bytes32 _permissionId) internal virtual {\n if (_where == ANY_ADDR || _who == ANY_ADDR) {\n revert PermissionsForAnyAddressDisallowed();\n }\n\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\n\n address currentFlag = permissionsHashed[permHash];\n\n // Means permHash is not currently set.\n if (currentFlag == UNSET_FLAG) {\n permissionsHashed[permHash] = ALLOW_FLAG;\n\n emit Granted(_permissionId, msg.sender, _where, _who, ALLOW_FLAG);\n }\n }\n\n /// @notice This method is used in the external `grantWithCondition` method of the permission manager.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @param _condition An address either resolving to a `PermissionCondition` contract address or being the `ALLOW_FLAG` address (`address(2)`).\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function _grantWithCondition(\n address _where,\n address _who,\n bytes32 _permissionId,\n IPermissionCondition _condition\n ) internal virtual {\n address conditionAddr = address(_condition);\n\n if (!conditionAddr.isContract()) {\n revert ConditionNotAContract(_condition);\n }\n\n if (\n !PermissionCondition(conditionAddr).supportsInterface(\n type(IPermissionCondition).interfaceId\n )\n ) {\n revert ConditionInterfacNotSupported(_condition);\n }\n\n if (_where == ANY_ADDR && _who == ANY_ADDR) {\n revert AnyAddressDisallowedForWhoAndWhere();\n }\n\n if (_where == ANY_ADDR || _who == ANY_ADDR) {\n if (\n _permissionId == ROOT_PERMISSION_ID ||\n isPermissionRestrictedForAnyAddr(_permissionId)\n ) {\n revert PermissionsForAnyAddressDisallowed();\n }\n }\n\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\n\n address currentCondition = permissionsHashed[permHash];\n\n // Means permHash is not currently set.\n if (currentCondition == UNSET_FLAG) {\n permissionsHashed[permHash] = conditionAddr;\n\n emit Granted(_permissionId, msg.sender, _where, _who, conditionAddr);\n } else if (currentCondition != conditionAddr) {\n // Revert if `permHash` is already granted, but uses a different condition.\n // If we don't revert, we either should:\n // - allow overriding the condition on the same permission\n // which could be confusing whoever granted the same permission first\n // - or do nothing and succeed silently which could be confusing for the caller.\n revert PermissionAlreadyGrantedForDifferentCondition({\n where: _where,\n who: _who,\n permissionId: _permissionId,\n currentCondition: currentCondition,\n newCondition: conditionAddr\n });\n }\n }\n\n /// @notice This method is used in the public `revoke` method of the permission manager.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that might have been granted in parallel.\n function _revoke(address _where, address _who, bytes32 _permissionId) internal virtual {\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\n if (permissionsHashed[permHash] != UNSET_FLAG) {\n permissionsHashed[permHash] = UNSET_FLAG;\n\n emit Revoked(_permissionId, msg.sender, _where, _who);\n }\n }\n\n /// @notice Checks if a caller is granted permissions on a target contract via a permission identifier and redirects the approval to a `PermissionCondition` if this was specified in the setup.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @param _data The optional data passed to the `PermissionCondition` registered.\n /// @return Returns true if `_who` has the permissions on the contract via the specified permissionId identifier.\n function _isGranted(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes memory _data\n ) internal view virtual returns (bool) {\n address accessFlagOrCondition = permissionsHashed[\n permissionHash(_where, _who, _permissionId)\n ];\n\n if (accessFlagOrCondition == UNSET_FLAG) return false;\n if (accessFlagOrCondition == ALLOW_FLAG) return true;\n\n // Since it's not a flag, assume it's a PermissionCondition and try-catch to skip failures\n try\n IPermissionCondition(accessFlagOrCondition).isGranted(\n _where,\n _who,\n _permissionId,\n _data\n )\n returns (bool allowed) {\n if (allowed) return true;\n } catch {}\n\n return false;\n }\n\n /// @notice A private function to be used to check permissions on the permission manager contract (`address(this)`) itself.\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\n function _auth(bytes32 _permissionId) internal view virtual {\n if (!isGranted(address(this), msg.sender, _permissionId, msg.data)) {\n revert Unauthorized({\n where: address(this),\n who: msg.sender,\n permissionId: _permissionId\n });\n }\n }\n\n /// @notice Generates the hash for the `permissionsHashed` mapping obtained from the word \"PERMISSION\", the contract address, the address owning the permission, and the permission identifier.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @return The permission hash.\n function permissionHash(\n address _where,\n address _who,\n bytes32 _permissionId\n ) internal pure virtual returns (bytes32) {\n return keccak256(abi.encodePacked(\"PERMISSION\", _who, _where, _permissionId));\n }\n\n /// @notice Decides if the granting permissionId is restricted when `_who == ANY_ADDR` or `_where == ANY_ADDR`.\n /// @param _permissionId The permission identifier.\n /// @return Whether or not the permission is restricted.\n /// @dev By default, every permission is unrestricted and it is the derived contract's responsibility to override it. Note, that the `ROOT_PERMISSION_ID` is included and not required to be set it again.\n function isPermissionRestrictedForAnyAddr(\n bytes32 _permissionId\n ) internal view virtual returns (bool) {\n (_permissionId); // silence the warning.\n return false;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[49] private __gap;\n}\n" - }, - "@aragon/osx/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {ContextUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\";\n\nimport {IDAO} from \"../../dao/IDAO.sol\";\nimport {_auth} from \"../../utils/auth.sol\";\n\n/// @title DaoAuthorizableUpgradeable\n/// @author Aragon Association - 2022-2023\n/// @notice An abstract contract providing a meta-transaction compatible modifier for upgradeable or cloneable contracts to authorize function calls through an associated DAO.\n/// @dev Make sure to call `__DaoAuthorizableUpgradeable_init` during initialization of the inheriting contract.\nabstract contract DaoAuthorizableUpgradeable is ContextUpgradeable {\n /// @notice The associated DAO managing the permissions of inheriting contracts.\n IDAO private dao_;\n\n /// @notice Initializes the contract by setting the associated DAO.\n /// @param _dao The associated DAO address.\n function __DaoAuthorizableUpgradeable_init(IDAO _dao) internal onlyInitializing {\n dao_ = _dao;\n }\n\n /// @notice Returns the DAO contract.\n /// @return The DAO contract.\n function dao() public view returns (IDAO) {\n return dao_;\n }\n\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through the associated DAO's permission manager.\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\n modifier auth(bytes32 _permissionId) {\n _auth(dao_, address(this), _msgSender(), _permissionId, _msgData());\n _;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[49] private __gap;\n}\n" - }, - "@aragon/osx/core/plugin/IPlugin.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IPlugin\n/// @author Aragon Association - 2022-2023\n/// @notice An interface defining the traits of a plugin.\ninterface IPlugin {\n enum PluginType {\n UUPS,\n Cloneable,\n Constructable\n }\n\n /// @notice Returns the plugin's type\n function pluginType() external view returns (PluginType);\n}\n" - }, - "@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {IERC1822ProxiableUpgradeable} from \"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\";\nimport {ERC165Upgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\";\n\nimport {IDAO} from \"../dao/IDAO.sol\";\nimport {DaoAuthorizableUpgradeable} from \"./dao-authorizable/DaoAuthorizableUpgradeable.sol\";\nimport {IPlugin} from \"./IPlugin.sol\";\n\n/// @title PluginUUPSUpgradeable\n/// @author Aragon Association - 2022-2023\n/// @notice An abstract, upgradeable contract to inherit from when creating a plugin being deployed via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\nabstract contract PluginUUPSUpgradeable is\n IPlugin,\n ERC165Upgradeable,\n UUPSUpgradeable,\n DaoAuthorizableUpgradeable\n{\n // NOTE: When adding new state variables to the contract, the size of `_gap` has to be adapted below as well.\n\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\n constructor() {\n _disableInitializers();\n }\n\n /// @inheritdoc IPlugin\n function pluginType() public pure override returns (PluginType) {\n return PluginType.UUPS;\n }\n\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\n bytes32 public constant UPGRADE_PLUGIN_PERMISSION_ID = keccak256(\"UPGRADE_PLUGIN_PERMISSION\");\n\n /// @notice Initializes the plugin by storing the associated DAO.\n /// @param _dao The DAO contract.\n function __PluginUUPSUpgradeable_init(IDAO _dao) internal virtual onlyInitializing {\n __DaoAuthorizableUpgradeable_init(_dao);\n }\n\n /// @notice Checks if an interface is supported by this or its parent contract.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n return\n _interfaceId == type(IPlugin).interfaceId ||\n _interfaceId == type(IERC1822ProxiableUpgradeable).interfaceId ||\n super.supportsInterface(_interfaceId);\n }\n\n /// @notice Returns the address of the implementation contract in the [proxy storage slot](https://eips.ethereum.org/EIPS/eip-1967) slot the [UUPS proxy](https://eips.ethereum.org/EIPS/eip-1822) is pointing to.\n /// @return The address of the implementation contract.\n function implementation() public view returns (address) {\n return _getImplementation();\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_PLUGIN_PERMISSION_ID` permission.\n function _authorizeUpgrade(\n address\n ) internal virtual override auth(UPGRADE_PLUGIN_PERMISSION_ID) {}\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[50] private __gap;\n}\n" - }, - "@aragon/osx/core/utils/auth.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {IDAO} from \"../dao/IDAO.sol\";\n\n/// @notice Thrown if a call is unauthorized in the associated DAO.\n/// @param dao The associated DAO.\n/// @param where The context in which the authorization reverted.\n/// @param who The address (EOA or contract) missing the permission.\n/// @param permissionId The permission identifier.\nerror DaoUnauthorized(address dao, address where, address who, bytes32 permissionId);\n\n/// @notice A free function checking if a caller is granted permissions on a target contract via a permission identifier that redirects the approval to a `PermissionCondition` if this was specified in the setup.\n/// @param _where The address of the target contract for which `who` receives permission.\n/// @param _who The address (EOA or contract) owning the permission.\n/// @param _permissionId The permission identifier.\n/// @param _data The optional data passed to the `PermissionCondition` registered.\nfunction _auth(\n IDAO _dao,\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes calldata _data\n) view {\n if (!_dao.hasPermission(_where, _who, _permissionId, _data))\n revert DaoUnauthorized({\n dao: address(_dao),\n where: _where,\n who: _who,\n permissionId: _permissionId\n });\n}\n" - }, - "@aragon/osx/core/utils/BitMap.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @param bitmap The `uint256` representation of bits.\n/// @param index The index number to check whether 1 or 0 is set.\n/// @return Returns `true` if the bit is set at `index` on `bitmap`.\nfunction hasBit(uint256 bitmap, uint8 index) pure returns (bool) {\n uint256 bitValue = bitmap & (1 << index);\n return bitValue > 0;\n}\n\n/// @param bitmap The `uint256` representation of bits.\n/// @param index The index number to set the bit.\n/// @return Returns a new number in which the bit is set at `index`.\nfunction flipBit(uint256 bitmap, uint8 index) pure returns (uint256) {\n return bitmap ^ (1 << index);\n}\n" - }, - "@aragon/osx/core/utils/CallbackHandler.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @title CallbackHandler\n/// @author Aragon Association - 2022-2023\n/// @notice This contract handles callbacks by registering a magic number together with the callback function's selector. It provides the `_handleCallback` function that inheriting contracts have to call inside their `fallback()` function (`_handleCallback(msg.callbackSelector, msg.data)`). This allows to adaptively register ERC standards (e.g., [ERC-721](https://eips.ethereum.org/EIPS/eip-721), [ERC-1115](https://eips.ethereum.org/EIPS/eip-1155), or future versions of [ERC-165](https://eips.ethereum.org/EIPS/eip-165)) and returning the required magic numbers for the associated callback functions for the inheriting contract so that it doesn't need to be upgraded.\n/// @dev This callback handling functionality is intented to be used by executor contracts (i.e., `DAO.sol`).\nabstract contract CallbackHandler {\n /// @notice A mapping between callback function selectors and magic return numbers.\n mapping(bytes4 => bytes4) internal callbackMagicNumbers;\n\n /// @notice The magic number refering to unregistered callbacks.\n bytes4 internal constant UNREGISTERED_CALLBACK = bytes4(0);\n\n /// @notice Thrown if the callback function is not registered.\n /// @param callbackSelector The selector of the callback function.\n /// @param magicNumber The magic number to be registered for the callback function selector.\n error UnkownCallback(bytes4 callbackSelector, bytes4 magicNumber);\n\n /// @notice Emitted when `_handleCallback` is called.\n /// @param sender Who called the callback.\n /// @param sig The function signature.\n /// @param data The calldata.\n event CallbackReceived(address sender, bytes4 indexed sig, bytes data);\n\n /// @notice Handles callbacks to adaptively support ERC standards.\n /// @dev This function is supposed to be called via `_handleCallback(msg.sig, msg.data)` in the `fallback()` function of the inheriting contract.\n /// @param _callbackSelector The function selector of the callback function.\n /// @param _data The calldata.\n /// @return The magic number registered for the function selector triggering the fallback.\n function _handleCallback(\n bytes4 _callbackSelector,\n bytes memory _data\n ) internal virtual returns (bytes4) {\n bytes4 magicNumber = callbackMagicNumbers[_callbackSelector];\n if (magicNumber == UNREGISTERED_CALLBACK) {\n revert UnkownCallback({callbackSelector: _callbackSelector, magicNumber: magicNumber});\n }\n\n emit CallbackReceived({sender: msg.sender, sig: _callbackSelector, data: _data});\n\n return magicNumber;\n }\n\n /// @notice Registers a magic number for a callback function selector.\n /// @param _callbackSelector The selector of the callback function.\n /// @param _magicNumber The magic number to be registered for the callback function selector.\n function _registerCallback(bytes4 _callbackSelector, bytes4 _magicNumber) internal virtual {\n callbackMagicNumbers[_callbackSelector] = _magicNumber;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[49] private __gap;\n}\n" - }, - "@aragon/osx/framework/plugin/repo/IPluginRepo.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @title IPluginRepo\n/// @author Aragon Association - 2022-2023\n/// @notice The interface required for a plugin repository.\ninterface IPluginRepo {\n /// @notice Updates the metadata for release with content `@fromHex(_releaseMetadata)`.\n /// @param _release The release number.\n /// @param _releaseMetadata The release metadata URI.\n function updateReleaseMetadata(uint8 _release, bytes calldata _releaseMetadata) external;\n\n /// @notice Creates a new plugin version as the latest build for an existing release number or the first build for a new release number for the provided `PluginSetup` contract address and metadata.\n /// @param _release The release number.\n /// @param _pluginSetupAddress The address of the plugin setup contract.\n /// @param _buildMetadata The build metadata URI.\n /// @param _releaseMetadata The release metadata URI.\n function createVersion(\n uint8 _release,\n address _pluginSetupAddress,\n bytes calldata _buildMetadata,\n bytes calldata _releaseMetadata\n ) external;\n}\n" - }, - "@aragon/osx/framework/plugin/repo/PluginRepo.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {ERC165Upgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\";\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {AddressUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\nimport {ERC165CheckerUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\";\n\nimport {IProtocolVersion} from \"../../../utils/protocol/IProtocolVersion.sol\";\nimport {ProtocolVersion} from \"../../../utils/protocol/ProtocolVersion.sol\";\nimport {PermissionManager} from \"../../../core/permission/PermissionManager.sol\";\nimport {PluginSetup} from \"../setup/PluginSetup.sol\";\nimport {IPluginSetup} from \"../setup/PluginSetup.sol\";\nimport {IPluginRepo} from \"./IPluginRepo.sol\";\n\n/// @title PluginRepo\n/// @author Aragon Association - 2020 - 2023\n/// @notice The plugin repository contract required for managing and publishing different plugin versions within the Aragon DAO framework.\ncontract PluginRepo is\n Initializable,\n ERC165Upgradeable,\n IPluginRepo,\n UUPSUpgradeable,\n ProtocolVersion,\n PermissionManager\n{\n using AddressUpgradeable for address;\n using ERC165CheckerUpgradeable for address;\n\n /// @notice The struct describing the tag of a version obtained by a release and build number as `RELEASE.BUILD`.\n /// @param release The release number.\n /// @param build The build number\n /// @dev Releases can include a storage layout or the addition of new functions. Builds include logic changes or updates of the UI.\n struct Tag {\n uint8 release;\n uint16 build;\n }\n\n /// @notice The struct describing a plugin version (release and build).\n /// @param tag The version tag.\n /// @param pluginSetup The setup contract associated with this version.\n /// @param buildMetadata The build metadata URI.\n struct Version {\n Tag tag;\n address pluginSetup;\n bytes buildMetadata;\n }\n\n /// @notice The ID of the permission required to call the `createVersion` function.\n bytes32 public constant MAINTAINER_PERMISSION_ID = keccak256(\"MAINTAINER_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `createVersion` function.\n bytes32 public constant UPGRADE_REPO_PERMISSION_ID = keccak256(\"UPGRADE_REPO_PERMISSION\");\n\n /// @notice The mapping between release and build numbers.\n mapping(uint8 => uint16) internal buildsPerRelease;\n\n /// @notice The mapping between the version hash and the corresponding version information.\n mapping(bytes32 => Version) internal versions;\n\n /// @notice The mapping between the plugin setup address and its corresponding version hash.\n mapping(address => bytes32) internal latestTagHashForPluginSetup;\n\n /// @notice The ID of the latest release.\n /// @dev The maximum release number is 255.\n uint8 public latestRelease;\n\n /// @notice Thrown if a version does not exist.\n /// @param versionHash The tag hash.\n error VersionHashDoesNotExist(bytes32 versionHash);\n\n /// @notice Thrown if a plugin setup contract does not inherit from `PluginSetup`.\n error InvalidPluginSetupInterface();\n\n /// @notice Thrown if a release number is zero.\n error ReleaseZeroNotAllowed();\n\n /// @notice Thrown if a release number is incremented by more than one.\n /// @param latestRelease The latest release number.\n /// @param newRelease The new release number.\n error InvalidReleaseIncrement(uint8 latestRelease, uint8 newRelease);\n\n /// @notice Thrown if the same plugin setup contract exists already in a previous releases.\n /// @param release The release number of the already existing plugin setup.\n /// @param build The build number of the already existing plugin setup.\n /// @param pluginSetup The plugin setup contract address.\n error PluginSetupAlreadyInPreviousRelease(uint8 release, uint16 build, address pluginSetup);\n\n /// @notice Thrown if the metadata URI is empty.\n error EmptyReleaseMetadata();\n\n /// @notice Thrown if release does not exist.\n error ReleaseDoesNotExist();\n\n /// @notice Thrown if the same plugin setup exists in previous releases.\n /// @param release The release number.\n /// @param build The build number.\n /// @param pluginSetup The address of the plugin setup contract.\n /// @param buildMetadata The build metadata URI.\n event VersionCreated(\n uint8 release,\n uint16 build,\n address indexed pluginSetup,\n bytes buildMetadata\n );\n\n /// @notice Thrown when a release's metadata was updated.\n /// @param release The release number.\n /// @param releaseMetadata The release metadata URI.\n event ReleaseMetadataUpdated(uint8 release, bytes releaseMetadata);\n\n /// @dev Used to disallow initializing the implementation contract by an attacker for extra safety.\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the contract by\n /// - initializing the permission manager\n /// - granting the `MAINTAINER_PERMISSION_ID` permission to the initial owner.\n /// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).\n function initialize(address initialOwner) external initializer {\n __PermissionManager_init(initialOwner);\n\n _grant(address(this), initialOwner, MAINTAINER_PERMISSION_ID);\n _grant(address(this), initialOwner, UPGRADE_REPO_PERMISSION_ID);\n }\n\n /// @inheritdoc IPluginRepo\n function createVersion(\n uint8 _release,\n address _pluginSetup,\n bytes calldata _buildMetadata,\n bytes calldata _releaseMetadata\n ) external auth(MAINTAINER_PERMISSION_ID) {\n if (!_pluginSetup.supportsInterface(type(IPluginSetup).interfaceId)) {\n revert InvalidPluginSetupInterface();\n }\n\n if (_release == 0) {\n revert ReleaseZeroNotAllowed();\n }\n\n // Check that the release number is not incremented by more than one\n if (_release - latestRelease > 1) {\n revert InvalidReleaseIncrement({latestRelease: latestRelease, newRelease: _release});\n }\n\n if (_release > latestRelease) {\n latestRelease = _release;\n\n if (_releaseMetadata.length == 0) {\n revert EmptyReleaseMetadata();\n }\n }\n\n // Make sure the same plugin setup wasn't used in previous releases.\n Version storage version = versions[latestTagHashForPluginSetup[_pluginSetup]];\n if (version.tag.release != 0 && version.tag.release != _release) {\n revert PluginSetupAlreadyInPreviousRelease(\n version.tag.release,\n version.tag.build,\n _pluginSetup\n );\n }\n\n uint16 build = ++buildsPerRelease[_release];\n\n Tag memory tag = Tag(_release, build);\n bytes32 _tagHash = tagHash(tag);\n\n versions[_tagHash] = Version(tag, _pluginSetup, _buildMetadata);\n\n latestTagHashForPluginSetup[_pluginSetup] = _tagHash;\n\n emit VersionCreated({\n release: _release,\n build: build,\n pluginSetup: _pluginSetup,\n buildMetadata: _buildMetadata\n });\n\n if (_releaseMetadata.length > 0) {\n emit ReleaseMetadataUpdated(_release, _releaseMetadata);\n }\n }\n\n /// @inheritdoc IPluginRepo\n function updateReleaseMetadata(\n uint8 _release,\n bytes calldata _releaseMetadata\n ) external auth(MAINTAINER_PERMISSION_ID) {\n if (_release == 0) {\n revert ReleaseZeroNotAllowed();\n }\n\n if (_release > latestRelease) {\n revert ReleaseDoesNotExist();\n }\n\n if (_releaseMetadata.length == 0) {\n revert EmptyReleaseMetadata();\n }\n\n emit ReleaseMetadataUpdated(_release, _releaseMetadata);\n }\n\n /// @notice Returns the latest version for a given release number.\n /// @param _release The release number.\n /// @return The latest version of this release.\n function getLatestVersion(uint8 _release) public view returns (Version memory) {\n uint16 latestBuild = uint16(buildsPerRelease[_release]);\n return getVersion(tagHash(Tag(_release, latestBuild)));\n }\n\n /// @notice Returns the latest version for a given plugin setup.\n /// @param _pluginSetup The plugin setup address\n /// @return The latest version associated with the plugin Setup.\n function getLatestVersion(address _pluginSetup) public view returns (Version memory) {\n return getVersion(latestTagHashForPluginSetup[_pluginSetup]);\n }\n\n /// @notice Returns the version associated with a tag.\n /// @param _tag The version tag.\n /// @return The version associated with the tag.\n function getVersion(Tag calldata _tag) public view returns (Version memory) {\n return getVersion(tagHash(_tag));\n }\n\n /// @notice Returns the version for a tag hash.\n /// @param _tagHash The tag hash.\n /// @return The version associated with a tag hash.\n function getVersion(bytes32 _tagHash) public view returns (Version memory) {\n Version storage version = versions[_tagHash];\n\n if (version.tag.release == 0) {\n revert VersionHashDoesNotExist(_tagHash);\n }\n\n return version;\n }\n\n /// @notice Gets the total number of builds for a given release number.\n /// @param _release The release number.\n /// @return The number of builds of this release.\n function buildCount(uint8 _release) public view returns (uint256) {\n return buildsPerRelease[_release];\n }\n\n /// @notice The hash of the version tag obtained from the packed, bytes-encoded release and build number.\n /// @param _tag The version tag.\n /// @return The version tag hash.\n function tagHash(Tag memory _tag) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(_tag.release, _tag.build));\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_REPO_PERMISSION_ID` permission.\n function _authorizeUpgrade(\n address\n ) internal virtual override auth(UPGRADE_REPO_PERMISSION_ID) {}\n\n /// @notice Checks if this or the parent contract supports an interface by its ID.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n return\n _interfaceId == type(IPluginRepo).interfaceId ||\n _interfaceId == type(IProtocolVersion).interfaceId ||\n super.supportsInterface(_interfaceId);\n }\n}\n" - }, - "@aragon/osx/framework/plugin/repo/PluginRepoFactory.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {IProtocolVersion} from \"../../../utils/protocol/IProtocolVersion.sol\";\nimport {ProtocolVersion} from \"../../../utils/protocol/ProtocolVersion.sol\";\nimport {createERC1967Proxy} from \"../../../utils/Proxy.sol\";\nimport {PluginRepoRegistry} from \"./PluginRepoRegistry.sol\";\nimport {PluginRepo} from \"./PluginRepo.sol\";\n\n/// @title PluginRepoFactory\n/// @author Aragon Association - 2022-2023\n/// @notice This contract creates `PluginRepo` proxies and registers them on a `PluginRepoRegistry` contract.\ncontract PluginRepoFactory is ERC165, ProtocolVersion {\n /// @notice The Aragon plugin registry contract.\n PluginRepoRegistry public pluginRepoRegistry;\n\n /// @notice The address of the `PluginRepo` base contract to proxy to..\n address public pluginRepoBase;\n\n /// @notice Initializes the addresses of the Aragon plugin registry and `PluginRepo` base contract to proxy to.\n /// @param _pluginRepoRegistry The aragon plugin registry address.\n constructor(PluginRepoRegistry _pluginRepoRegistry) {\n pluginRepoRegistry = _pluginRepoRegistry;\n\n pluginRepoBase = address(new PluginRepo());\n }\n\n /// @notice Checks if this or the parent contract supports an interface by its ID.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n return\n _interfaceId == type(IProtocolVersion).interfaceId ||\n super.supportsInterface(_interfaceId);\n }\n\n /// @notice Creates a plugin repository proxy pointing to the `pluginRepoBase` implementation and registers it in the Aragon plugin registry.\n /// @param _subdomain The plugin repository subdomain.\n /// @param _initialOwner The plugin maintainer address.\n function createPluginRepo(\n string calldata _subdomain,\n address _initialOwner\n ) external returns (PluginRepo) {\n return _createPluginRepo(_subdomain, _initialOwner);\n }\n\n /// @notice Creates and registers a `PluginRepo` with an ENS subdomain and publishes an initial version `1.1`.\n /// @param _subdomain The plugin repository subdomain.\n /// @param _pluginSetup The plugin factory contract associated with the plugin version.\n /// @param _maintainer The maintainer of the plugin repo. This address has permission to update metadata, upgrade the repo logic, and manage the repo permissions.\n /// @param _releaseMetadata The release metadata URI.\n /// @param _buildMetadata The build metadata URI.\n /// @dev After the creation of the `PluginRepo` and release of the first version by the factory, ownership is transferred to the `_maintainer` address.\n function createPluginRepoWithFirstVersion(\n string calldata _subdomain,\n address _pluginSetup,\n address _maintainer,\n bytes memory _releaseMetadata,\n bytes memory _buildMetadata\n ) external returns (PluginRepo pluginRepo) {\n // Sets `address(this)` as initial owner which is later replaced with the maintainer address.\n pluginRepo = _createPluginRepo(_subdomain, address(this));\n\n pluginRepo.createVersion(1, _pluginSetup, _buildMetadata, _releaseMetadata);\n\n // Setup permissions and transfer ownership from `address(this)` to `_maintainer`.\n _setPluginRepoPermissions(pluginRepo, _maintainer);\n }\n\n /// @notice Set the final permissions for the published plugin repository maintainer. All permissions are revoked from the plugin factory and granted to the specified plugin maintainer.\n /// @param pluginRepo The plugin repository instance just created.\n /// @param maintainer The plugin maintainer address.\n /// @dev The plugin maintainer is granted the `MAINTAINER_PERMISSION_ID`, `UPGRADE_REPO_PERMISSION_ID`, and `ROOT_PERMISSION_ID`.\n function _setPluginRepoPermissions(PluginRepo pluginRepo, address maintainer) internal {\n // Set permissions on the `PluginRepo`s `PermissionManager`\n PermissionLib.SingleTargetPermission[]\n memory items = new PermissionLib.SingleTargetPermission[](6);\n\n bytes32 rootPermissionID = pluginRepo.ROOT_PERMISSION_ID();\n bytes32 maintainerPermissionID = pluginRepo.MAINTAINER_PERMISSION_ID();\n bytes32 upgradePermissionID = pluginRepo.UPGRADE_REPO_PERMISSION_ID();\n\n // Grant the plugin maintainer all the permissions required\n items[0] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Grant,\n maintainer,\n maintainerPermissionID\n );\n items[1] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Grant,\n maintainer,\n upgradePermissionID\n );\n items[2] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Grant,\n maintainer,\n rootPermissionID\n );\n\n // Revoke permissions from the plugin repository factory (`address(this)`).\n items[3] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Revoke,\n address(this),\n rootPermissionID\n );\n items[4] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Revoke,\n address(this),\n maintainerPermissionID\n );\n items[5] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Revoke,\n address(this),\n upgradePermissionID\n );\n\n pluginRepo.applySingleTargetPermissions(address(pluginRepo), items);\n }\n\n /// @notice Internal method creating a `PluginRepo` via the [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy pattern from the provided base contract and registering it in the Aragon plugin registry.\n /// @dev Passing an empty `_subdomain` will cause the transaction to revert.\n /// @param _subdomain The plugin repository subdomain.\n /// @param _initialOwner The initial owner address.\n function _createPluginRepo(\n string calldata _subdomain,\n address _initialOwner\n ) internal returns (PluginRepo pluginRepo) {\n pluginRepo = PluginRepo(\n createERC1967Proxy(\n pluginRepoBase,\n abi.encodeWithSelector(PluginRepo.initialize.selector, _initialOwner)\n )\n );\n\n pluginRepoRegistry.registerPluginRepo(_subdomain, address(pluginRepo));\n }\n}\n" - }, - "@aragon/osx/framework/plugin/repo/PluginRepoRegistry.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {IDAO} from \"../../../core/dao/IDAO.sol\";\nimport {ENSSubdomainRegistrar} from \"../../utils/ens/ENSSubdomainRegistrar.sol\";\nimport {InterfaceBasedRegistry} from \"../../utils/InterfaceBasedRegistry.sol\";\nimport {isSubdomainValid} from \"../../utils/RegistryUtils.sol\";\nimport {IPluginRepo} from \"./IPluginRepo.sol\";\n\n/// @title PluginRepoRegistry\n/// @author Aragon Association - 2022-2023\n/// @notice This contract maintains an address-based registry of plugin repositories in the Aragon App DAO framework.\ncontract PluginRepoRegistry is InterfaceBasedRegistry {\n /// @notice The ID of the permission required to call the `register` function.\n bytes32 public constant REGISTER_PLUGIN_REPO_PERMISSION_ID =\n keccak256(\"REGISTER_PLUGIN_REPO_PERMISSION\");\n\n /// @notice The ENS subdomain registrar registering the PluginRepo subdomains.\n ENSSubdomainRegistrar public subdomainRegistrar;\n\n /// @notice Emitted if a new plugin repository is registered.\n /// @param subdomain The subdomain of the plugin repository.\n /// @param pluginRepo The address of the plugin repository.\n event PluginRepoRegistered(string subdomain, address pluginRepo);\n\n /// @notice Thrown if the plugin subdomain doesn't match the regex `[0-9a-z\\-]`\n error InvalidPluginSubdomain(string subdomain);\n\n /// @notice Thrown if the plugin repository subdomain is empty.\n error EmptyPluginRepoSubdomain();\n\n /// @dev Used to disallow initializing the implementation contract by an attacker for extra safety.\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the contract by setting calling the `InterfaceBasedRegistry` base class initialize method.\n /// @param _dao The address of the managing DAO.\n /// @param _subdomainRegistrar The `ENSSubdomainRegistrar` where `ENS` subdomain will be registered.\n function initialize(IDAO _dao, ENSSubdomainRegistrar _subdomainRegistrar) external initializer {\n bytes4 pluginRepoInterfaceId = type(IPluginRepo).interfaceId;\n __InterfaceBasedRegistry_init(_dao, pluginRepoInterfaceId);\n\n subdomainRegistrar = _subdomainRegistrar;\n }\n\n /// @notice Registers a plugin repository with a subdomain and address.\n /// @param subdomain The subdomain of the PluginRepo.\n /// @param pluginRepo The address of the PluginRepo contract.\n function registerPluginRepo(\n string calldata subdomain,\n address pluginRepo\n ) external auth(REGISTER_PLUGIN_REPO_PERMISSION_ID) {\n if (!(bytes(subdomain).length > 0)) {\n revert EmptyPluginRepoSubdomain();\n }\n\n if (!isSubdomainValid(subdomain)) {\n revert InvalidPluginSubdomain({subdomain: subdomain});\n }\n\n bytes32 labelhash = keccak256(bytes(subdomain));\n subdomainRegistrar.registerSubnode(labelhash, pluginRepo);\n\n _register(pluginRepo);\n\n emit PluginRepoRegistered(subdomain, pluginRepo);\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[49] private __gap;\n}\n" - }, - "@aragon/osx/framework/plugin/setup/IPluginSetup.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {IDAO} from \"../../../core/dao/IDAO.sol\";\n\n/// @title IPluginSetup\n/// @author Aragon Association - 2022-2023\n/// @notice The interface required for a plugin setup contract to be consumed by the `PluginSetupProcessor` for plugin installations, updates, and uninstallations.\ninterface IPluginSetup {\n /// @notice The data associated with a prepared setup.\n /// @param helpers The address array of helpers (contracts or EOAs) associated with this plugin version after the installation or update.\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the installing or updating DAO.\n struct PreparedSetupData {\n address[] helpers;\n PermissionLib.MultiTargetPermission[] permissions;\n }\n\n /// @notice The payload for plugin updates and uninstallations containing the existing contracts as well as optional data to be consumed by the plugin setup.\n /// @param plugin The address of the `Plugin`.\n /// @param currentHelpers The address array of all current helpers (contracts or EOAs) associated with the plugin to update from.\n /// @param data The bytes-encoded data containing the input parameters for the preparation of update/uninstall as specified in the corresponding ABI on the version's metadata.\n struct SetupPayload {\n address plugin;\n address[] currentHelpers;\n bytes data;\n }\n\n /// @notice Prepares the installation of a plugin.\n /// @param _dao The address of the installing DAO.\n /// @param _data The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\n /// @return plugin The address of the `Plugin` contract being prepared for installation.\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n function prepareInstallation(\n address _dao,\n bytes calldata _data\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData);\n\n /// @notice Prepares the update of a plugin.\n /// @param _dao The address of the updating DAO.\n /// @param _currentBuild The build number of the plugin to update from.\n /// @param _payload The relevant data necessary for the `prepareUpdate`. See above.\n /// @return initData The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n function prepareUpdate(\n address _dao,\n uint16 _currentBuild,\n SetupPayload calldata _payload\n ) external returns (bytes memory initData, PreparedSetupData memory preparedSetupData);\n\n /// @notice Prepares the uninstallation of a plugin.\n /// @param _dao The address of the uninstalling DAO.\n /// @param _payload The relevant data necessary for the `prepareUninstallation`. See above.\n /// @return permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\n function prepareUninstallation(\n address _dao,\n SetupPayload calldata _payload\n ) external returns (PermissionLib.MultiTargetPermission[] memory permissions);\n\n /// @notice Returns the plugin implementation address.\n /// @return The address of the plugin implementation contract.\n /// @dev The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n function implementation() external view returns (address);\n}\n" - }, - "@aragon/osx/framework/plugin/setup/PluginSetup.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport {ERC165Checker} from \"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\";\nimport {Clones} from \"@openzeppelin/contracts/proxy/Clones.sol\";\n\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {createERC1967Proxy as createERC1967} from \"../../../utils/Proxy.sol\";\nimport {IPluginSetup} from \"./IPluginSetup.sol\";\n\n/// @title PluginSetup\n/// @author Aragon Association - 2022-2023\n/// @notice An abstract contract that developers have to inherit from to write the setup of a plugin.\nabstract contract PluginSetup is ERC165, IPluginSetup {\n /// @inheritdoc IPluginSetup\n function prepareUpdate(\n address _dao,\n uint16 _currentBuild,\n SetupPayload calldata _payload\n )\n external\n virtual\n override\n returns (bytes memory initData, PreparedSetupData memory preparedSetupData)\n {}\n\n /// @notice A convenience function to create an [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract pointing to an implementation and being associated to a DAO.\n /// @param _implementation The address of the implementation contract to which the proxy is pointing to.\n /// @param _data The data to initialize the storage of the proxy contract.\n /// @return The address of the created proxy contract.\n function createERC1967Proxy(\n address _implementation,\n bytes memory _data\n ) internal returns (address) {\n return createERC1967(_implementation, _data);\n }\n\n /// @notice Checks if this or the parent contract supports an interface by its ID.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n return\n _interfaceId == type(IPluginSetup).interfaceId || super.supportsInterface(_interfaceId);\n }\n}\n" - }, - "@aragon/osx/framework/plugin/setup/PluginSetupProcessor.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {ERC165Checker} from \"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\";\n\nimport {DAO, IDAO} from \"../../../core/dao/DAO.sol\";\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {PluginUUPSUpgradeable} from \"../../../core/plugin/PluginUUPSUpgradeable.sol\";\nimport {IPlugin} from \"../../../core/plugin/IPlugin.sol\";\n\nimport {PluginRepoRegistry} from \"../repo/PluginRepoRegistry.sol\";\nimport {PluginRepo} from \"../repo/PluginRepo.sol\";\n\nimport {IPluginSetup} from \"./IPluginSetup.sol\";\nimport {PluginSetup} from \"./PluginSetup.sol\";\nimport {PluginSetupRef, hashHelpers, hashPermissions, _getPreparedSetupId, _getAppliedSetupId, _getPluginInstallationId, PreparationType} from \"./PluginSetupProcessorHelpers.sol\";\n\n/// @title PluginSetupProcessor\n/// @author Aragon Association - 2022-2023\n/// @notice This contract processes the preparation and application of plugin setups (installation, update, uninstallation) on behalf of a requesting DAO.\n/// @dev This contract is temporarily granted the `ROOT_PERMISSION_ID` permission on the applying DAO and therefore is highly security critical.\ncontract PluginSetupProcessor {\n using ERC165Checker for address;\n\n /// @notice The ID of the permission required to call the `applyInstallation` function.\n bytes32 public constant APPLY_INSTALLATION_PERMISSION_ID =\n keccak256(\"APPLY_INSTALLATION_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `applyUpdate` function.\n bytes32 public constant APPLY_UPDATE_PERMISSION_ID = keccak256(\"APPLY_UPDATE_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `applyUninstallation` function.\n bytes32 public constant APPLY_UNINSTALLATION_PERMISSION_ID =\n keccak256(\"APPLY_UNINSTALLATION_PERMISSION\");\n\n /// @notice The hash obtained from the bytes-encoded empty array to be used for UI updates being required to submit an empty permission array.\n /// @dev The hash is computed via `keccak256(abi.encode([]))`.\n bytes32 private constant EMPTY_ARRAY_HASH =\n 0x569e75fc77c1a856f6daaf9e69d8a9566ca34aa47f9133711ce065a571af0cfd;\n\n /// @notice The hash obtained from the bytes-encoded zero value.\n /// @dev The hash is computed via `keccak256(abi.encode(0))`.\n bytes32 private constant ZERO_BYTES_HASH =\n 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563;\n\n /// @notice A struct containing information related to plugin setups that have been applied.\n /// @param blockNumber The block number at which the `applyInstallation`, `applyUpdate` or `applyUninstallation` was executed.\n /// @param currentAppliedSetupId The current setup id that plugin holds. Needed to confirm that `prepareUpdate` or `prepareUninstallation` happens for the plugin's current/valid dependencies.\n /// @param preparedSetupIdToBlockNumber The mapping between prepared setup IDs and block numbers at which `prepareInstallation`, `prepareUpdate` or `prepareUninstallation` was executed.\n struct PluginState {\n uint256 blockNumber;\n bytes32 currentAppliedSetupId;\n mapping(bytes32 => uint256) preparedSetupIdToBlockNumber;\n }\n\n /// @notice A mapping between the plugin installation ID (obtained from the DAO and plugin address) and the plugin state information.\n /// @dev This variable is public on purpose to allow future versions to access and migrate the storage.\n mapping(bytes32 => PluginState) public states;\n\n /// @notice The struct containing the parameters for the `prepareInstallation` function.\n /// @param pluginSetupRef The reference to the plugin setup to be used for the installation.\n /// @param data The bytes-encoded data containing the input parameters for the installation preparation as specified in the corresponding ABI on the version's metadata.\n struct PrepareInstallationParams {\n PluginSetupRef pluginSetupRef;\n bytes data;\n }\n\n /// @notice The struct containing the parameters for the `applyInstallation` function.\n /// @param pluginSetupRef The reference to the plugin setup used for the installation.\n /// @param plugin The address of the plugin contract to be installed.\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the DAO.\n /// @param helpersHash The hash of helpers that were deployed in `prepareInstallation`. This helps to derive the setup ID.\n struct ApplyInstallationParams {\n PluginSetupRef pluginSetupRef;\n address plugin;\n PermissionLib.MultiTargetPermission[] permissions;\n bytes32 helpersHash;\n }\n\n /// @notice The struct containing the parameters for the `prepareUpdate` function.\n /// @param currentVersionTag The tag of the current plugin version to update from.\n /// @param newVersionTag The tag of the new plugin version to update to.\n /// @param pluginSetupRepo The plugin setup repository address on which the plugin exists.\n /// @param setupPayload The payload containing the plugin and helper contract addresses deployed in a preparation step as well as optional data to be consumed by the plugin setup.\n /// This includes the bytes-encoded data containing the input parameters for the update preparation as specified in the corresponding ABI on the version's metadata.\n struct PrepareUpdateParams {\n PluginRepo.Tag currentVersionTag;\n PluginRepo.Tag newVersionTag;\n PluginRepo pluginSetupRepo;\n IPluginSetup.SetupPayload setupPayload;\n }\n\n /// @notice The struct containing the parameters for the `applyUpdate` function.\n /// @param plugin The address of the plugin contract to be updated.\n /// @param pluginSetupRef The reference to the plugin setup used for the update.\n /// @param initData The encoded data (function selector and arguments) to be provided to `upgradeToAndCall`.\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the DAO.\n /// @param helpersHash The hash of helpers that were deployed in `prepareUpdate`. This helps to derive the setup ID.\n struct ApplyUpdateParams {\n address plugin;\n PluginSetupRef pluginSetupRef;\n bytes initData;\n PermissionLib.MultiTargetPermission[] permissions;\n bytes32 helpersHash;\n }\n\n /// @notice The struct containing the parameters for the `prepareUninstallation` function.\n /// @param pluginSetupRef The reference to the plugin setup to be used for the uninstallation.\n /// @param setupPayload The payload containing the plugin and helper contract addresses deployed in a preparation step as well as optional data to be consumed by the plugin setup.\n /// This includes the bytes-encoded data containing the input parameters for the uninstallation preparation as specified in the corresponding ABI on the version's metadata.\n struct PrepareUninstallationParams {\n PluginSetupRef pluginSetupRef;\n IPluginSetup.SetupPayload setupPayload;\n }\n\n /// @notice The struct containing the parameters for the `applyInstallation` function.\n /// @param plugin The address of the plugin contract to be uninstalled.\n /// @param pluginSetupRef The reference to the plugin setup used for the uninstallation.\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcess.\n struct ApplyUninstallationParams {\n address plugin;\n PluginSetupRef pluginSetupRef;\n PermissionLib.MultiTargetPermission[] permissions;\n }\n\n /// @notice The plugin repo registry listing the `PluginRepo` contracts versioning the `PluginSetup` contracts.\n PluginRepoRegistry public repoRegistry;\n\n /// @notice Thrown if a setup is unauthorized and cannot be applied because of a missing permission of the associated DAO.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param caller The address (EOA or contract) that requested the application of a setup on the associated DAO.\n /// @param permissionId The permission identifier.\n /// @dev This is thrown if the `APPLY_INSTALLATION_PERMISSION_ID`, `APPLY_UPDATE_PERMISSION_ID`, or APPLY_UNINSTALLATION_PERMISSION_ID is missing.\n error SetupApplicationUnauthorized(address dao, address caller, bytes32 permissionId);\n\n /// @notice Thrown if a plugin is not upgradeable.\n /// @param plugin The address of the plugin contract.\n error PluginNonupgradeable(address plugin);\n\n /// @notice Thrown if the upgrade of an `UUPSUpgradeable` proxy contract (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)) failed.\n /// @param proxy The address of the proxy.\n /// @param implementation The address of the implementation contract.\n /// @param initData The initialization data to be passed to the upgradeable plugin contract via `upgradeToAndCall`.\n error PluginProxyUpgradeFailed(address proxy, address implementation, bytes initData);\n\n /// @notice Thrown if a contract does not support the `IPlugin` interface.\n /// @param plugin The address of the contract.\n error IPluginNotSupported(address plugin);\n\n /// @notice Thrown if a plugin repository does not exist on the plugin repo registry.\n error PluginRepoNonexistent();\n\n /// @notice Thrown if a plugin setup was already prepared indicated by the prepared setup ID.\n /// @param preparedSetupId The prepared setup ID.\n error SetupAlreadyPrepared(bytes32 preparedSetupId);\n\n /// @notice Thrown if a prepared setup ID is not eligible to be applied. This can happen if another setup has been already applied or if the setup wasn't prepared in the first place.\n /// @param preparedSetupId The prepared setup ID.\n error SetupNotApplicable(bytes32 preparedSetupId);\n\n /// @notice Thrown if the update version is invalid.\n /// @param currentVersionTag The tag of the current version to update from.\n /// @param newVersionTag The tag of the new version to update to.\n error InvalidUpdateVersion(PluginRepo.Tag currentVersionTag, PluginRepo.Tag newVersionTag);\n\n /// @notice Thrown if plugin is already installed and one tries to prepare or apply install on it.\n error PluginAlreadyInstalled();\n\n /// @notice Thrown if the applied setup ID resulting from the supplied setup payload does not match with the current applied setup ID.\n /// @param currentAppliedSetupId The current applied setup ID with which the data in the supplied payload must match.\n /// @param appliedSetupId The applied setup ID obtained from the data in the supplied setup payload.\n error InvalidAppliedSetupId(bytes32 currentAppliedSetupId, bytes32 appliedSetupId);\n\n /// @notice Emitted with a prepared plugin installation to store data relevant for the application step.\n /// @param sender The sender that prepared the plugin installation.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param preparedSetupId The prepared setup ID obtained from the supplied data.\n /// @param pluginSetupRepo The repository storing the `PluginSetup` contracts of all versions of a plugin.\n /// @param versionTag The version tag of the plugin setup of the prepared installation.\n /// @param data The bytes-encoded data containing the input parameters for the preparation as specified in the corresponding ABI on the version's metadata.\n /// @param plugin The address of the plugin contract.\n /// @param preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n event InstallationPrepared(\n address indexed sender,\n address indexed dao,\n bytes32 preparedSetupId,\n PluginRepo indexed pluginSetupRepo,\n PluginRepo.Tag versionTag,\n bytes data,\n address plugin,\n IPluginSetup.PreparedSetupData preparedSetupData\n );\n\n /// @notice Emitted after a plugin installation was applied.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param plugin The address of the plugin contract.\n /// @param preparedSetupId The prepared setup ID.\n /// @param appliedSetupId The applied setup ID.\n event InstallationApplied(\n address indexed dao,\n address indexed plugin,\n bytes32 preparedSetupId,\n bytes32 appliedSetupId\n );\n\n /// @notice Emitted with a prepared plugin update to store data relevant for the application step.\n /// @param sender The sender that prepared the plugin update.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param preparedSetupId The prepared setup ID.\n /// @param pluginSetupRepo The repository storing the `PluginSetup` contracts of all versions of a plugin.\n /// @param versionTag The version tag of the plugin setup of the prepared update.\n /// @param setupPayload The payload containing the plugin and helper contract addresses deployed in a preparation step as well as optional data to be consumed by the plugin setup.\n /// @param preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n /// @param initData The initialization data to be passed to the upgradeable plugin contract.\n event UpdatePrepared(\n address indexed sender,\n address indexed dao,\n bytes32 preparedSetupId,\n PluginRepo indexed pluginSetupRepo,\n PluginRepo.Tag versionTag,\n IPluginSetup.SetupPayload setupPayload,\n IPluginSetup.PreparedSetupData preparedSetupData,\n bytes initData\n );\n\n /// @notice Emitted after a plugin update was applied.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param plugin The address of the plugin contract.\n /// @param preparedSetupId The prepared setup ID.\n /// @param appliedSetupId The applied setup ID.\n event UpdateApplied(\n address indexed dao,\n address indexed plugin,\n bytes32 preparedSetupId,\n bytes32 appliedSetupId\n );\n\n /// @notice Emitted with a prepared plugin uninstallation to store data relevant for the application step.\n /// @param sender The sender that prepared the plugin uninstallation.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param preparedSetupId The prepared setup ID.\n /// @param pluginSetupRepo The repository storing the `PluginSetup` contracts of all versions of a plugin.\n /// @param versionTag The version tag of the plugin to used for install preparation.\n /// @param setupPayload The payload containing the plugin and helper contract addresses deployed in a preparation step as well as optional data to be consumed by the plugin setup.\n /// @param permissions The list of multi-targeted permission operations to be applied to the installing DAO.\n event UninstallationPrepared(\n address indexed sender,\n address indexed dao,\n bytes32 preparedSetupId,\n PluginRepo indexed pluginSetupRepo,\n PluginRepo.Tag versionTag,\n IPluginSetup.SetupPayload setupPayload,\n PermissionLib.MultiTargetPermission[] permissions\n );\n\n /// @notice Emitted after a plugin installation was applied.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param plugin The address of the plugin contract.\n /// @param preparedSetupId The prepared setup ID.\n event UninstallationApplied(\n address indexed dao,\n address indexed plugin,\n bytes32 preparedSetupId\n );\n\n /// @notice A modifier to check if a caller has the permission to apply a prepared setup.\n /// @param _dao The address of the DAO.\n /// @param _permissionId The permission identifier.\n modifier canApply(address _dao, bytes32 _permissionId) {\n _canApply(_dao, _permissionId);\n _;\n }\n\n /// @notice Constructs the plugin setup processor by setting the associated plugin repo registry.\n /// @param _repoRegistry The plugin repo registry contract.\n constructor(PluginRepoRegistry _repoRegistry) {\n repoRegistry = _repoRegistry;\n }\n\n /// @notice Prepares the installation of a plugin.\n /// @param _dao The address of the installing DAO.\n /// @param _params The struct containing the parameters for the `prepareInstallation` function.\n /// @return plugin The prepared plugin contract address.\n /// @return preparedSetupData The data struct containing the array of helper contracts and permissions that the setup has prepared.\n function prepareInstallation(\n address _dao,\n PrepareInstallationParams calldata _params\n ) external returns (address plugin, IPluginSetup.PreparedSetupData memory preparedSetupData) {\n PluginRepo pluginSetupRepo = _params.pluginSetupRef.pluginSetupRepo;\n\n // Check that the plugin repository exists on the plugin repo registry.\n if (!repoRegistry.entries(address(pluginSetupRepo))) {\n revert PluginRepoNonexistent();\n }\n\n // reverts if not found\n PluginRepo.Version memory version = pluginSetupRepo.getVersion(\n _params.pluginSetupRef.versionTag\n );\n\n // Prepare the installation\n (plugin, preparedSetupData) = PluginSetup(version.pluginSetup).prepareInstallation(\n _dao,\n _params.data\n );\n\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, plugin);\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(preparedSetupData.permissions),\n hashHelpers(preparedSetupData.helpers),\n bytes(\"\"),\n PreparationType.Installation\n );\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n // Check if this plugin is already installed.\n if (pluginState.currentAppliedSetupId != bytes32(0)) {\n revert PluginAlreadyInstalled();\n }\n\n // Check if this setup has already been prepared before and is pending.\n if (pluginState.blockNumber < pluginState.preparedSetupIdToBlockNumber[preparedSetupId]) {\n revert SetupAlreadyPrepared({preparedSetupId: preparedSetupId});\n }\n\n pluginState.preparedSetupIdToBlockNumber[preparedSetupId] = block.number;\n\n emit InstallationPrepared({\n sender: msg.sender,\n dao: _dao,\n preparedSetupId: preparedSetupId,\n pluginSetupRepo: pluginSetupRepo,\n versionTag: _params.pluginSetupRef.versionTag,\n data: _params.data,\n plugin: plugin,\n preparedSetupData: preparedSetupData\n });\n\n return (plugin, preparedSetupData);\n }\n\n /// @notice Applies the permissions of a prepared installation to a DAO.\n /// @param _dao The address of the installing DAO.\n /// @param _params The struct containing the parameters for the `applyInstallation` function.\n function applyInstallation(\n address _dao,\n ApplyInstallationParams calldata _params\n ) external canApply(_dao, APPLY_INSTALLATION_PERMISSION_ID) {\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(_params.permissions),\n _params.helpersHash,\n bytes(\"\"),\n PreparationType.Installation\n );\n\n // Check if this plugin is already installed.\n if (pluginState.currentAppliedSetupId != bytes32(0)) {\n revert PluginAlreadyInstalled();\n }\n\n validatePreparedSetupId(pluginInstallationId, preparedSetupId);\n\n bytes32 appliedSetupId = _getAppliedSetupId(_params.pluginSetupRef, _params.helpersHash);\n\n pluginState.currentAppliedSetupId = appliedSetupId;\n pluginState.blockNumber = block.number;\n\n // Process the permissions, which requires the `ROOT_PERMISSION_ID` from the installing DAO.\n if (_params.permissions.length > 0) {\n DAO(payable(_dao)).applyMultiTargetPermissions(_params.permissions);\n }\n\n emit InstallationApplied({\n dao: _dao,\n plugin: _params.plugin,\n preparedSetupId: preparedSetupId,\n appliedSetupId: appliedSetupId\n });\n }\n\n /// @notice Prepares the update of an UUPS upgradeable plugin.\n /// @param _dao The address of the DAO For which preparation of update happens.\n /// @param _params The struct containing the parameters for the `prepareUpdate` function.\n /// @return initData The initialization data to be passed to upgradeable contracts when the update is applied\n /// @return preparedSetupData The data struct containing the array of helper contracts and permissions that the setup has prepared.\n /// @dev The list of `_params.setupPayload.currentHelpers` has to be specified in the same order as they were returned from previous setups preparation steps (the latest `prepareInstallation` or `prepareUpdate` step that has happend) on which the update is prepared for.\n function prepareUpdate(\n address _dao,\n PrepareUpdateParams calldata _params\n )\n external\n returns (bytes memory initData, IPluginSetup.PreparedSetupData memory preparedSetupData)\n {\n if (\n _params.currentVersionTag.release != _params.newVersionTag.release ||\n _params.currentVersionTag.build >= _params.newVersionTag.build\n ) {\n revert InvalidUpdateVersion({\n currentVersionTag: _params.currentVersionTag,\n newVersionTag: _params.newVersionTag\n });\n }\n\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.setupPayload.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 currentHelpersHash = hashHelpers(_params.setupPayload.currentHelpers);\n\n bytes32 appliedSetupId = _getAppliedSetupId(\n PluginSetupRef(_params.currentVersionTag, _params.pluginSetupRepo),\n currentHelpersHash\n );\n\n // The following check implicitly confirms that plugin is currently installed.\n // Otherwise, `currentAppliedSetupId` would not be set.\n if (pluginState.currentAppliedSetupId != appliedSetupId) {\n revert InvalidAppliedSetupId({\n currentAppliedSetupId: pluginState.currentAppliedSetupId,\n appliedSetupId: appliedSetupId\n });\n }\n\n PluginRepo.Version memory currentVersion = _params.pluginSetupRepo.getVersion(\n _params.currentVersionTag\n );\n\n PluginRepo.Version memory newVersion = _params.pluginSetupRepo.getVersion(\n _params.newVersionTag\n );\n\n bytes32 preparedSetupId;\n\n // If the current and new plugin setup are identical, this is an UI update.\n // In this case, the permission hash is set to the empty array hash and the `prepareUpdate` call is skipped to avoid side effects.\n if (currentVersion.pluginSetup == newVersion.pluginSetup) {\n preparedSetupId = _getPreparedSetupId(\n PluginSetupRef(_params.newVersionTag, _params.pluginSetupRepo),\n EMPTY_ARRAY_HASH,\n currentHelpersHash,\n bytes(\"\"),\n PreparationType.Update\n );\n\n // Because UI updates do not change the plugin functionality, the array of helpers\n // associated with this plugin version `preparedSetupData.helpers` and being returned must\n // equal `_params.setupPayload.currentHelpers` returned by the previous setup step (installation or update )\n // that this update is transitioning from.\n preparedSetupData.helpers = _params.setupPayload.currentHelpers;\n } else {\n // Check that plugin is `PluginUUPSUpgradable`.\n if (!_params.setupPayload.plugin.supportsInterface(type(IPlugin).interfaceId)) {\n revert IPluginNotSupported({plugin: _params.setupPayload.plugin});\n }\n if (IPlugin(_params.setupPayload.plugin).pluginType() != IPlugin.PluginType.UUPS) {\n revert PluginNonupgradeable({plugin: _params.setupPayload.plugin});\n }\n\n // Prepare the update.\n (initData, preparedSetupData) = PluginSetup(newVersion.pluginSetup).prepareUpdate(\n _dao,\n _params.currentVersionTag.build,\n _params.setupPayload\n );\n\n preparedSetupId = _getPreparedSetupId(\n PluginSetupRef(_params.newVersionTag, _params.pluginSetupRepo),\n hashPermissions(preparedSetupData.permissions),\n hashHelpers(preparedSetupData.helpers),\n initData,\n PreparationType.Update\n );\n }\n\n // Check if this setup has already been prepared before and is pending.\n if (pluginState.blockNumber < pluginState.preparedSetupIdToBlockNumber[preparedSetupId]) {\n revert SetupAlreadyPrepared({preparedSetupId: preparedSetupId});\n }\n\n pluginState.preparedSetupIdToBlockNumber[preparedSetupId] = block.number;\n\n // Avoid stack too deep.\n emitPrepareUpdateEvent(_dao, preparedSetupId, _params, preparedSetupData, initData);\n\n return (initData, preparedSetupData);\n }\n\n /// @notice Applies the permissions of a prepared update of an UUPS upgradeable proxy contract to a DAO.\n /// @param _dao The address of the updating DAO.\n /// @param _params The struct containing the parameters for the `applyInstallation` function.\n function applyUpdate(\n address _dao,\n ApplyUpdateParams calldata _params\n ) external canApply(_dao, APPLY_UPDATE_PERMISSION_ID) {\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(_params.permissions),\n _params.helpersHash,\n _params.initData,\n PreparationType.Update\n );\n\n validatePreparedSetupId(pluginInstallationId, preparedSetupId);\n\n bytes32 appliedSetupId = _getAppliedSetupId(_params.pluginSetupRef, _params.helpersHash);\n\n pluginState.blockNumber = block.number;\n pluginState.currentAppliedSetupId = appliedSetupId;\n\n PluginRepo.Version memory version = _params.pluginSetupRef.pluginSetupRepo.getVersion(\n _params.pluginSetupRef.versionTag\n );\n\n address currentImplementation = PluginUUPSUpgradeable(_params.plugin).implementation();\n address newImplementation = PluginSetup(version.pluginSetup).implementation();\n\n if (currentImplementation != newImplementation) {\n _upgradeProxy(_params.plugin, newImplementation, _params.initData);\n }\n\n // Process the permissions, which requires the `ROOT_PERMISSION_ID` from the updating DAO.\n if (_params.permissions.length > 0) {\n DAO(payable(_dao)).applyMultiTargetPermissions(_params.permissions);\n }\n\n emit UpdateApplied({\n dao: _dao,\n plugin: _params.plugin,\n preparedSetupId: preparedSetupId,\n appliedSetupId: appliedSetupId\n });\n }\n\n /// @notice Prepares the uninstallation of a plugin.\n /// @param _dao The address of the uninstalling DAO.\n /// @param _params The struct containing the parameters for the `prepareUninstallation` function.\n /// @return permissions The list of multi-targeted permission operations to be applied to the uninstalling DAO.\n /// @dev The list of `_params.setupPayload.currentHelpers` has to be specified in the same order as they were returned from previous setups preparation steps (the latest `prepareInstallation` or `prepareUpdate` step that has happend) on which the uninstallation was prepared for.\n function prepareUninstallation(\n address _dao,\n PrepareUninstallationParams calldata _params\n ) external returns (PermissionLib.MultiTargetPermission[] memory permissions) {\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.setupPayload.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 appliedSetupId = _getAppliedSetupId(\n _params.pluginSetupRef,\n hashHelpers(_params.setupPayload.currentHelpers)\n );\n\n if (pluginState.currentAppliedSetupId != appliedSetupId) {\n revert InvalidAppliedSetupId({\n currentAppliedSetupId: pluginState.currentAppliedSetupId,\n appliedSetupId: appliedSetupId\n });\n }\n\n PluginRepo.Version memory version = _params.pluginSetupRef.pluginSetupRepo.getVersion(\n _params.pluginSetupRef.versionTag\n );\n\n permissions = PluginSetup(version.pluginSetup).prepareUninstallation(\n _dao,\n _params.setupPayload\n );\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(permissions),\n ZERO_BYTES_HASH,\n bytes(\"\"),\n PreparationType.Uninstallation\n );\n\n // Check if this setup has already been prepared before and is pending.\n if (pluginState.blockNumber < pluginState.preparedSetupIdToBlockNumber[preparedSetupId]) {\n revert SetupAlreadyPrepared({preparedSetupId: preparedSetupId});\n }\n\n pluginState.preparedSetupIdToBlockNumber[preparedSetupId] = block.number;\n\n emit UninstallationPrepared({\n sender: msg.sender,\n dao: _dao,\n preparedSetupId: preparedSetupId,\n pluginSetupRepo: _params.pluginSetupRef.pluginSetupRepo,\n versionTag: _params.pluginSetupRef.versionTag,\n setupPayload: _params.setupPayload,\n permissions: permissions\n });\n }\n\n /// @notice Applies the permissions of a prepared uninstallation to a DAO.\n /// @param _dao The address of the DAO.\n /// @param _dao The address of the uninstalling DAO.\n /// @param _params The struct containing the parameters for the `applyUninstallation` function.\n /// @dev The list of `_params.setupPayload.currentHelpers` has to be specified in the same order as they were returned from previous setups preparation steps (the latest `prepareInstallation` or `prepareUpdate` step that has happend) on which the uninstallation was prepared for.\n function applyUninstallation(\n address _dao,\n ApplyUninstallationParams calldata _params\n ) external canApply(_dao, APPLY_UNINSTALLATION_PERMISSION_ID) {\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(_params.permissions),\n ZERO_BYTES_HASH,\n bytes(\"\"),\n PreparationType.Uninstallation\n );\n\n validatePreparedSetupId(pluginInstallationId, preparedSetupId);\n\n // Since the plugin is uninstalled, only the current block number must be updated.\n pluginState.blockNumber = block.number;\n pluginState.currentAppliedSetupId = bytes32(0);\n\n // Process the permissions, which requires the `ROOT_PERMISSION_ID` from the uninstalling DAO.\n if (_params.permissions.length > 0) {\n DAO(payable(_dao)).applyMultiTargetPermissions(_params.permissions);\n }\n\n emit UninstallationApplied({\n dao: _dao,\n plugin: _params.plugin,\n preparedSetupId: preparedSetupId\n });\n }\n\n /// @notice Validates that a setup ID can be applied for `applyInstallation`, `applyUpdate`, or `applyUninstallation`.\n /// @param pluginInstallationId The plugin installation ID obtained from the hash of `abi.encode(daoAddress, pluginAddress)`.\n /// @param preparedSetupId The prepared setup ID to be validated.\n /// @dev If the block number stored in `states[pluginInstallationId].blockNumber` exceeds the one stored in `pluginState.preparedSetupIdToBlockNumber[preparedSetupId]`, the prepared setup with `preparedSetupId` is outdated and not applicable anymore.\n function validatePreparedSetupId(\n bytes32 pluginInstallationId,\n bytes32 preparedSetupId\n ) public view {\n PluginState storage pluginState = states[pluginInstallationId];\n if (pluginState.blockNumber >= pluginState.preparedSetupIdToBlockNumber[preparedSetupId]) {\n revert SetupNotApplicable({preparedSetupId: preparedSetupId});\n }\n }\n\n /// @notice Upgrades a UUPS upgradeable proxy contract (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @param _proxy The address of the proxy.\n /// @param _implementation The address of the implementation contract.\n /// @param _initData The initialization data to be passed to the upgradeable plugin contract via `upgradeToAndCall`.\n function _upgradeProxy(\n address _proxy,\n address _implementation,\n bytes memory _initData\n ) private {\n if (_initData.length > 0) {\n try\n PluginUUPSUpgradeable(_proxy).upgradeToAndCall(_implementation, _initData)\n {} catch Error(string memory reason) {\n revert(reason);\n } catch (bytes memory /*lowLevelData*/) {\n revert PluginProxyUpgradeFailed({\n proxy: _proxy,\n implementation: _implementation,\n initData: _initData\n });\n }\n } else {\n try PluginUUPSUpgradeable(_proxy).upgradeTo(_implementation) {} catch Error(\n string memory reason\n ) {\n revert(reason);\n } catch (bytes memory /*lowLevelData*/) {\n revert PluginProxyUpgradeFailed({\n proxy: _proxy,\n implementation: _implementation,\n initData: _initData\n });\n }\n }\n }\n\n /// @notice Checks if a caller can apply a setup. The caller can be either the DAO to which the plugin setup is applied to or another account to which the DAO has granted the respective permission.\n /// @param _dao The address of the applying DAO.\n /// @param _permissionId The permission ID.\n function _canApply(address _dao, bytes32 _permissionId) private view {\n if (\n msg.sender != _dao &&\n !DAO(payable(_dao)).hasPermission(address(this), msg.sender, _permissionId, bytes(\"\"))\n ) {\n revert SetupApplicationUnauthorized({\n dao: _dao,\n caller: msg.sender,\n permissionId: _permissionId\n });\n }\n }\n\n /// @notice A helper to emit the `UpdatePrepared` event from the supplied, structured data.\n /// @param _dao The address of the updating DAO.\n /// @param _preparedSetupId The prepared setup ID.\n /// @param _params The struct containing the parameters for the `prepareUpdate` function.\n /// @param _preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n /// @param _initData The initialization data to be passed to upgradeable contracts when the update is applied\n /// @dev This functions exists to avoid stack-too-deep errors.\n function emitPrepareUpdateEvent(\n address _dao,\n bytes32 _preparedSetupId,\n PrepareUpdateParams calldata _params,\n IPluginSetup.PreparedSetupData memory _preparedSetupData,\n bytes memory _initData\n ) private {\n emit UpdatePrepared({\n sender: msg.sender,\n dao: _dao,\n preparedSetupId: _preparedSetupId,\n pluginSetupRepo: _params.pluginSetupRepo,\n versionTag: _params.newVersionTag,\n setupPayload: _params.setupPayload,\n preparedSetupData: _preparedSetupData,\n initData: _initData\n });\n }\n}\n" - }, - "@aragon/osx/framework/plugin/setup/PluginSetupProcessorHelpers.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {PluginRepo} from \"../repo/PluginRepo.sol\";\nimport {PluginSetup} from \"./PluginSetup.sol\";\n\n/// @notice The struct containing a reference to a plugin setup by specifying the containing plugin repository and the associated version tag.\n/// @param versionTag The tag associated with the plugin setup version.\n/// @param pluginSetupRepo The plugin setup repository.\nstruct PluginSetupRef {\n PluginRepo.Tag versionTag;\n PluginRepo pluginSetupRepo;\n}\n\n/// @notice The different types describing a prepared setup.\n/// @param None The default indicating the lack of a preparation type.\n/// @param Installation The prepared setup installs a new plugin.\n/// @param Update The prepared setup updates an existing plugin.\n/// @param Uninstallation The prepared setup uninstalls an existing plugin.\nenum PreparationType {\n None,\n Installation,\n Update,\n Uninstallation\n}\n\n/// @notice Returns an ID for plugin installation by hashing the DAO and plugin address.\n/// @param _dao The address of the DAO conducting the setup.\n/// @param _plugin The plugin address.\nfunction _getPluginInstallationId(address _dao, address _plugin) pure returns (bytes32) {\n return keccak256(abi.encode(_dao, _plugin));\n}\n\n/// @notice Returns an ID for prepared setup obtained from hashing characterizing elements.\n/// @param _pluginSetupRef The reference of the plugin setup containing plugin setup repo and version tag.\n/// @param _permissionsHash The hash of the permission operations requested by the setup.\n/// @param _helpersHash The hash of the helper contract addresses.\n/// @param _data The bytes-encoded initialize data for the upgrade that is returned by `prepareUpdate`.\n/// @param _preparationType The type of preparation the plugin is currently undergoing. Without this, it is possible to call `applyUpdate` even after `applyInstallation` is called.\n/// @return The prepared setup id.\nfunction _getPreparedSetupId(\n PluginSetupRef memory _pluginSetupRef,\n bytes32 _permissionsHash,\n bytes32 _helpersHash,\n bytes memory _data,\n PreparationType _preparationType\n) pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n _pluginSetupRef.versionTag,\n _pluginSetupRef.pluginSetupRepo,\n _permissionsHash,\n _helpersHash,\n keccak256(_data),\n _preparationType\n )\n );\n}\n\n/// @notice Returns an identifier for applied installations.\n/// @param _pluginSetupRef The reference of the plugin setup containing plugin setup repo and version tag.\n/// @param _helpersHash The hash of the helper contract addresses.\n/// @return The applied setup id.\nfunction _getAppliedSetupId(\n PluginSetupRef memory _pluginSetupRef,\n bytes32 _helpersHash\n) pure returns (bytes32) {\n return\n keccak256(\n abi.encode(_pluginSetupRef.versionTag, _pluginSetupRef.pluginSetupRepo, _helpersHash)\n );\n}\n\n/// @notice Returns a hash of an array of helper addresses (contracts or EOAs).\n/// @param _helpers The array of helper addresses (contracts or EOAs) to be hashed.\nfunction hashHelpers(address[] memory _helpers) pure returns (bytes32) {\n return keccak256(abi.encode(_helpers));\n}\n\n/// @notice Returns a hash of an array of multi-targeted permission operations.\n/// @param _permissions The array of of multi-targeted permission operations.\n/// @return The hash of the array of permission operations.\nfunction hashPermissions(\n PermissionLib.MultiTargetPermission[] memory _permissions\n) pure returns (bytes32) {\n return keccak256(abi.encode(_permissions));\n}\n" - }, - "@aragon/osx/framework/utils/ens/ENSSubdomainRegistrar.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport \"@ensdomains/ens-contracts/contracts/registry/ENS.sol\";\nimport \"@ensdomains/ens-contracts/contracts/resolvers/Resolver.sol\";\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport {DaoAuthorizableUpgradeable} from \"../../../core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\";\nimport {IDAO} from \"../../../core/dao/IDAO.sol\";\n\n/// @title ENSSubdomainRegistrar\n/// @author Aragon Association - 2022-2023\n/// @notice This contract registers ENS subdomains under a parent domain specified in the initialization process and maintains ownership of the subdomain since only the resolver address is set. This contract must either be the domain node owner or an approved operator of the node owner. The default resolver being used is the one specified in the parent domain.\ncontract ENSSubdomainRegistrar is UUPSUpgradeable, DaoAuthorizableUpgradeable {\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\n bytes32 public constant UPGRADE_REGISTRAR_PERMISSION_ID =\n keccak256(\"UPGRADE_REGISTRAR_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `registerSubnode` and `setDefaultResolver` function.\n bytes32 public constant REGISTER_ENS_SUBDOMAIN_PERMISSION_ID =\n keccak256(\"REGISTER_ENS_SUBDOMAIN_PERMISSION\");\n\n /// @notice The ENS registry contract\n ENS public ens;\n\n /// @notice The namehash of the domain on which subdomains are registered.\n bytes32 public node;\n\n /// @notice The address of the ENS resolver resolving the names to an address.\n address public resolver;\n\n /// @notice Thrown if the subnode is already registered.\n /// @param subnode The subnode namehash.\n /// @param nodeOwner The node owner address.\n error AlreadyRegistered(bytes32 subnode, address nodeOwner);\n\n /// @notice Thrown if node's resolver is invalid.\n /// @param node The node namehash.\n /// @param resolver The node resolver address.\n error InvalidResolver(bytes32 node, address resolver);\n\n /// @dev Used to disallow initializing the implementation contract by an attacker for extra safety.\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the component by\n /// - checking that the contract is the domain node owner or an approved operator\n /// - initializing the underlying component\n /// - registering the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID\n /// - setting the ENS contract, the domain node hash, and resolver.\n /// @param _managingDao The interface of the DAO managing the components permissions.\n /// @param _ens The interface of the ENS registry to be used.\n /// @param _node The ENS parent domain node under which the subdomains are to be registered.\n function initialize(IDAO _managingDao, ENS _ens, bytes32 _node) external initializer {\n __DaoAuthorizableUpgradeable_init(_managingDao);\n\n ens = _ens;\n node = _node;\n\n address nodeResolver = ens.resolver(_node);\n\n if (nodeResolver == address(0)) {\n revert InvalidResolver({node: _node, resolver: nodeResolver});\n }\n\n resolver = nodeResolver;\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_REGISTRAR_PERMISSION_ID` permission.\n function _authorizeUpgrade(\n address\n ) internal virtual override auth(UPGRADE_REGISTRAR_PERMISSION_ID) {}\n\n /// @notice Registers a new subdomain with this registrar as the owner and set the target address in the resolver.\n /// @dev It reverts with no message if this contract isn't the owner nor an approved operator for the given node.\n /// @param _label The labelhash of the subdomain name.\n /// @param _targetAddress The address to which the subdomain resolves.\n function registerSubnode(\n bytes32 _label,\n address _targetAddress\n ) external auth(REGISTER_ENS_SUBDOMAIN_PERMISSION_ID) {\n bytes32 subnode = keccak256(abi.encodePacked(node, _label));\n address currentOwner = ens.owner(subnode);\n\n if (currentOwner != address(0)) {\n revert AlreadyRegistered(subnode, currentOwner);\n }\n\n ens.setSubnodeOwner(node, _label, address(this));\n ens.setResolver(subnode, resolver);\n Resolver(resolver).setAddr(subnode, _targetAddress);\n }\n\n /// @notice Sets the default resolver contract address that the subdomains being registered will use.\n /// @param _resolver The resolver contract to be used.\n function setDefaultResolver(\n address _resolver\n ) external auth(REGISTER_ENS_SUBDOMAIN_PERMISSION_ID) {\n if (_resolver == address(0)) {\n revert InvalidResolver({node: node, resolver: _resolver});\n }\n\n resolver = _resolver;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[47] private __gap;\n}\n" - }, - "@aragon/osx/framework/utils/InterfaceBasedRegistry.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {ERC165CheckerUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\";\n\nimport {DaoAuthorizableUpgradeable} from \"../../core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\";\nimport {IDAO} from \"../../core/dao/IDAO.sol\";\n\n/// @title InterfaceBasedRegistry\n/// @author Aragon Association - 2022-2023\n/// @notice An [ERC-165](https://eips.ethereum.org/EIPS/eip-165)-based registry for contracts\nabstract contract InterfaceBasedRegistry is UUPSUpgradeable, DaoAuthorizableUpgradeable {\n using ERC165CheckerUpgradeable for address;\n\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\n bytes32 public constant UPGRADE_REGISTRY_PERMISSION_ID =\n keccak256(\"UPGRADE_REGISTRY_PERMISSION\");\n\n /// @notice The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID that the target contracts being registered must support.\n bytes4 public targetInterfaceId;\n\n /// @notice The mapping containing the registry entries returning true for registered contract addresses.\n mapping(address => bool) public entries;\n\n /// @notice Thrown if the contract is already registered.\n /// @param registrant The address of the contract to be registered.\n error ContractAlreadyRegistered(address registrant);\n\n /// @notice Thrown if the contract does not support the required interface.\n /// @param registrant The address of the contract to be registered.\n error ContractInterfaceInvalid(address registrant);\n\n /// @notice Thrown if the contract does not support ERC165.\n /// @param registrant The address of the contract.\n error ContractERC165SupportInvalid(address registrant);\n\n /// @notice Initializes the component.\n /// @dev This is required for the UUPS upgradability pattern.\n /// @param _managingDao The interface of the DAO managing the components permissions.\n /// @param _targetInterfaceId The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface id of the contracts to be registered.\n function __InterfaceBasedRegistry_init(\n IDAO _managingDao,\n bytes4 _targetInterfaceId\n ) internal virtual onlyInitializing {\n __DaoAuthorizableUpgradeable_init(_managingDao);\n\n targetInterfaceId = _targetInterfaceId;\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_REGISTRY_PERMISSION_ID` permission.\n function _authorizeUpgrade(\n address\n ) internal virtual override auth(UPGRADE_REGISTRY_PERMISSION_ID) {}\n\n /// @notice Register an [ERC-165](https://eips.ethereum.org/EIPS/eip-165) contract address.\n /// @dev The managing DAO needs to grant REGISTER_PERMISSION_ID to registrar.\n /// @param _registrant The address of an [ERC-165](https://eips.ethereum.org/EIPS/eip-165) contract.\n function _register(address _registrant) internal {\n if (entries[_registrant]) {\n revert ContractAlreadyRegistered({registrant: _registrant});\n }\n\n // Will revert if address is not a contract or doesn't fully support targetInterfaceId + ERC165.\n if (!_registrant.supportsInterface(targetInterfaceId)) {\n revert ContractInterfaceInvalid(_registrant);\n }\n\n entries[_registrant] = true;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[48] private __gap;\n}\n" - }, - "@aragon/osx/framework/utils/RegistryUtils.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @notice Validates that a subdomain name is composed only from characters in the allowed character set:\n/// - the lowercase letters `a-z`\n/// - the digits `0-9`\n/// - the hyphen `-`\n/// @dev This function allows empty (zero-length) subdomains. If this should not be allowed, make sure to add a respective check when using this function in your code.\n/// @param subDomain The name of the DAO.\n/// @return `true` if the name is valid or `false` if at least one char is invalid.\n/// @dev Aborts on the first invalid char found.\nfunction isSubdomainValid(string calldata subDomain) pure returns (bool) {\n bytes calldata nameBytes = bytes(subDomain);\n uint256 nameLength = nameBytes.length;\n for (uint256 i; i < nameLength; i++) {\n uint8 char = uint8(nameBytes[i]);\n\n // if char is between a-z\n if (char > 96 && char < 123) {\n continue;\n }\n\n // if char is between 0-9\n if (char > 47 && char < 58) {\n continue;\n }\n\n // if char is -\n if (char == 45) {\n continue;\n }\n\n // invalid if one char doesn't work with the rules above\n return false;\n }\n return true;\n}\n" - }, - "@aragon/osx/utils/protocol/IProtocolVersion.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IProtocolVersion\n/// @author Aragon Association - 2022-2023\n/// @notice An interface defining the semantic OSx protocol version.\ninterface IProtocolVersion {\n /// @notice Returns the protocol version at which the current contract was built. Use it to check for future upgrades that might be applicable.\n /// @return _version Returns the semantic OSx protocol version.\n function protocolVersion() external view returns (uint8[3] memory _version);\n}\n" - }, - "@aragon/osx/utils/protocol/ProtocolVersion.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {IProtocolVersion} from \"./IProtocolVersion.sol\";\n\n/// @title ProtocolVersion\n/// @author Aragon Association - 2023\n/// @notice An abstract, stateless, non-upgradeable contract serves as a base for other contracts requiring awareness of the OSx protocol version.\n/// @dev Do not add any new variables to this contract that would shift down storage in the inheritance chain.\nabstract contract ProtocolVersion is IProtocolVersion {\n // IMPORTANT: Do not add any storage variable, see the above notice.\n\n /// @inheritdoc IProtocolVersion\n function protocolVersion() public pure returns (uint8[3] memory) {\n return [1, 3, 0];\n }\n}\n" - }, - "@aragon/osx/utils/Proxy.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\";\n\n/// @notice Free function to create a [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract based on the passed base contract address.\n/// @param _logic The base contract address.\n/// @param _data The constructor arguments for this contract.\n/// @return The address of the proxy contract created.\n/// @dev Initializes the upgradeable proxy with an initial implementation specified by _logic. If _data is non-empty, itā€™s used as data in a delegate call to _logic. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor (see [OpenZeppelin ERC1967Proxy-constructor](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Proxy-constructor-address-bytes-)).\nfunction createERC1967Proxy(address _logic, bytes memory _data) returns (address) {\n return address(new ERC1967Proxy(_logic, _data));\n}\n" - }, - "@ensdomains/ens-contracts/contracts/registry/ENS.sol": { - "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IABIResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IABIResolver {\n event ABIChanged(bytes32 indexed node, uint256 indexed contentType);\n\n /**\n * Returns the ABI associated with an ENS node.\n * Defined in EIP205.\n * @param node The ENS node to query\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\n * @return contentType The content type of the return value\n * @return data The ABI data\n */\n function ABI(\n bytes32 node,\n uint256 contentTypes\n ) external view returns (uint256, bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the new (multicoin) addr function.\n */\ninterface IAddressResolver {\n event AddressChanged(\n bytes32 indexed node,\n uint256 coinType,\n bytes newAddress\n );\n\n function addr(\n bytes32 node,\n uint256 coinType\n ) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the legacy (ETH-only) addr function.\n */\ninterface IAddrResolver {\n event AddrChanged(bytes32 indexed node, address a);\n\n /**\n * Returns the address associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated address.\n */\n function addr(bytes32 node) external view returns (address payable);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IContentHashResolver {\n event ContenthashChanged(bytes32 indexed node, bytes hash);\n\n /**\n * Returns the contenthash associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function contenthash(bytes32 node) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IDNSRecordResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSRecordResolver {\n // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.\n event DNSRecordChanged(\n bytes32 indexed node,\n bytes name,\n uint16 resource,\n bytes record\n );\n // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.\n event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);\n\n /**\n * Obtain a DNS record.\n * @param node the namehash of the node for which to fetch the record\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\n * @return the DNS record in wire format if present, otherwise empty\n */\n function dnsRecord(\n bytes32 node,\n bytes32 name,\n uint16 resource\n ) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IDNSZoneResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSZoneResolver {\n // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.\n event DNSZonehashChanged(\n bytes32 indexed node,\n bytes lastzonehash,\n bytes zonehash\n );\n\n /**\n * zonehash obtains the hash for the zone.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function zonehash(bytes32 node) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IExtendedResolver {\n function resolve(\n bytes memory name,\n bytes memory data\n ) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IInterfaceResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IInterfaceResolver {\n event InterfaceChanged(\n bytes32 indexed node,\n bytes4 indexed interfaceID,\n address implementer\n );\n\n /**\n * Returns the address of a contract that implements the specified interface for this name.\n * If an implementer has not been set for this interfaceID and name, the resolver will query\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\n * will be returned.\n * @param node The ENS node to query.\n * @param interfaceID The EIP 165 interface ID to check for.\n * @return The address that implements this interface, or 0 if the interface is unsupported.\n */\n function interfaceImplementer(\n bytes32 node,\n bytes4 interfaceID\n ) external view returns (address);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IPubkeyResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IPubkeyResolver {\n event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);\n\n /**\n * Returns the SECP256k1 public key associated with an ENS node.\n * Defined in EIP 619.\n * @param node The ENS node to query\n * @return x The X coordinate of the curve point for the public key.\n * @return y The Y coordinate of the curve point for the public key.\n */\n function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/Resolver.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"./profiles/IABIResolver.sol\";\nimport \"./profiles/IAddressResolver.sol\";\nimport \"./profiles/IAddrResolver.sol\";\nimport \"./profiles/IContentHashResolver.sol\";\nimport \"./profiles/IDNSRecordResolver.sol\";\nimport \"./profiles/IDNSZoneResolver.sol\";\nimport \"./profiles/IInterfaceResolver.sol\";\nimport \"./profiles/INameResolver.sol\";\nimport \"./profiles/IPubkeyResolver.sol\";\nimport \"./profiles/ITextResolver.sol\";\nimport \"./profiles/IExtendedResolver.sol\";\n\n/**\n * A generic resolver interface which includes all the functions including the ones deprecated\n */\ninterface Resolver is\n IERC165,\n IABIResolver,\n IAddressResolver,\n IAddrResolver,\n IContentHashResolver,\n IDNSRecordResolver,\n IDNSZoneResolver,\n IInterfaceResolver,\n INameResolver,\n IPubkeyResolver,\n ITextResolver,\n IExtendedResolver\n{\n /* Deprecated events */\n event ContentChanged(bytes32 indexed node, bytes32 hash);\n\n function setABI(\n bytes32 node,\n uint256 contentType,\n bytes calldata data\n ) external;\n\n function setAddr(bytes32 node, address addr) external;\n\n function setAddr(bytes32 node, uint256 coinType, bytes calldata a) external;\n\n function setContenthash(bytes32 node, bytes calldata hash) external;\n\n function setDnsrr(bytes32 node, bytes calldata data) external;\n\n function setName(bytes32 node, string calldata _name) external;\n\n function setPubkey(bytes32 node, bytes32 x, bytes32 y) external;\n\n function setText(\n bytes32 node,\n string calldata key,\n string calldata value\n ) external;\n\n function setInterface(\n bytes32 node,\n bytes4 interfaceID,\n address implementer\n ) external;\n\n function multicall(\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n function multicallWithNodeCheck(\n bytes32 nodehash,\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n /* Deprecated functions */\n function content(bytes32 node) external view returns (bytes32);\n\n function multihash(bytes32 node) external view returns (bytes memory);\n\n function setContent(bytes32 node, bytes32 hash) external;\n\n function setMultihash(bytes32 node, bytes calldata hash) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.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 IERC1822ProxiableUpgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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.8.3._\n */\ninterface IERC1967Upgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.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 IBeaconUpgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../interfaces/IERC1967Upgradeable.sol\";\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.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 */\nabstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {\n function __ERC1967Upgrade_init() internal onlyInitializing {\n }\n\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\n }\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlotUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n AddressUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) 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 (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822ProxiableUpgradeable(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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlotUpgradeable.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(address newBeacon, bytes memory data, bool forceCall) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\n function __UUPSUpgradeable_init() internal onlyInitializing {\n }\n\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n }\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\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. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n *\n * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n */\n function upgradeTo(address newImplementation) public virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n *\n * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155ReceiverUpgradeable is IERC165Upgradeable {\n /**\n * @dev Handles the receipt of a single ERC1155 token type. This function is\n * called at the end of a `safeTransferFrom` after the balance has been updated.\n *\n * NOTE: To accept the transfer, this must return\n * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n * (i.e. 0xf23a6e61, or its own function selector).\n *\n * @param operator The address which initiated the transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param id The ID of the token being transferred\n * @param value 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)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\n * is called at the end of a `safeBatchTransferFrom` after the balances have\n * been updated.\n *\n * NOTE: To accept the transfer(s), this must return\n * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n * (i.e. 0xbc197c81, or its own function selector).\n *\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155Upgradeable is IERC165Upgradeable {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] calldata accounts,\n uint256[] calldata ids\n ) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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 IERC20PermitUpgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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 IERC20Upgradeable {\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(address from, address to, uint256 amount) external returns (bool);\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\nimport \"../extensions/IERC20PermitUpgradeable.sol\";\nimport \"../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable {\n using AddressUpgradeable for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) 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(IERC20Upgradeable token, address spender, uint256 value) 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 /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\n * 0 before setting it to a non-zero value.\n */\n function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20PermitUpgradeable 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(IERC20Upgradeable 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 require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation 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 * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\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 cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721ReceiverUpgradeable {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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" - }, - "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\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 ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\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 /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165CheckerUpgradeable {\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n /**\n * @dev Returns true if `account` supports the {IERC165} interface.\n */\n function supportsERC165(address account) internal view returns (bool) {\n // Any contract that implements ERC165 must explicitly indicate support of\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n return\n supportsERC165InterfaceUnchecked(account, type(IERC165Upgradeable).interfaceId) &&\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\n }\n\n /**\n * @dev Returns true if `account` supports the interface defined by\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n // query support of both ERC165 as per the spec and support of _interfaceId\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\n }\n\n /**\n * @dev Returns a boolean array where each value corresponds to the\n * interfaces passed in and whether they're supported or not. This allows\n * you to batch check interfaces for a contract where your expectation\n * is that some interfaces may not be supported.\n *\n * See {IERC165-supportsInterface}.\n *\n * _Available since v3.4._\n */\n function getSupportedInterfaces(\n address account,\n bytes4[] memory interfaceIds\n ) internal view returns (bool[] memory) {\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n // query support of ERC165 itself\n if (supportsERC165(account)) {\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\n }\n }\n\n return interfaceIdsSupported;\n }\n\n /**\n * @dev Returns true if `account` supports all the interfaces defined in\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n *\n * Batch-querying can lead to gas savings by skipping repeated checks for\n * {IERC165} support.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n // query support of ERC165 itself\n if (!supportsERC165(account)) {\n return false;\n }\n\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\n return false;\n }\n }\n\n // all interfaces supported\n return true;\n }\n\n /**\n * @notice Query if a contract implements an interface, does not check ERC165 support\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return true if the contract at account indicates support of the interface with\n * identifier interfaceId, false otherwise\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\n * the behavior of this method is undefined. This precondition can be checked\n * with {supportsERC165}.\n *\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\n * should be exercised when using this function.\n *\n * Interface identification is specified in ERC-165.\n */\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\n // prepare call\n bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId);\n\n // perform static call\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly {\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0x00)\n }\n\n return success && returnSize >= 0x20 && returnValue > 0;\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Storage based implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable {\n function __ERC165Storage_init() internal onlyInitializing {\n }\n\n function __ERC165Storage_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev Mapping of interface ids to whether or not it's supported.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId];\n }\n\n /**\n * @dev Registers the contract as an implementer of the interface defined by\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\n * registering its interface id is not required.\n *\n * See {IERC165-supportsInterface}.\n *\n * Requirements:\n *\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n */\n function _registerInterface(bytes4 interfaceId) internal virtual {\n require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n _supportedInterfaces[interfaceId] = true;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal onlyInitializing {\n }\n\n function __ERC165_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\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 * ```solidity\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`, `uint256`._\n * _Available since v4.9 for `string`, `bytes`._\n */\nlibrary StorageSlotUpgradeable {\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 struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes 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 /**\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n}\n" - }, - "@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" - }, - "@openzeppelin/contracts/interfaces/IERC1271.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" - }, - "@openzeppelin/contracts/interfaces/IERC1967.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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.8.3._\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" - }, - "@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" - }, - "@openzeppelin/contracts/proxy/Clones.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n *\n * _Available since v3.4._\n */\nlibrary Clones {\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create opcode, which should never revert.\n */\n function clone(address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create(0, 0x09, 0x37)\n }\n require(instance != address(0), \"ERC1167: create failed\");\n }\n\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `implementation` and `salt` multiple time will revert, since\n * the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create2(0, 0x09, 0x37, salt)\n }\n require(instance != address(0), \"ERC1167: create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(add(ptr, 0x38), deployer)\n mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\n mstore(add(ptr, 0x14), implementation)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\n mstore(add(ptr, 0x58), salt)\n mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\n predicted := keccak256(add(ptr, 0x43), 0x55)\n }\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n bytes32 salt\n ) internal view returns (address predicted) {\n return predictDeterministicAddress(implementation, salt, address(this));\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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 */\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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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(address newBeacon, bytes memory data, bool forceCall) 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" - }, - "@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" - }, - "@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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" - }, - "@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" - }, - "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165Checker {\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n /**\n * @dev Returns true if `account` supports the {IERC165} interface.\n */\n function supportsERC165(address account) internal view returns (bool) {\n // Any contract that implements ERC165 must explicitly indicate support of\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n return\n supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\n }\n\n /**\n * @dev Returns true if `account` supports the interface defined by\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n // query support of both ERC165 as per the spec and support of _interfaceId\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\n }\n\n /**\n * @dev Returns a boolean array where each value corresponds to the\n * interfaces passed in and whether they're supported or not. This allows\n * you to batch check interfaces for a contract where your expectation\n * is that some interfaces may not be supported.\n *\n * See {IERC165-supportsInterface}.\n *\n * _Available since v3.4._\n */\n function getSupportedInterfaces(\n address account,\n bytes4[] memory interfaceIds\n ) internal view returns (bool[] memory) {\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n // query support of ERC165 itself\n if (supportsERC165(account)) {\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\n }\n }\n\n return interfaceIdsSupported;\n }\n\n /**\n * @dev Returns true if `account` supports all the interfaces defined in\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n *\n * Batch-querying can lead to gas savings by skipping repeated checks for\n * {IERC165} support.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n // query support of ERC165 itself\n if (!supportsERC165(account)) {\n return false;\n }\n\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\n return false;\n }\n }\n\n // all interfaces supported\n return true;\n }\n\n /**\n * @notice Query if a contract implements an interface, does not check ERC165 support\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return true if the contract at account indicates support of the interface with\n * identifier interfaceId, false otherwise\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\n * the behavior of this method is undefined. This precondition can be checked\n * with {supportsERC165}.\n *\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\n * should be exercised when using this function.\n *\n * Interface identification is specified in ERC-165.\n */\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\n // prepare call\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\n\n // perform static call\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly {\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0x00)\n }\n\n return success && returnSize >= 0x20 && returnValue > 0;\n }\n}\n" - }, - "@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" - }, - "@openzeppelin/contracts/utils/StorageSlot.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\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 * ```solidity\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`, `uint256`._\n * _Available since v4.9 for `string`, `bytes`._\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 struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes 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 /**\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n}\n" - }, - "src/Migrations.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n// Import all contracts from other repositories to make the openzeppelin-upgrades package work to deploy things.\n// See related issue here https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/86\n\nimport {PluginSetupProcessor} from \"@aragon/osx/framework/plugin/setup/PluginSetupProcessor.sol\";\nimport {PluginRepoFactory} from \"@aragon/osx/framework/plugin/repo/PluginRepoFactory.sol\";\n" - }, - "src/MyPlugin.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity ^0.8.8;\n\nimport {IDAO, PluginUUPSUpgradeable} from \"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\";\n\n/// @title MyPlugin\n/// @dev Release 1, Build 1\ncontract MyPlugin is PluginUUPSUpgradeable {\n bytes32 public constant STORE_PERMISSION_ID = keccak256(\"STORE_PERMISSION\");\n\n uint256 public number; // added in build 1\n\n /// @notice Emitted when a number is stored.\n /// @param number The number.\n event NumberStored(uint256 number);\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the plugin when build 1 is installed.\n /// @param _number The number to be stored.\n function initialize(IDAO _dao, uint256 _number) external initializer {\n __PluginUUPSUpgradeable_init(_dao);\n number = _number;\n\n emit NumberStored({number: _number});\n }\n\n /// @notice Stores a new number to storage. Caller needs STORE_PERMISSION.\n /// @param _number The number to be stored.\n function storeNumber(uint256 _number) external auth(STORE_PERMISSION_ID) {\n number = _number;\n\n emit NumberStored({number: _number});\n }\n}\n" - }, - "src/MyPluginSetup.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {PermissionLib} from \"@aragon/osx/core/permission/PermissionLib.sol\";\nimport {PluginSetup, IPluginSetup} from \"@aragon/osx/framework/plugin/setup/PluginSetup.sol\";\nimport {MyPlugin} from \"./MyPlugin.sol\";\n\n/// @title MyPluginSetup\n/// @dev Release 1, Build 1\ncontract MyPluginSetup is PluginSetup {\n address private immutable myPluginImplementation;\n\n constructor() {\n myPluginImplementation = address(new MyPlugin());\n }\n\n /// @inheritdoc IPluginSetup\n function prepareInstallation(\n address _dao,\n bytes memory _data\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData) {\n uint256 number = abi.decode(_data, (uint256));\n\n plugin = createERC1967Proxy(\n myPluginImplementation,\n abi.encodeWithSelector(MyPlugin.initialize.selector, _dao, number)\n );\n\n PermissionLib.MultiTargetPermission[]\n memory permissions = new PermissionLib.MultiTargetPermission[](1);\n\n permissions[0] = PermissionLib.MultiTargetPermission({\n operation: PermissionLib.Operation.Grant,\n where: plugin,\n who: _dao,\n condition: PermissionLib.NO_CONDITION,\n permissionId: keccak256(\"STORE_PERMISSION\")\n });\n\n preparedSetupData.permissions = permissions;\n }\n\n /// @inheritdoc IPluginSetup\n function prepareUninstallation(\n address _dao,\n SetupPayload calldata _payload\n ) external pure returns (PermissionLib.MultiTargetPermission[] memory permissions) {\n permissions = new PermissionLib.MultiTargetPermission[](1);\n\n permissions[0] = PermissionLib.MultiTargetPermission({\n operation: PermissionLib.Operation.Revoke,\n where: _payload.plugin,\n who: _dao,\n condition: PermissionLib.NO_CONDITION,\n permissionId: keccak256(\"STORE_PERMISSION\")\n });\n }\n\n /// @inheritdoc IPluginSetup\n function implementation() external view returns (address) {\n return myPluginImplementation;\n }\n}\n" - } - }, - "settings": { - "metadata": { - "bytecodeHash": "none", - "useLiteralContent": true - }, - "optimizer": { - "enabled": true, - "runs": 800 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "storageLayout", - "devdoc", - "userdoc", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/contracts/deployments/goerli/.chainId b/packages/contracts/deployments/goerli/.chainId deleted file mode 100644 index 7813681f..00000000 --- a/packages/contracts/deployments/goerli/.chainId +++ /dev/null @@ -1 +0,0 @@ -5 \ No newline at end of file diff --git a/packages/contracts/deployments/goerli/MyPluginSetup.json b/packages/contracts/deployments/goerli/MyPluginSetup.json deleted file mode 100644 index 7b8f47be..00000000 --- a/packages/contracts/deployments/goerli/MyPluginSetup.json +++ /dev/null @@ -1,380 +0,0 @@ -{ - "address": "0x5F186fDFc79f890A3C01acFc1EE5c8e8c2977881", - "abi": [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_dao", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "prepareInstallation", - "outputs": [ - { - "internalType": "address", - "name": "plugin", - "type": "address" - }, - { - "components": [ - { - "internalType": "address[]", - "name": "helpers", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "enum PermissionLib.Operation", - "name": "operation", - "type": "uint8" - }, - { - "internalType": "address", - "name": "where", - "type": "address" - }, - { - "internalType": "address", - "name": "who", - "type": "address" - }, - { - "internalType": "address", - "name": "condition", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "permissionId", - "type": "bytes32" - } - ], - "internalType": "struct PermissionLib.MultiTargetPermission[]", - "name": "permissions", - "type": "tuple[]" - } - ], - "internalType": "struct IPluginSetup.PreparedSetupData", - "name": "preparedSetupData", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_dao", - "type": "address" - }, - { - "components": [ - { - "internalType": "address", - "name": "plugin", - "type": "address" - }, - { - "internalType": "address[]", - "name": "currentHelpers", - "type": "address[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct IPluginSetup.SetupPayload", - "name": "_payload", - "type": "tuple" - } - ], - "name": "prepareUninstallation", - "outputs": [ - { - "components": [ - { - "internalType": "enum PermissionLib.Operation", - "name": "operation", - "type": "uint8" - }, - { - "internalType": "address", - "name": "where", - "type": "address" - }, - { - "internalType": "address", - "name": "who", - "type": "address" - }, - { - "internalType": "address", - "name": "condition", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "permissionId", - "type": "bytes32" - } - ], - "internalType": "struct PermissionLib.MultiTargetPermission[]", - "name": "permissions", - "type": "tuple[]" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_dao", - "type": "address" - }, - { - "internalType": "uint16", - "name": "_currentBuild", - "type": "uint16" - }, - { - "components": [ - { - "internalType": "address", - "name": "plugin", - "type": "address" - }, - { - "internalType": "address[]", - "name": "currentHelpers", - "type": "address[]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct IPluginSetup.SetupPayload", - "name": "_payload", - "type": "tuple" - } - ], - "name": "prepareUpdate", - "outputs": [ - { - "internalType": "bytes", - "name": "initData", - "type": "bytes" - }, - { - "components": [ - { - "internalType": "address[]", - "name": "helpers", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "enum PermissionLib.Operation", - "name": "operation", - "type": "uint8" - }, - { - "internalType": "address", - "name": "where", - "type": "address" - }, - { - "internalType": "address", - "name": "who", - "type": "address" - }, - { - "internalType": "address", - "name": "condition", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "permissionId", - "type": "bytes32" - } - ], - "internalType": "struct PermissionLib.MultiTargetPermission[]", - "name": "permissions", - "type": "tuple[]" - } - ], - "internalType": "struct IPluginSetup.PreparedSetupData", - "name": "preparedSetupData", - "type": "tuple" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "_interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x57b10ac26294ba2c533c6e0a61b9c82a79dae945ca7c2a08ce6fcf63a089ae26", - "receipt": { - "to": null, - "from": "0xbeC907C237c5d27c7D4cB37b2c17CBB227B5f335", - "contractAddress": "0x5F186fDFc79f890A3C01acFc1EE5c8e8c2977881", - "transactionIndex": 87, - "gasUsed": "1976411", - "logsBloom": "0x00000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2c7653fb0ae45599fe86fea731eb56df74200eabe226242e478d2400787ea206", - "transactionHash": "0x57b10ac26294ba2c533c6e0a61b9c82a79dae945ca7c2a08ce6fcf63a089ae26", - "logs": [ - { - "transactionIndex": 87, - "blockNumber": 9418501, - "transactionHash": "0x57b10ac26294ba2c533c6e0a61b9c82a79dae945ca7c2a08ce6fcf63a089ae26", - "address": "0x5BF9D9CB63741C76d58765659a9Ce9405e5322cB", - "topics": [ - "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" - ], - "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", - "logIndex": 178, - "blockHash": "0x2c7653fb0ae45599fe86fea731eb56df74200eabe226242e478d2400787ea206" - } - ], - "blockNumber": 9418501, - "cumulativeGasUsed": "20049427", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 1, - "solcInputHash": "7d813fbc2dcf1a124495d2a664e7af9b", - "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"prepareInstallation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"helpers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"struct IPluginSetup.PreparedSetupData\",\"name\":\"preparedSetupData\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"currentHelpers\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IPluginSetup.SetupPayload\",\"name\":\"_payload\",\"type\":\"tuple\"}],\"name\":\"prepareUninstallation\",\"outputs\":[{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dao\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_currentBuild\",\"type\":\"uint16\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"plugin\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"currentHelpers\",\"type\":\"address[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"struct IPluginSetup.SetupPayload\",\"name\":\"_payload\",\"type\":\"tuple\"}],\"name\":\"prepareUpdate\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"initData\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"address[]\",\"name\":\"helpers\",\"type\":\"address[]\"},{\"components\":[{\"internalType\":\"enum PermissionLib.Operation\",\"name\":\"operation\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"where\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"condition\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"permissionId\",\"type\":\"bytes32\"}],\"internalType\":\"struct PermissionLib.MultiTargetPermission[]\",\"name\":\"permissions\",\"type\":\"tuple[]\"}],\"internalType\":\"struct IPluginSetup.PreparedSetupData\",\"name\":\"preparedSetupData\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"_interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Release 1, Build 1\",\"kind\":\"dev\",\"methods\":{\"implementation()\":{\"details\":\"The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\",\"returns\":{\"_0\":\"The address of the plugin implementation contract.\"}},\"prepareInstallation(address,bytes)\":{\"params\":{\"_dao\":\"The address of the installing DAO.\",\"_data\":\"The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\"},\"returns\":{\"plugin\":\"The address of the `Plugin` contract being prepared for installation.\",\"preparedSetupData\":\"The deployed plugin's relevant data which consists of helpers and permissions.\"}},\"prepareUninstallation(address,(address,address[],bytes))\":{\"params\":{\"_dao\":\"The address of the uninstalling DAO.\",\"_payload\":\"The relevant data necessary for the `prepareUninstallation`. See above.\"},\"returns\":{\"permissions\":\"The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\"}},\"prepareUpdate(address,uint16,(address,address[],bytes))\":{\"params\":{\"_currentBuild\":\"The build number of the plugin to update from.\",\"_dao\":\"The address of the updating DAO.\",\"_payload\":\"The relevant data necessary for the `prepareUpdate`. See above.\"},\"returns\":{\"initData\":\"The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\",\"preparedSetupData\":\"The deployed plugin's relevant data which consists of helpers and permissions.\"}},\"supportsInterface(bytes4)\":{\"params\":{\"_interfaceId\":\"The ID of the interface.\"},\"returns\":{\"_0\":\"Returns `true` if the interface is supported.\"}}},\"title\":\"MyPluginSetup\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"implementation()\":{\"notice\":\"Returns the plugin implementation address.\"},\"prepareInstallation(address,bytes)\":{\"notice\":\"Prepares the installation of a plugin.\"},\"prepareUninstallation(address,(address,address[],bytes))\":{\"notice\":\"Prepares the uninstallation of a plugin.\"},\"prepareUpdate(address,uint16,(address,address[],bytes))\":{\"notice\":\"Prepares the update of a plugin.\"},\"supportsInterface(bytes4)\":{\"notice\":\"Checks if this or the parent contract supports an interface by its ID.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/MyPluginSetup.sol\":\"MyPluginSetup\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":800},\"remappings\":[]},\"sources\":{\"@aragon/osx/core/dao/IDAO.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IDAO\\n/// @author Aragon Association - 2022-2023\\n/// @notice The interface required for DAOs within the Aragon App DAO framework.\\ninterface IDAO {\\n /// @notice The action struct to be consumed by the DAO's `execute` function resulting in an external call.\\n /// @param to The address to call.\\n /// @param value The native token value to be sent with the call.\\n /// @param data The bytes-encoded function selector and calldata for the call.\\n struct Action {\\n address to;\\n uint256 value;\\n bytes data;\\n }\\n\\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\\n /// @param _where The address of the contract.\\n /// @param _who The address of a EOA or contract to give the permissions.\\n /// @param _permissionId The permission identifier.\\n /// @param _data The optional data passed to the `PermissionCondition` registered.\\n /// @return Returns true if the address has permission, false if not.\\n function hasPermission(\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes memory _data\\n ) external view returns (bool);\\n\\n /// @notice Updates the DAO metadata (e.g., an IPFS hash).\\n /// @param _metadata The IPFS hash of the new metadata object.\\n function setMetadata(bytes calldata _metadata) external;\\n\\n /// @notice Emitted when the DAO metadata is updated.\\n /// @param metadata The IPFS hash of the new metadata object.\\n event MetadataSet(bytes metadata);\\n\\n /// @notice Executes a list of actions. If a zero allow-failure map is provided, a failing action reverts the entire execution. If a non-zero allow-failure map is provided, allowed actions can fail without the entire call being reverted.\\n /// @param _callId The ID of the call. The definition of the value of `callId` is up to the calling contract and can be used, e.g., as a nonce.\\n /// @param _actions The array of actions.\\n /// @param _allowFailureMap A bitmap allowing execution to succeed, even if individual actions might revert. If the bit at index `i` is 1, the execution succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\\n /// @return The array of results obtained from the executed actions in `bytes`.\\n /// @return The resulting failure map containing the actions have actually failed.\\n function execute(\\n bytes32 _callId,\\n Action[] memory _actions,\\n uint256 _allowFailureMap\\n ) external returns (bytes[] memory, uint256);\\n\\n /// @notice Emitted when a proposal is executed.\\n /// @param actor The address of the caller.\\n /// @param callId The ID of the call.\\n /// @param actions The array of actions executed.\\n /// @param allowFailureMap The allow failure map encoding which actions are allowed to fail.\\n /// @param failureMap The failure map encoding which actions have failed.\\n /// @param execResults The array with the results of the executed actions.\\n /// @dev The value of `callId` is defined by the component/contract calling the execute function. A `Plugin` implementation can use it, for example, as a nonce.\\n event Executed(\\n address indexed actor,\\n bytes32 callId,\\n Action[] actions,\\n uint256 allowFailureMap,\\n uint256 failureMap,\\n bytes[] execResults\\n );\\n\\n /// @notice Emitted when a standard callback is registered.\\n /// @param interfaceId The ID of the interface.\\n /// @param callbackSelector The selector of the callback function.\\n /// @param magicNumber The magic number to be registered for the callback function selector.\\n event StandardCallbackRegistered(\\n bytes4 interfaceId,\\n bytes4 callbackSelector,\\n bytes4 magicNumber\\n );\\n\\n /// @notice Deposits (native) tokens to the DAO contract with a reference string.\\n /// @param _token The address of the token or address(0) in case of the native token.\\n /// @param _amount The amount of tokens to deposit.\\n /// @param _reference The reference describing the deposit reason.\\n function deposit(address _token, uint256 _amount, string calldata _reference) external payable;\\n\\n /// @notice Emitted when a token deposit has been made to the DAO.\\n /// @param sender The address of the sender.\\n /// @param token The address of the deposited token.\\n /// @param amount The amount of tokens deposited.\\n /// @param _reference The reference describing the deposit reason.\\n event Deposited(\\n address indexed sender,\\n address indexed token,\\n uint256 amount,\\n string _reference\\n );\\n\\n /// @notice Emitted when a native token deposit has been made to the DAO.\\n /// @dev This event is intended to be emitted in the `receive` function and is therefore bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\\n /// @param sender The address of the sender.\\n /// @param amount The amount of native tokens deposited.\\n event NativeTokenDeposited(address sender, uint256 amount);\\n\\n /// @notice Setter for the trusted forwarder verifying the meta transaction.\\n /// @param _trustedForwarder The trusted forwarder address.\\n function setTrustedForwarder(address _trustedForwarder) external;\\n\\n /// @notice Getter for the trusted forwarder verifying the meta transaction.\\n /// @return The trusted forwarder address.\\n function getTrustedForwarder() external view returns (address);\\n\\n /// @notice Emitted when a new TrustedForwarder is set on the DAO.\\n /// @param forwarder the new forwarder address.\\n event TrustedForwarderSet(address forwarder);\\n\\n /// @notice Setter for the [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @param _signatureValidator The address of the signature validator.\\n function setSignatureValidator(address _signatureValidator) external;\\n\\n /// @notice Emitted when the signature validator address is updated.\\n /// @param signatureValidator The address of the signature validator.\\n event SignatureValidatorSet(address signatureValidator);\\n\\n /// @notice Checks whether a signature is valid for the provided hash by forwarding the call to the set [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\\n /// @param _hash The hash of the data to be signed.\\n /// @param _signature The signature byte array associated with `_hash`.\\n /// @return Returns the `bytes4` magic value `0x1626ba7e` if the signature is valid.\\n function isValidSignature(bytes32 _hash, bytes memory _signature) external returns (bytes4);\\n\\n /// @notice Registers an ERC standard having a callback by registering its [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID and callback function signature.\\n /// @param _interfaceId The ID of the interface.\\n /// @param _callbackSelector The selector of the callback function.\\n /// @param _magicNumber The magic number to be registered for the function signature.\\n function registerStandardCallback(\\n bytes4 _interfaceId,\\n bytes4 _callbackSelector,\\n bytes4 _magicNumber\\n ) external;\\n}\\n\",\"keccak256\":\"0x3876d62c73312234c1e2ab4e75cdac2783a6688c3445a67a15b767cd98e01f80\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/permission/PermissionLib.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title PermissionLib\\n/// @author Aragon Association - 2021-2023\\n/// @notice A library containing objects for permission processing.\\nlibrary PermissionLib {\\n /// @notice A constant expressing that no condition is applied to a permission.\\n address public constant NO_CONDITION = address(0);\\n\\n /// @notice The types of permission operations available in the `PermissionManager`.\\n /// @param Grant The grant operation setting a permission without a condition.\\n /// @param Revoke The revoke operation removing a permission (that was granted with or without a condition).\\n /// @param GrantWithCondition The grant operation setting a permission with a condition.\\n enum Operation {\\n Grant,\\n Revoke,\\n GrantWithCondition\\n }\\n\\n /// @notice A struct containing the information for a permission to be applied on a single target contract without a condition.\\n /// @param operation The permission operation type.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param permissionId The permission identifier.\\n struct SingleTargetPermission {\\n Operation operation;\\n address who;\\n bytes32 permissionId;\\n }\\n\\n /// @notice A struct containing the information for a permission to be applied on multiple target contracts, optionally, with a condition.\\n /// @param operation The permission operation type.\\n /// @param where The address of the target contract for which `who` receives permission.\\n /// @param who The address (EOA or contract) receiving the permission.\\n /// @param condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\\n /// @param permissionId The permission identifier.\\n struct MultiTargetPermission {\\n Operation operation;\\n address where;\\n address who;\\n address condition;\\n bytes32 permissionId;\\n }\\n}\\n\",\"keccak256\":\"0x9b27fa8990e0f1623055187b8ade9363a6c8a1f15aab900e3a6e5cb312545c02\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/IPlugin.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\n/// @title IPlugin\\n/// @author Aragon Association - 2022-2023\\n/// @notice An interface defining the traits of a plugin.\\ninterface IPlugin {\\n enum PluginType {\\n UUPS,\\n Cloneable,\\n Constructable\\n }\\n\\n /// @notice Returns the plugin's type\\n function pluginType() external view returns (PluginType);\\n}\\n\",\"keccak256\":\"0xcdb72c04ca35478e4d786fbbe12cf0e6de7d76aa0510028432312697f42c7355\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {UUPSUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport {IERC1822ProxiableUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport {ERC165Upgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"../dao/IDAO.sol\\\";\\nimport {DaoAuthorizableUpgradeable} from \\\"./dao-authorizable/DaoAuthorizableUpgradeable.sol\\\";\\nimport {IPlugin} from \\\"./IPlugin.sol\\\";\\n\\n/// @title PluginUUPSUpgradeable\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract, upgradeable contract to inherit from when creating a plugin being deployed via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\nabstract contract PluginUUPSUpgradeable is\\n IPlugin,\\n ERC165Upgradeable,\\n UUPSUpgradeable,\\n DaoAuthorizableUpgradeable\\n{\\n // NOTE: When adding new state variables to the contract, the size of `_gap` has to be adapted below as well.\\n\\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @inheritdoc IPlugin\\n function pluginType() public pure override returns (PluginType) {\\n return PluginType.UUPS;\\n }\\n\\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\\n bytes32 public constant UPGRADE_PLUGIN_PERMISSION_ID = keccak256(\\\"UPGRADE_PLUGIN_PERMISSION\\\");\\n\\n /// @notice Initializes the plugin by storing the associated DAO.\\n /// @param _dao The DAO contract.\\n function __PluginUUPSUpgradeable_init(IDAO _dao) internal virtual onlyInitializing {\\n __DaoAuthorizableUpgradeable_init(_dao);\\n }\\n\\n /// @notice Checks if an interface is supported by this or its parent contract.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPlugin).interfaceId ||\\n _interfaceId == type(IERC1822ProxiableUpgradeable).interfaceId ||\\n super.supportsInterface(_interfaceId);\\n }\\n\\n /// @notice Returns the address of the implementation contract in the [proxy storage slot](https://eips.ethereum.org/EIPS/eip-1967) slot the [UUPS proxy](https://eips.ethereum.org/EIPS/eip-1822) is pointing to.\\n /// @return The address of the implementation contract.\\n function implementation() public view returns (address) {\\n return _getImplementation();\\n }\\n\\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n /// @dev The caller must have the `UPGRADE_PLUGIN_PERMISSION_ID` permission.\\n function _authorizeUpgrade(\\n address\\n ) internal virtual override auth(UPGRADE_PLUGIN_PERMISSION_ID) {}\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x5b12df9d646c59629dbaeb0a70df476a867a82887f5ef7d8b35697c01fcb45f3\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ContextUpgradeable} from \\\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\\\";\\n\\nimport {IDAO} from \\\"../../dao/IDAO.sol\\\";\\nimport {_auth} from \\\"../../utils/auth.sol\\\";\\n\\n/// @title DaoAuthorizableUpgradeable\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract contract providing a meta-transaction compatible modifier for upgradeable or cloneable contracts to authorize function calls through an associated DAO.\\n/// @dev Make sure to call `__DaoAuthorizableUpgradeable_init` during initialization of the inheriting contract.\\nabstract contract DaoAuthorizableUpgradeable is ContextUpgradeable {\\n /// @notice The associated DAO managing the permissions of inheriting contracts.\\n IDAO private dao_;\\n\\n /// @notice Initializes the contract by setting the associated DAO.\\n /// @param _dao The associated DAO address.\\n function __DaoAuthorizableUpgradeable_init(IDAO _dao) internal onlyInitializing {\\n dao_ = _dao;\\n }\\n\\n /// @notice Returns the DAO contract.\\n /// @return The DAO contract.\\n function dao() public view returns (IDAO) {\\n return dao_;\\n }\\n\\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through the associated DAO's permission manager.\\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\\n modifier auth(bytes32 _permissionId) {\\n _auth(dao_, address(this), _msgSender(), _permissionId, _msgData());\\n _;\\n }\\n\\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0xd21dcde806070ad8f62acc81d986e517edb5a60ebdff8419660763018f7895e8\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/core/utils/auth.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {IDAO} from \\\"../dao/IDAO.sol\\\";\\n\\n/// @notice Thrown if a call is unauthorized in the associated DAO.\\n/// @param dao The associated DAO.\\n/// @param where The context in which the authorization reverted.\\n/// @param who The address (EOA or contract) missing the permission.\\n/// @param permissionId The permission identifier.\\nerror DaoUnauthorized(address dao, address where, address who, bytes32 permissionId);\\n\\n/// @notice A free function checking if a caller is granted permissions on a target contract via a permission identifier that redirects the approval to a `PermissionCondition` if this was specified in the setup.\\n/// @param _where The address of the target contract for which `who` receives permission.\\n/// @param _who The address (EOA or contract) owning the permission.\\n/// @param _permissionId The permission identifier.\\n/// @param _data The optional data passed to the `PermissionCondition` registered.\\nfunction _auth(\\n IDAO _dao,\\n address _where,\\n address _who,\\n bytes32 _permissionId,\\n bytes calldata _data\\n) view {\\n if (!_dao.hasPermission(_where, _who, _permissionId, _data))\\n revert DaoUnauthorized({\\n dao: address(_dao),\\n where: _where,\\n who: _who,\\n permissionId: _permissionId\\n });\\n}\\n\",\"keccak256\":\"0x1c9cf22583c8b5a08c6d2c02a68d9f05e58900a9bb27efa3b30abca2ecfabfe4\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/framework/plugin/setup/IPluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {PermissionLib} from \\\"../../../core/permission/PermissionLib.sol\\\";\\nimport {IDAO} from \\\"../../../core/dao/IDAO.sol\\\";\\n\\n/// @title IPluginSetup\\n/// @author Aragon Association - 2022-2023\\n/// @notice The interface required for a plugin setup contract to be consumed by the `PluginSetupProcessor` for plugin installations, updates, and uninstallations.\\ninterface IPluginSetup {\\n /// @notice The data associated with a prepared setup.\\n /// @param helpers The address array of helpers (contracts or EOAs) associated with this plugin version after the installation or update.\\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the installing or updating DAO.\\n struct PreparedSetupData {\\n address[] helpers;\\n PermissionLib.MultiTargetPermission[] permissions;\\n }\\n\\n /// @notice The payload for plugin updates and uninstallations containing the existing contracts as well as optional data to be consumed by the plugin setup.\\n /// @param plugin The address of the `Plugin`.\\n /// @param currentHelpers The address array of all current helpers (contracts or EOAs) associated with the plugin to update from.\\n /// @param data The bytes-encoded data containing the input parameters for the preparation of update/uninstall as specified in the corresponding ABI on the version's metadata.\\n struct SetupPayload {\\n address plugin;\\n address[] currentHelpers;\\n bytes data;\\n }\\n\\n /// @notice Prepares the installation of a plugin.\\n /// @param _dao The address of the installing DAO.\\n /// @param _data The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\\n /// @return plugin The address of the `Plugin` contract being prepared for installation.\\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\\n function prepareInstallation(\\n address _dao,\\n bytes calldata _data\\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData);\\n\\n /// @notice Prepares the update of a plugin.\\n /// @param _dao The address of the updating DAO.\\n /// @param _currentBuild The build number of the plugin to update from.\\n /// @param _payload The relevant data necessary for the `prepareUpdate`. See above.\\n /// @return initData The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\\n function prepareUpdate(\\n address _dao,\\n uint16 _currentBuild,\\n SetupPayload calldata _payload\\n ) external returns (bytes memory initData, PreparedSetupData memory preparedSetupData);\\n\\n /// @notice Prepares the uninstallation of a plugin.\\n /// @param _dao The address of the uninstalling DAO.\\n /// @param _payload The relevant data necessary for the `prepareUninstallation`. See above.\\n /// @return permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\\n function prepareUninstallation(\\n address _dao,\\n SetupPayload calldata _payload\\n ) external returns (PermissionLib.MultiTargetPermission[] memory permissions);\\n\\n /// @notice Returns the plugin implementation address.\\n /// @return The address of the plugin implementation contract.\\n /// @dev The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0x81d1e60154e672372318f6fccf337b6094bb8fe1192e2f755b8cc0d645ff5332\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/framework/plugin/setup/PluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {ERC165} from \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport {ERC165Checker} from \\\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\\\";\\nimport {Clones} from \\\"@openzeppelin/contracts/proxy/Clones.sol\\\";\\n\\nimport {PermissionLib} from \\\"../../../core/permission/PermissionLib.sol\\\";\\nimport {createERC1967Proxy as createERC1967} from \\\"../../../utils/Proxy.sol\\\";\\nimport {IPluginSetup} from \\\"./IPluginSetup.sol\\\";\\n\\n/// @title PluginSetup\\n/// @author Aragon Association - 2022-2023\\n/// @notice An abstract contract that developers have to inherit from to write the setup of a plugin.\\nabstract contract PluginSetup is ERC165, IPluginSetup {\\n /// @inheritdoc IPluginSetup\\n function prepareUpdate(\\n address _dao,\\n uint16 _currentBuild,\\n SetupPayload calldata _payload\\n )\\n external\\n virtual\\n override\\n returns (bytes memory initData, PreparedSetupData memory preparedSetupData)\\n {}\\n\\n /// @notice A convenience function to create an [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract pointing to an implementation and being associated to a DAO.\\n /// @param _implementation The address of the implementation contract to which the proxy is pointing to.\\n /// @param _data The data to initialize the storage of the proxy contract.\\n /// @return The address of the created proxy contract.\\n function createERC1967Proxy(\\n address _implementation,\\n bytes memory _data\\n ) internal returns (address) {\\n return createERC1967(_implementation, _data);\\n }\\n\\n /// @notice Checks if this or the parent contract supports an interface by its ID.\\n /// @param _interfaceId The ID of the interface.\\n /// @return Returns `true` if the interface is supported.\\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\\n return\\n _interfaceId == type(IPluginSetup).interfaceId || super.supportsInterface(_interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x04ff3ec8a5b121ef3972dbb8140b7cf313f9ed514f8471841e3dcf5304ef6950\",\"license\":\"AGPL-3.0-or-later\"},\"@aragon/osx/utils/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport \\\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\\\";\\n\\n/// @notice Free function to create a [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract based on the passed base contract address.\\n/// @param _logic The base contract address.\\n/// @param _data The constructor arguments for this contract.\\n/// @return The address of the proxy contract created.\\n/// @dev Initializes the upgradeable proxy with an initial implementation specified by _logic. If _data is non-empty, it\\u2019s used as data in a delegate call to _logic. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor (see [OpenZeppelin ERC1967Proxy-constructor](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Proxy-constructor-address-bytes-)).\\nfunction createERC1967Proxy(address _logic, bytes memory _data) returns (address) {\\n return address(new ERC1967Proxy(_logic, _data));\\n}\\n\",\"keccak256\":\"0x9d871292dfac2f42957e4d10eec56fd74dda0bd7803c01e849d2e9f5e2799fff\",\"license\":\"AGPL-3.0-or-later\"},\"@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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.8.3._\\n */\\ninterface IERC1967Upgradeable {\\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\",\"keccak256\":\"0x47d6e06872b12e72c79d1b5eb55842f860b5fb1207b2317c2358d2766b950a7b\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.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 IERC1822ProxiableUpgradeable {\\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\",\"keccak256\":\"0x77c89f893e403efc6929ba842b7ccf6534d4ffe03afe31670b4a528c0ad78c0f\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.sol\\\";\\nimport \\\"../../interfaces/IERC1967Upgradeable.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/StorageSlotUpgradeable.sol\\\";\\nimport \\\"../utils/Initializable.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 */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {\\n function __ERC1967Upgrade_init() internal onlyInitializing {\\n }\\n\\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\\n }\\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlotUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n AddressUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) 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 (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822ProxiableUpgradeable(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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlotUpgradeable.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(address newBeacon, bytes memory data, bool forceCall) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x584ebdf9c1118a7c773f98788e3f3ede01982bdf8932aa06f5acc7d54876e161\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.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 IBeaconUpgradeable {\\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\",\"keccak256\":\"0x24b86ac8c005b8c654fbf6ac34a5a4f61580d7273541e83e013e89d66fbf0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../interfaces/draft-IERC1822Upgradeable.sol\\\";\\nimport \\\"../ERC1967/ERC1967UpgradeUpgradeable.sol\\\";\\nimport \\\"./Initializable.sol\\\";\\n\\n/**\\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\\n *\\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\\n * `UUPSUpgradeable` with a custom implementation of upgrades.\\n *\\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\\n *\\n * _Available since v4.1._\\n */\\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\\n function __UUPSUpgradeable_init() internal onlyInitializing {\\n }\\n\\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\\n }\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\\n address private immutable __self = address(this);\\n\\n /**\\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\\n * fail.\\n */\\n modifier onlyProxy() {\\n require(address(this) != __self, \\\"Function must be called through delegatecall\\\");\\n require(_getImplementation() == __self, \\\"Function must be called through active proxy\\\");\\n _;\\n }\\n\\n /**\\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\\n * callable on the implementing contract but not through proxies.\\n */\\n modifier notDelegated() {\\n require(address(this) == __self, \\\"UUPSUpgradeable: must not be called through delegatecall\\\");\\n _;\\n }\\n\\n /**\\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\\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. This is guaranteed by the `notDelegated` modifier.\\n */\\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\\n return _IMPLEMENTATION_SLOT;\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n *\\n * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\\n */\\n function upgradeTo(address newImplementation) public virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\\n * encoded in `data`.\\n *\\n * Calls {_authorizeUpgrade}.\\n *\\n * Emits an {Upgraded} event.\\n *\\n * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\\n */\\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\\n _authorizeUpgrade(newImplementation);\\n _upgradeToAndCallUUPS(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\\n * {upgradeTo} and {upgradeToAndCall}.\\n *\\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\\n *\\n * ```solidity\\n * function _authorizeUpgrade(address) internal override onlyOwner {}\\n * ```\\n */\\n function _authorizeUpgrade(address newImplementation) internal virtual;\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0xb607cb94c27e89750f5ae2ccebcb94e654e926f6125f4fd4c6262c89875118ad\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\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 ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\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 /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\n */\\nlibrary StorageSlotUpgradeable {\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0x07ac95acad040f1fb1f6120dd0aa5f702db69446e95f82613721879d30de0908\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\\n function __ERC165_init() internal onlyInitializing {\\n }\\n\\n function __ERC165_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165Upgradeable).interfaceId;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x9a3b990bd56d139df3e454a9edf1c64668530b5a77fc32eb063bc206f958274a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable {\\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\",\"keccak256\":\"0xc6cef87559d0aeffdf0a99803de655938a7779ec0a3cd5d4383483ad85565a09\",\"license\":\"MIT\"},\"@openzeppelin/contracts/interfaces/IERC1967.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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.8.3._\\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\",\"keccak256\":\"0x3cbef5ebc24b415252e2f8c0c9254555d30d9f085603b4b80d9b5ed20ab87e90\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Clones.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\\n * deploying minimal proxy contracts, also known as \\\"clones\\\".\\n *\\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\\n *\\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\\n * deterministic method.\\n *\\n * _Available since v3.4._\\n */\\nlibrary Clones {\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\\n *\\n * This function uses the create opcode, which should never revert.\\n */\\n function clone(address implementation) internal returns (address instance) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\\n // of the `implementation` address with the bytecode before the address.\\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\\n instance := create(0, 0x09, 0x37)\\n }\\n require(instance != address(0), \\\"ERC1167: create failed\\\");\\n }\\n\\n /**\\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\\n *\\n * This function uses the create2 opcode and a `salt` to deterministically deploy\\n * the clone. Using the same `implementation` and `salt` multiple time will revert, since\\n * the clones cannot be deployed twice at the same address.\\n */\\n function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\\n // of the `implementation` address with the bytecode before the address.\\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\\n instance := create2(0, 0x09, 0x37, salt)\\n }\\n require(instance != address(0), \\\"ERC1167: create2 failed\\\");\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(\\n address implementation,\\n bytes32 salt,\\n address deployer\\n ) internal pure returns (address predicted) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n let ptr := mload(0x40)\\n mstore(add(ptr, 0x38), deployer)\\n mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\\n mstore(add(ptr, 0x14), implementation)\\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\\n mstore(add(ptr, 0x58), salt)\\n mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\\n predicted := keccak256(add(ptr, 0x43), 0x55)\\n }\\n }\\n\\n /**\\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\\n */\\n function predictDeterministicAddress(\\n address implementation,\\n bytes32 salt\\n ) internal view returns (address predicted) {\\n return predictDeterministicAddress(implementation, salt, address(this));\\n }\\n}\\n\",\"keccak256\":\"0x01f055f5c26ba25d7f83e9aa9ba877fbea4d0bf22227de046ea67494bc932999\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xa2b22da3032e50b55f95ec1d13336102d675f341167aa76db571ef7f8bb7975d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (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 */\\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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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(address newBeacon, bytes memory data, bool forceCall) 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\",\"keccak256\":\"0x3b21ae06bf5957f73fa16754b0669c77b7abd8ba6c072d35c3281d446fdb86c2\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xc130fe33f1b2132158531a87734153293f6d07bc263ff4ac90e85da9c82c0e27\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\\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 * ```solidity\\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`, `uint256`._\\n * _Available since v4.9 for `string`, `bytes`._\\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 struct StringSlot {\\n string value;\\n }\\n\\n struct BytesSlot {\\n bytes 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 /**\\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\\n */\\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\\n */\\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\\n */\\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\\n */\\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\\n /// @solidity memory-safe-assembly\\n assembly {\\n r.slot := store.slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf09e68aa0dc6722a25bc46490e8d48ed864466d17313b8a0b254c36b54e49899\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Library used to query support of an interface declared via {IERC165}.\\n *\\n * Note that these functions return the actual result of the query: they do not\\n * `revert` if an interface is not supported. It is up to the caller to decide\\n * what to do in these cases.\\n */\\nlibrary ERC165Checker {\\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\\n\\n /**\\n * @dev Returns true if `account` supports the {IERC165} interface.\\n */\\n function supportsERC165(address account) internal view returns (bool) {\\n // Any contract that implements ERC165 must explicitly indicate support of\\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\\n return\\n supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&\\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\\n }\\n\\n /**\\n * @dev Returns true if `account` supports the interface defined by\\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\\n // query support of both ERC165 as per the spec and support of _interfaceId\\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\\n }\\n\\n /**\\n * @dev Returns a boolean array where each value corresponds to the\\n * interfaces passed in and whether they're supported or not. This allows\\n * you to batch check interfaces for a contract where your expectation\\n * is that some interfaces may not be supported.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * _Available since v3.4._\\n */\\n function getSupportedInterfaces(\\n address account,\\n bytes4[] memory interfaceIds\\n ) internal view returns (bool[] memory) {\\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\\n\\n // query support of ERC165 itself\\n if (supportsERC165(account)) {\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\\n }\\n }\\n\\n return interfaceIdsSupported;\\n }\\n\\n /**\\n * @dev Returns true if `account` supports all the interfaces defined in\\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\\n *\\n * Batch-querying can lead to gas savings by skipping repeated checks for\\n * {IERC165} support.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\\n // query support of ERC165 itself\\n if (!supportsERC165(account)) {\\n return false;\\n }\\n\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\\n return false;\\n }\\n }\\n\\n // all interfaces supported\\n return true;\\n }\\n\\n /**\\n * @notice Query if a contract implements an interface, does not check ERC165 support\\n * @param account The address of the contract to query for support of an interface\\n * @param interfaceId The interface identifier, as specified in ERC-165\\n * @return true if the contract at account indicates support of the interface with\\n * identifier interfaceId, false otherwise\\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\\n * the behavior of this method is undefined. This precondition can be checked\\n * with {supportsERC165}.\\n *\\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\\n * should be exercised when using this function.\\n *\\n * Interface identification is specified in ERC-165.\\n */\\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\\n // prepare call\\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\\n\\n // perform static call\\n bool success;\\n uint256 returnSize;\\n uint256 returnValue;\\n assembly {\\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\\n returnSize := returndatasize()\\n returnValue := mload(0x00)\\n }\\n\\n return success && returnSize >= 0x20 && returnValue > 0;\\n }\\n}\\n\",\"keccak256\":\"0x5a08ad61f4e82b8a3323562661a86fb10b10190848073fdc13d4ac43710ffba5\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"src/MyPlugin.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\npragma solidity ^0.8.8;\\n\\nimport {IDAO, PluginUUPSUpgradeable} from \\\"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\\\";\\n\\n/// @title MyPlugin\\n/// @dev Release 1, Build 1\\ncontract MyPlugin is PluginUUPSUpgradeable {\\n bytes32 public constant STORE_PERMISSION_ID = keccak256(\\\"STORE_PERMISSION\\\");\\n\\n uint256 public number; // added in build 1\\n\\n /// @notice Emitted when a number is stored.\\n /// @param number The number.\\n event NumberStored(uint256 number);\\n\\n constructor() {\\n _disableInitializers();\\n }\\n\\n /// @notice Initializes the plugin when build 1 is installed.\\n /// @param _number The number to be stored.\\n function initialize(IDAO _dao, uint256 _number) external initializer {\\n __PluginUUPSUpgradeable_init(_dao);\\n number = _number;\\n\\n emit NumberStored({number: _number});\\n }\\n\\n /// @notice Stores a new number to storage. Caller needs STORE_PERMISSION.\\n /// @param _number The number to be stored.\\n function storeNumber(uint256 _number) external auth(STORE_PERMISSION_ID) {\\n number = _number;\\n\\n emit NumberStored({number: _number});\\n }\\n}\\n\",\"keccak256\":\"0x754cec56b491627ba8a8bcc7519a34bb40e746ece83625651e8292845e975b9d\",\"license\":\"AGPL-3.0-or-later\"},\"src/MyPluginSetup.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-or-later\\n\\npragma solidity ^0.8.8;\\n\\nimport {PermissionLib} from \\\"@aragon/osx/core/permission/PermissionLib.sol\\\";\\nimport {PluginSetup, IPluginSetup} from \\\"@aragon/osx/framework/plugin/setup/PluginSetup.sol\\\";\\nimport {MyPlugin} from \\\"./MyPlugin.sol\\\";\\n\\n/// @title MyPluginSetup\\n/// @dev Release 1, Build 1\\ncontract MyPluginSetup is PluginSetup {\\n address private immutable myPluginImplementation;\\n\\n constructor() {\\n myPluginImplementation = address(new MyPlugin());\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function prepareInstallation(\\n address _dao,\\n bytes memory _data\\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData) {\\n uint256 number = abi.decode(_data, (uint256));\\n\\n plugin = createERC1967Proxy(\\n myPluginImplementation,\\n abi.encodeWithSelector(MyPlugin.initialize.selector, _dao, number)\\n );\\n\\n PermissionLib.MultiTargetPermission[]\\n memory permissions = new PermissionLib.MultiTargetPermission[](1);\\n\\n permissions[0] = PermissionLib.MultiTargetPermission({\\n operation: PermissionLib.Operation.Grant,\\n where: plugin,\\n who: _dao,\\n condition: PermissionLib.NO_CONDITION,\\n permissionId: keccak256(\\\"STORE_PERMISSION\\\")\\n });\\n\\n preparedSetupData.permissions = permissions;\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function prepareUninstallation(\\n address _dao,\\n SetupPayload calldata _payload\\n ) external pure returns (PermissionLib.MultiTargetPermission[] memory permissions) {\\n permissions = new PermissionLib.MultiTargetPermission[](1);\\n\\n permissions[0] = PermissionLib.MultiTargetPermission({\\n operation: PermissionLib.Operation.Revoke,\\n where: _payload.plugin,\\n who: _dao,\\n condition: PermissionLib.NO_CONDITION,\\n permissionId: keccak256(\\\"STORE_PERMISSION\\\")\\n });\\n }\\n\\n /// @inheritdoc IPluginSetup\\n function implementation() external view returns (address) {\\n return myPluginImplementation;\\n }\\n}\\n\",\"keccak256\":\"0x2e825f84bced1da3770994e4fe8da0d0d98cc8091c9302397210f71bbf681ae9\",\"license\":\"AGPL-3.0-or-later\"}},\"version\":1}", - "bytecode": "0x60a060405234801561001057600080fd5b5060405161001d9061004b565b604051809103906000f080158015610039573d6000803e3d6000fd5b506001600160a01b0316608052610058565b6112ae806110aa83390190565b6080516110316100796000396000818160ad015261033a01526110316000f3fe60806040523480156200001157600080fd5b50600436106200006f5760003560e01c80639cb0a12411620000565780639cb0a12414620000d8578063a8a9c29e14620000fe578063f10832f1146200012557600080fd5b806301ffc9a714620000745780635c60da1b14620000a0575b600080fd5b6200008b62000085366004620004b9565b6200014c565b60405190151581526020015b60405180910390f35b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016815260200162000097565b620000ef620000e93660046200051b565b62000184565b604051620000979190620005d6565b620001156200010f36600462000623565b62000274565b6040516200009792919062000772565b6200013c62000136366004620007ba565b6200029c565b6040516200009792919062000888565b60006001600160e01b0319821663099718b560e41b14806200017e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b604080516001808252818301909252606091816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816200019b5750506040805160a0810190915260018152909150602080820190620001fc90850185620008b4565b6001600160a01b03168152602001846001600160a01b0316815260200160006001600160a01b031681526020017ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981525081600081518110620002635762000263620008d2565b602002602001018190525092915050565b606062000294604051806040016040528060608152602001606081525090565b935093915050565b6000620002bc604051806040016040528060608152602001606081525090565b600083806020019051810190620002d49190620008e8565b604080516001600160a01b038816602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663cd6dc68760e01b17905290915062000360907f00000000000000000000000000000000000000000000000000000000000000009062000452565b60408051600180825281830190925291945060009190816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816200037b579050506040805160a081019091529091508060008152602001856001600160a01b03168152602001876001600160a01b0316815260200160006001600160a01b031681526020017ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981525081600081518110620004355762000435620008d2565b602002602001018190525080836020018190525050509250929050565b600062000460838362000467565b9392505050565b600082826040516200047990620004ab565b6200048692919062000902565b604051809103906000f080158015620004a3573d6000803e3d6000fd5b509392505050565b6106fe806200092783390190565b600060208284031215620004cc57600080fd5b81356001600160e01b0319811681146200046057600080fd5b80356001600160a01b0381168114620004fd57600080fd5b919050565b6000606082840312156200051557600080fd5b50919050565b600080604083850312156200052f57600080fd5b6200053a83620004e5565b9150602083013567ffffffffffffffff8111156200055757600080fd5b620005658582860162000502565b9150509250929050565b60008151600381106200059257634e487b7160e01b600052602160045260246000fd5b8352506020818101516001600160a01b0390811691840191909152604080830151821690840152606080830151909116908301526080908101519082015260a00190565b6020808252825182820181905260009190848201906040850190845b818110156200061757620006088385516200056f565b938501939250600101620005f2565b50909695505050505050565b6000806000606084860312156200063957600080fd5b6200064484620004e5565b9250602084013561ffff811681146200065c57600080fd5b9150604084013567ffffffffffffffff8111156200067957600080fd5b620006878682870162000502565b9150509250925092565b6000815180845260005b81811015620006b9576020818501810151868301820152016200069b565b506000602082860101526020601f19601f83011685010191505092915050565b805160408084528151908401819052600091602091908201906060860190845b81811015620007205783516001600160a01b031683529284019291840191600101620006f9565b50508483015186820387850152805180835290840192506000918401905b808310156200076757620007548285516200056f565b915084840193506001830192506200073e565b509695505050505050565b60408152600062000787604083018562000691565b82810360208401526200079b8185620006d9565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620007ce57600080fd5b620007d983620004e5565b9150602083013567ffffffffffffffff80821115620007f757600080fd5b818501915085601f8301126200080c57600080fd5b813581811115620008215762000821620007a4565b604051601f8201601f19908116603f011681019083821181831017156200084c576200084c620007a4565b816040528281528860208487010111156200086657600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6001600160a01b0383168152604060208201526000620008ac6040830184620006d9565b949350505050565b600060208284031215620008c757600080fd5b6200046082620004e5565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620008fb57600080fd5b5051919050565b6001600160a01b0383168152604060208201526000620008ac60408301846200069156fe60806040526040516106fe3803806106fe83398101604081905261002291610319565b61002e82826000610035565b5050610436565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106d7602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103e7565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b81526004016101489190610403565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b50506000910152565b6000806040838503121561032c57600080fd5b82516001600160a01b038116811461034357600080fd5b60208401519092506001600160401b038082111561036057600080fd5b818501915085601f83011261037457600080fd5b815181811115610386576103866102df565b604051601f8201601f19908116603f011681019083821181831017156103ae576103ae6102df565b816040528281528860208487010111156103c757600080fd5b6103d88360208301602088016102f5565b80955050505050509250929050565b600082516103f98184602087016102f5565b9190910192915050565b60208152600082518060208401526104228160408501602087016102f5565b601f01601f19169190910160400192915050565b610292806104456000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025f602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061020f565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f919061022b565b60005b838110156102065781810151838201526020016101ee565b50506000910152565b600082516102218184602087016101eb565b9190910192915050565b602081526000825180602084015261024a8160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a60a06040523060805234801561001457600080fd5b5061001d61002a565b61002561002a565b6100e9565b600054610100900460ff16156100965760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff908116146100e7576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805161118e610120600039600081816102d70152818161036101528181610457015281816104dc01526105c6015261118e6000f3fe6080604052600436106100c75760003560e01c80635c60da1b11610074578063b63394181161004e578063b633941814610207578063c9c4bfca14610227578063cd6dc6871461025b57600080fd5b80635c60da1b146101a75780638381f58a146101bc5780639c61f97e146101d357600080fd5b806341de6830116100a557806341de6830146101555780634f1ef2861461017157806352d1902d1461018457600080fd5b806301ffc9a7146100cc5780633659cfe6146101015780634162169f14610123575b600080fd5b3480156100d857600080fd5b506100ec6100e7366004610eb5565b61027b565b60405190151581526020015b60405180910390f35b34801561010d57600080fd5b5061012161011c366004610ef4565b6102cd565b005b34801561012f57600080fd5b5060c9546001600160a01b03165b6040516001600160a01b0390911681526020016100f8565b34801561016157600080fd5b5060006040516100f89190610f11565b61012161017f366004610f4f565b61044d565b34801561019057600080fd5b506101996105b9565b6040519081526020016100f8565b3480156101b357600080fd5b5061013d61067e565b3480156101c857600080fd5b5061019961012d5481565b3480156101df57600080fd5b506101997ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981565b34801561021357600080fd5b50610121610222366004611013565b6106b6565b34801561023357600080fd5b506101997f821b6e3a557148015a918c89e5d092e878a69854a2d1a410635f771bd5a8a3f581565b34801561026757600080fd5b5061012161027636600461102c565b610731565b60006001600160e01b0319821663041de68360e41b14806102ac57506001600160e01b031982166352d1902d60e01b145b806102c757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361035f5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103ba7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146104255760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610356565b61042e8161088d565b6040805160008082526020820190925261044a918391906108c6565b50565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036104da5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610356565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166105357f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146105a05760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610356565b6105a98261088d565b6105b5828260016108c6565b5050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146106595760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610356565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b60006106b17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b60c9547ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e69906106f4906001600160a01b031630335b84600036610a66565b61012d8290556040518281527f3564ffb2fd8f93d7b0e9d1173ffdff5ee9775d860bfe82eaca0d0dbe07c8b6349060200160405180910390a15050565b600054610100900460ff16158080156107515750600054600160ff909116105b8061076b5750303b15801561076b575060005460ff166001145b6107dd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610356565b6000805460ff191660011790558015610800576000805461ff0019166101001790555b61080983610b22565b61012d8290556040518281527f3564ffb2fd8f93d7b0e9d1173ffdff5ee9775d860bfe82eaca0d0dbe07c8b6349060200160405180910390a18015610888576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b60c9547f821b6e3a557148015a918c89e5d092e878a69854a2d1a410635f771bd5a8a3f5906105b5906001600160a01b031630336106eb565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156108f95761088883610b96565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610953575060408051601f3d908101601f1916820190925261095091810190611058565b60015b6109c55760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610356565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114610a5a5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610356565b50610888838383610c61565b604051637ef7c88360e11b81526001600160a01b0387169063fdef910690610a9a9088908890889088908890600401611071565b602060405180830381865afa158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adb91906110c5565b610b1a57604051630cb6f8ed60e21b81526001600160a01b03808816600483015280871660248301528516604482015260648101849052608401610356565b505050505050565b600054610100900460ff16610b8d5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610356565b61044a81610c8c565b6001600160a01b0381163b610c135760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610356565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610c6a83610d26565b600082511180610c775750805b1561088857610c868383610d66565b50505050565b600054610100900460ff16610cf75760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610356565b60c9805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610d2f81610b96565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610d8b838360405180606001604052806027815260200161115b60279139610d92565b9392505050565b6060600080856001600160a01b031685604051610daf919061110b565b600060405180830381855af49150503d8060008114610dea576040519150601f19603f3d011682016040523d82523d6000602084013e610def565b606091505b5091509150610e0086838387610e0a565b9695505050505050565b60608315610e79578251600003610e72576001600160a01b0385163b610e725760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610356565b5081610e83565b610e838383610e8b565b949350505050565b815115610e9b5781518083602001fd5b8060405162461bcd60e51b81526004016103569190611127565b600060208284031215610ec757600080fd5b81356001600160e01b031981168114610d8b57600080fd5b6001600160a01b038116811461044a57600080fd5b600060208284031215610f0657600080fd5b8135610d8b81610edf565b6020810160038310610f3357634e487b7160e01b600052602160045260246000fd5b91905290565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610f6257600080fd5b8235610f6d81610edf565b9150602083013567ffffffffffffffff80821115610f8a57600080fd5b818501915085601f830112610f9e57600080fd5b813581811115610fb057610fb0610f39565b604051601f8201601f19908116603f01168101908382118183101715610fd857610fd8610f39565b81604052828152886020848701011115610ff157600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60006020828403121561102557600080fd5b5035919050565b6000806040838503121561103f57600080fd5b823561104a81610edf565b946020939093013593505050565b60006020828403121561106a57600080fd5b5051919050565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b6000602082840312156110d757600080fd5b81518015158114610d8b57600080fd5b60005b838110156111025781810151838201526020016110ea565b50506000910152565b6000825161111d8184602087016110e7565b9190910192915050565b60208152600082518060208401526111468160408501602087016110e7565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a", - "deployedBytecode": "0x60806040523480156200001157600080fd5b50600436106200006f5760003560e01c80639cb0a12411620000565780639cb0a12414620000d8578063a8a9c29e14620000fe578063f10832f1146200012557600080fd5b806301ffc9a714620000745780635c60da1b14620000a0575b600080fd5b6200008b62000085366004620004b9565b6200014c565b60405190151581526020015b60405180910390f35b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016815260200162000097565b620000ef620000e93660046200051b565b62000184565b604051620000979190620005d6565b620001156200010f36600462000623565b62000274565b6040516200009792919062000772565b6200013c62000136366004620007ba565b6200029c565b6040516200009792919062000888565b60006001600160e01b0319821663099718b560e41b14806200017e57506301ffc9a760e01b6001600160e01b03198316145b92915050565b604080516001808252818301909252606091816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816200019b5750506040805160a0810190915260018152909150602080820190620001fc90850185620008b4565b6001600160a01b03168152602001846001600160a01b0316815260200160006001600160a01b031681526020017ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981525081600081518110620002635762000263620008d2565b602002602001018190525092915050565b606062000294604051806040016040528060608152602001606081525090565b935093915050565b6000620002bc604051806040016040528060608152602001606081525090565b600083806020019051810190620002d49190620008e8565b604080516001600160a01b038816602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663cd6dc68760e01b17905290915062000360907f00000000000000000000000000000000000000000000000000000000000000009062000452565b60408051600180825281830190925291945060009190816020015b6040805160a0810182526000808252602080830182905292820181905260608201819052608082015282526000199092019101816200037b579050506040805160a081019091529091508060008152602001856001600160a01b03168152602001876001600160a01b0316815260200160006001600160a01b031681526020017ff3c069b9d73f22a284db371233c4924669b347e0824a390e9ba432a7b7078e6981525081600081518110620004355762000435620008d2565b602002602001018190525080836020018190525050509250929050565b600062000460838362000467565b9392505050565b600082826040516200047990620004ab565b6200048692919062000902565b604051809103906000f080158015620004a3573d6000803e3d6000fd5b509392505050565b6106fe806200092783390190565b600060208284031215620004cc57600080fd5b81356001600160e01b0319811681146200046057600080fd5b80356001600160a01b0381168114620004fd57600080fd5b919050565b6000606082840312156200051557600080fd5b50919050565b600080604083850312156200052f57600080fd5b6200053a83620004e5565b9150602083013567ffffffffffffffff8111156200055757600080fd5b620005658582860162000502565b9150509250929050565b60008151600381106200059257634e487b7160e01b600052602160045260246000fd5b8352506020818101516001600160a01b0390811691840191909152604080830151821690840152606080830151909116908301526080908101519082015260a00190565b6020808252825182820181905260009190848201906040850190845b818110156200061757620006088385516200056f565b938501939250600101620005f2565b50909695505050505050565b6000806000606084860312156200063957600080fd5b6200064484620004e5565b9250602084013561ffff811681146200065c57600080fd5b9150604084013567ffffffffffffffff8111156200067957600080fd5b620006878682870162000502565b9150509250925092565b6000815180845260005b81811015620006b9576020818501810151868301820152016200069b565b506000602082860101526020601f19601f83011685010191505092915050565b805160408084528151908401819052600091602091908201906060860190845b81811015620007205783516001600160a01b031683529284019291840191600101620006f9565b50508483015186820387850152805180835290840192506000918401905b808310156200076757620007548285516200056f565b915084840193506001830192506200073e565b509695505050505050565b60408152600062000787604083018562000691565b82810360208401526200079b8185620006d9565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620007ce57600080fd5b620007d983620004e5565b9150602083013567ffffffffffffffff80821115620007f757600080fd5b818501915085601f8301126200080c57600080fd5b813581811115620008215762000821620007a4565b604051601f8201601f19908116603f011681019083821181831017156200084c576200084c620007a4565b816040528281528860208487010111156200086657600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6001600160a01b0383168152604060208201526000620008ac6040830184620006d9565b949350505050565b600060208284031215620008c757600080fd5b6200046082620004e5565b634e487b7160e01b600052603260045260246000fd5b600060208284031215620008fb57600080fd5b5051919050565b6001600160a01b0383168152604060208201526000620008ac60408301846200069156fe60806040526040516106fe3803806106fe83398101604081905261002291610319565b61002e82826000610035565b5050610436565b61003e8361006b565b60008251118061004b5750805b156100665761006483836100ab60201b6100291760201c565b505b505050565b610074816100d7565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606100d083836040518060600160405280602781526020016106d7602791396101a9565b9392505050565b6100ea8161022260201b6100551760201c565b6101515760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101887f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b61023160201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b6060600080856001600160a01b0316856040516101c691906103e7565b600060405180830381855af49150503d8060008114610201576040519150601f19603f3d011682016040523d82523d6000602084013e610206565b606091505b50909250905061021886838387610234565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102a357825160000361029c576001600160a01b0385163b61029c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610148565b50816102ad565b6102ad83836102b5565b949350505050565b8151156102c55781518083602001fd5b8060405162461bcd60e51b81526004016101489190610403565b634e487b7160e01b600052604160045260246000fd5b60005b838110156103105781810151838201526020016102f8565b50506000910152565b6000806040838503121561032c57600080fd5b82516001600160a01b038116811461034357600080fd5b60208401519092506001600160401b038082111561036057600080fd5b818501915085601f83011261037457600080fd5b815181811115610386576103866102df565b604051601f8201601f19908116603f011681019083821181831017156103ae576103ae6102df565b816040528281528860208487010111156103c757600080fd5b6103d88360208301602088016102f5565b80955050505050509250929050565b600082516103f98184602087016102f5565b9190910192915050565b60208152600082518060208401526104228160408501602087016102f5565b601f01601f19169190910160400192915050565b610292806104456000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025f602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b6060600080856001600160a01b0316856040516100e0919061020f565b600060405180830381855af49150503d806000811461011b576040519150601f19603f3d011682016040523d82523d6000602084013e610120565b606091505b50915091506101318683838761013b565b9695505050505050565b606083156101af5782516000036101a8576001600160a01b0385163b6101a85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064015b60405180910390fd5b50816101b9565b6101b983836101c1565b949350505050565b8151156101d15781518083602001fd5b8060405162461bcd60e51b815260040161019f919061022b565b60005b838110156102065781810151838201526020016101ee565b50506000910152565b600082516102218184602087016101eb565b9190910192915050565b602081526000825180602084015261024a8160408501602087016101eb565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c6343000811000a", - "devdoc": { - "details": "Release 1, Build 1", - "kind": "dev", - "methods": { - "implementation()": { - "details": "The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).", - "returns": { - "_0": "The address of the plugin implementation contract." - } - }, - "prepareInstallation(address,bytes)": { - "params": { - "_dao": "The address of the installing DAO.", - "_data": "The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file." - }, - "returns": { - "plugin": "The address of the `Plugin` contract being prepared for installation.", - "preparedSetupData": "The deployed plugin's relevant data which consists of helpers and permissions." - } - }, - "prepareUninstallation(address,(address,address[],bytes))": { - "params": { - "_dao": "The address of the uninstalling DAO.", - "_payload": "The relevant data necessary for the `prepareUninstallation`. See above." - }, - "returns": { - "permissions": "The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO." - } - }, - "prepareUpdate(address,uint16,(address,address[],bytes))": { - "params": { - "_currentBuild": "The build number of the plugin to update from.", - "_dao": "The address of the updating DAO.", - "_payload": "The relevant data necessary for the `prepareUpdate`. See above." - }, - "returns": { - "initData": "The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.", - "preparedSetupData": "The deployed plugin's relevant data which consists of helpers and permissions." - } - }, - "supportsInterface(bytes4)": { - "params": { - "_interfaceId": "The ID of the interface." - }, - "returns": { - "_0": "Returns `true` if the interface is supported." - } - } - }, - "title": "MyPluginSetup", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": { - "implementation()": { - "notice": "Returns the plugin implementation address." - }, - "prepareInstallation(address,bytes)": { - "notice": "Prepares the installation of a plugin." - }, - "prepareUninstallation(address,(address,address[],bytes))": { - "notice": "Prepares the uninstallation of a plugin." - }, - "prepareUpdate(address,uint16,(address,address[],bytes))": { - "notice": "Prepares the update of a plugin." - }, - "supportsInterface(bytes4)": { - "notice": "Checks if this or the parent contract supports an interface by its ID." - } - }, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } -} \ No newline at end of file diff --git a/packages/contracts/deployments/goerli/solcInputs/7d813fbc2dcf1a124495d2a664e7af9b.json b/packages/contracts/deployments/goerli/solcInputs/7d813fbc2dcf1a124495d2a664e7af9b.json deleted file mode 100644 index a2a2555b..00000000 --- a/packages/contracts/deployments/goerli/solcInputs/7d813fbc2dcf1a124495d2a664e7af9b.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "@aragon/osx/core/dao/DAO.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\nimport \"@openzeppelin/contracts/interfaces/IERC1271.sol\";\n\nimport {IProtocolVersion} from \"../../utils/protocol/IProtocolVersion.sol\";\nimport {ProtocolVersion} from \"../../utils/protocol/ProtocolVersion.sol\";\nimport {PermissionManager} from \"../permission/PermissionManager.sol\";\nimport {CallbackHandler} from \"../utils/CallbackHandler.sol\";\nimport {hasBit, flipBit} from \"../utils/BitMap.sol\";\nimport {IEIP4824} from \"./IEIP4824.sol\";\nimport {IDAO} from \"./IDAO.sol\";\n\n/// @title DAO\n/// @author Aragon Association - 2021-2023\n/// @notice This contract is the entry point to the Aragon DAO framework and provides our users a simple and easy to use public interface.\n/// @dev Public API of the Aragon DAO framework.\ncontract DAO is\n IEIP4824,\n Initializable,\n IERC1271,\n ERC165StorageUpgradeable,\n IDAO,\n UUPSUpgradeable,\n ProtocolVersion,\n PermissionManager,\n CallbackHandler\n{\n using SafeERC20Upgradeable for IERC20Upgradeable;\n using AddressUpgradeable for address;\n\n /// @notice The ID of the permission required to call the `execute` function.\n bytes32 public constant EXECUTE_PERMISSION_ID = keccak256(\"EXECUTE_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\n bytes32 public constant UPGRADE_DAO_PERMISSION_ID = keccak256(\"UPGRADE_DAO_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `setMetadata` function.\n bytes32 public constant SET_METADATA_PERMISSION_ID = keccak256(\"SET_METADATA_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `setTrustedForwarder` function.\n bytes32 public constant SET_TRUSTED_FORWARDER_PERMISSION_ID =\n keccak256(\"SET_TRUSTED_FORWARDER_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `setSignatureValidator` function.\n bytes32 public constant SET_SIGNATURE_VALIDATOR_PERMISSION_ID =\n keccak256(\"SET_SIGNATURE_VALIDATOR_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `registerStandardCallback` function.\n bytes32 public constant REGISTER_STANDARD_CALLBACK_PERMISSION_ID =\n keccak256(\"REGISTER_STANDARD_CALLBACK_PERMISSION\");\n\n /// @notice The internal constant storing the maximal action array length.\n uint256 internal constant MAX_ACTIONS = 256;\n\n /// @notice The first out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set inidicating that a function was not entered.\n uint256 private constant _NOT_ENTERED = 1;\n\n /// @notice The second out of two values to which the `_reentrancyStatus` state variable (used by the `nonReentrant` modifier) can be set inidicating that a function was entered.\n uint256 private constant _ENTERED = 2;\n\n /// @notice The [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\n /// @dev Added in v1.0.0.\n IERC1271 public signatureValidator;\n\n /// @notice The address of the trusted forwarder verifying meta transactions.\n /// @dev Added in v1.0.0.\n address private trustedForwarder;\n\n /// @notice The [EIP-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI.\n /// @dev Added in v1.0.0.\n string private _daoURI;\n\n /// @notice The state variable for the reentrancy guard of the `execute` function.\n /// @dev Added in v1.3.0. The variable can be of value `_NOT_ENTERED = 1` or `_ENTERED = 2` in usage and is initialized with `_NOT_ENTERED`.\n uint256 private _reentrancyStatus;\n\n /// @notice Thrown if a call is reentrant.\n error ReentrantCall();\n\n /// @notice Thrown if the action array length is larger than `MAX_ACTIONS`.\n error TooManyActions();\n\n /// @notice Thrown if action execution has failed.\n /// @param index The index of the action in the action array that failed.\n error ActionFailed(uint256 index);\n\n /// @notice Thrown if an action has insufficent gas left.\n error InsufficientGas();\n\n /// @notice Thrown if the deposit amount is zero.\n error ZeroAmount();\n\n /// @notice Thrown if there is a mismatch between the expected and actually deposited amount of native tokens.\n /// @param expected The expected native token amount.\n /// @param actual The actual native token amount deposited.\n error NativeTokenDepositAmountMismatch(uint256 expected, uint256 actual);\n\n /// @notice Thrown if an upgrade is not supported from a specific protocol version .\n error ProtocolVersionUpgradeNotSupported(uint8[3] protocolVersion);\n\n /// @notice Emitted when a new DAO URI is set.\n /// @param daoURI The new URI.\n event NewURI(string daoURI);\n\n /// @notice A modifier to protect a function from calling itself, directly or indirectly (reentrancy).\n /// @dev Currently, this modifier is only applied to the `execute()` function. If this is used multiple times, private `_beforeNonReentrant()` and `_afterNonReentrant()` functions should be created to prevent code duplication.\n modifier nonReentrant() {\n if (_reentrancyStatus == _ENTERED) {\n revert ReentrantCall();\n }\n _reentrancyStatus = _ENTERED;\n\n _;\n\n _reentrancyStatus = _NOT_ENTERED;\n }\n\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the DAO by\n /// - setting the reentrancy status variable to `_NOT_ENTERED`\n /// - registering the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID\n /// - setting the trusted forwarder for meta transactions\n /// - giving the `ROOT_PERMISSION_ID` permission to the initial owner (that should be revoked and transferred to the DAO after setup).\n /// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).\n /// @param _metadata IPFS hash that points to all the metadata (logo, description, tags, etc.) of a DAO.\n /// @param _initialOwner The initial owner of the DAO having the `ROOT_PERMISSION_ID` permission.\n /// @param _trustedForwarder The trusted forwarder responsible for verifying meta transactions.\n /// @param daoURI_ The DAO URI required to support [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824).\n function initialize(\n bytes calldata _metadata,\n address _initialOwner,\n address _trustedForwarder,\n string calldata daoURI_\n ) external reinitializer(2) {\n _reentrancyStatus = _NOT_ENTERED; // added in v1.3.0\n\n _registerInterface(type(IDAO).interfaceId);\n _registerInterface(type(IERC1271).interfaceId);\n _registerInterface(type(IEIP4824).interfaceId);\n _registerInterface(type(IProtocolVersion).interfaceId); // added in v1.3.0\n _registerTokenInterfaces();\n\n _setMetadata(_metadata);\n _setTrustedForwarder(_trustedForwarder);\n _setDaoURI(daoURI_);\n __PermissionManager_init(_initialOwner);\n }\n\n /// @notice Initializes the DAO after an upgrade from a previous protocol version.\n /// @param _previousProtocolVersion The semantic protocol version number of the previous DAO implementation contract this upgrade is transitioning from.\n /// @param _initData The initialization data to be passed to via `upgradeToAndCall` (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)).\n function initializeFrom(\n uint8[3] calldata _previousProtocolVersion,\n bytes calldata _initData\n ) external reinitializer(2) {\n _initData; // Silences the unused function parameter warning.\n\n // Check that the contract is not upgrading from a different major release.\n if (_previousProtocolVersion[0] != 1) {\n revert ProtocolVersionUpgradeNotSupported(_previousProtocolVersion);\n }\n\n // Initialize `_reentrancyStatus` that was added in v1.3.0.\n // Register Interface `ProtocolVersion` that was added in v1.3.0.\n if (_previousProtocolVersion[1] <= 2) {\n _reentrancyStatus = _NOT_ENTERED;\n _registerInterface(type(IProtocolVersion).interfaceId);\n }\n }\n\n /// @inheritdoc PermissionManager\n function isPermissionRestrictedForAnyAddr(\n bytes32 _permissionId\n ) internal pure override returns (bool) {\n return\n _permissionId == EXECUTE_PERMISSION_ID ||\n _permissionId == UPGRADE_DAO_PERMISSION_ID ||\n _permissionId == SET_METADATA_PERMISSION_ID ||\n _permissionId == SET_TRUSTED_FORWARDER_PERMISSION_ID ||\n _permissionId == SET_SIGNATURE_VALIDATOR_PERMISSION_ID ||\n _permissionId == REGISTER_STANDARD_CALLBACK_PERMISSION_ID;\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_DAO_PERMISSION_ID` permission.\n function _authorizeUpgrade(address) internal virtual override auth(UPGRADE_DAO_PERMISSION_ID) {}\n\n /// @inheritdoc IDAO\n function setTrustedForwarder(\n address _newTrustedForwarder\n ) external override auth(SET_TRUSTED_FORWARDER_PERMISSION_ID) {\n _setTrustedForwarder(_newTrustedForwarder);\n }\n\n /// @inheritdoc IDAO\n function getTrustedForwarder() external view virtual override returns (address) {\n return trustedForwarder;\n }\n\n /// @inheritdoc IDAO\n function hasPermission(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes memory _data\n ) external view override returns (bool) {\n return isGranted(_where, _who, _permissionId, _data);\n }\n\n /// @inheritdoc IDAO\n function setMetadata(\n bytes calldata _metadata\n ) external override auth(SET_METADATA_PERMISSION_ID) {\n _setMetadata(_metadata);\n }\n\n /// @inheritdoc IDAO\n function execute(\n bytes32 _callId,\n Action[] calldata _actions,\n uint256 _allowFailureMap\n )\n external\n override\n nonReentrant\n auth(EXECUTE_PERMISSION_ID)\n returns (bytes[] memory execResults, uint256 failureMap)\n {\n // Check that the action array length is within bounds.\n if (_actions.length > MAX_ACTIONS) {\n revert TooManyActions();\n }\n\n execResults = new bytes[](_actions.length);\n\n uint256 gasBefore;\n uint256 gasAfter;\n\n for (uint256 i = 0; i < _actions.length; ) {\n gasBefore = gasleft();\n\n (bool success, bytes memory result) = _actions[i].to.call{value: _actions[i].value}(\n _actions[i].data\n );\n gasAfter = gasleft();\n\n // Check if failure is allowed\n if (!hasBit(_allowFailureMap, uint8(i))) {\n // Check if the call failed.\n if (!success) {\n revert ActionFailed(i);\n }\n } else {\n // Check if the call failed.\n if (!success) {\n // Make sure that the action call did not fail because 63/64 of `gasleft()` was insufficient to execute the external call `.to.call` (see [ERC-150](https://eips.ethereum.org/EIPS/eip-150)).\n // In specific scenarios, i.e. proposal execution where the last action in the action array is allowed to fail, the account calling `execute` could force-fail this action by setting a gas limit\n // where 63/64 is insufficient causing the `.to.call` to fail, but where the remaining 1/64 gas are sufficient to successfully finish the `execute` call.\n if (gasAfter < gasBefore / 64) {\n revert InsufficientGas();\n }\n\n // Store that this action failed.\n failureMap = flipBit(failureMap, uint8(i));\n }\n }\n\n execResults[i] = result;\n\n unchecked {\n ++i;\n }\n }\n\n emit Executed({\n actor: msg.sender,\n callId: _callId,\n actions: _actions,\n allowFailureMap: _allowFailureMap,\n failureMap: failureMap,\n execResults: execResults\n });\n }\n\n /// @inheritdoc IDAO\n function deposit(\n address _token,\n uint256 _amount,\n string calldata _reference\n ) external payable override {\n if (_amount == 0) revert ZeroAmount();\n\n if (_token == address(0)) {\n if (msg.value != _amount)\n revert NativeTokenDepositAmountMismatch({expected: _amount, actual: msg.value});\n } else {\n if (msg.value != 0)\n revert NativeTokenDepositAmountMismatch({expected: 0, actual: msg.value});\n\n IERC20Upgradeable(_token).safeTransferFrom(msg.sender, address(this), _amount);\n }\n\n emit Deposited(msg.sender, _token, _amount, _reference);\n }\n\n /// @inheritdoc IDAO\n function setSignatureValidator(\n address _signatureValidator\n ) external override auth(SET_SIGNATURE_VALIDATOR_PERMISSION_ID) {\n signatureValidator = IERC1271(_signatureValidator);\n\n emit SignatureValidatorSet({signatureValidator: _signatureValidator});\n }\n\n /// @inheritdoc IDAO\n function isValidSignature(\n bytes32 _hash,\n bytes memory _signature\n ) external view override(IDAO, IERC1271) returns (bytes4) {\n if (address(signatureValidator) == address(0)) {\n // Return the invalid magic number\n return bytes4(0);\n }\n // Forward the call to the set signature validator contract\n return signatureValidator.isValidSignature(_hash, _signature);\n }\n\n /// @notice Emits the `NativeTokenDeposited` event to track native token deposits that weren't made via the deposit method.\n /// @dev This call is bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\n /// Gas cost increases in future hard forks might break this function. As an alternative, [ERC-2930](https://eips.ethereum.org/EIPS/eip-2930)-type transactions using access lists can be employed.\n receive() external payable {\n emit NativeTokenDeposited(msg.sender, msg.value);\n }\n\n /// @notice Fallback to handle future versions of the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) standard.\n /// @param _input An alias being equivalent to `msg.data`. This feature of the fallback function was introduced with the [solidity compiler version 0.7.6](https://github.com/ethereum/solidity/releases/tag/v0.7.6)\n /// @return The magic number registered for the function selector triggering the fallback.\n fallback(bytes calldata _input) external returns (bytes memory) {\n bytes4 magicNumber = _handleCallback(msg.sig, _input);\n return abi.encode(magicNumber);\n }\n\n /// @notice Emits the MetadataSet event if new metadata is set.\n /// @param _metadata Hash of the IPFS metadata object.\n function _setMetadata(bytes calldata _metadata) internal {\n emit MetadataSet(_metadata);\n }\n\n /// @notice Sets the trusted forwarder on the DAO and emits the associated event.\n /// @param _trustedForwarder The trusted forwarder address.\n function _setTrustedForwarder(address _trustedForwarder) internal {\n trustedForwarder = _trustedForwarder;\n\n emit TrustedForwarderSet(_trustedForwarder);\n }\n\n /// @notice Registers the [ERC-721](https://eips.ethereum.org/EIPS/eip-721) and [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) interfaces and callbacks.\n function _registerTokenInterfaces() private {\n _registerInterface(type(IERC721ReceiverUpgradeable).interfaceId);\n _registerInterface(type(IERC1155ReceiverUpgradeable).interfaceId);\n\n _registerCallback(\n IERC721ReceiverUpgradeable.onERC721Received.selector,\n IERC721ReceiverUpgradeable.onERC721Received.selector\n );\n _registerCallback(\n IERC1155ReceiverUpgradeable.onERC1155Received.selector,\n IERC1155ReceiverUpgradeable.onERC1155Received.selector\n );\n _registerCallback(\n IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector,\n IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector\n );\n }\n\n /// @inheritdoc IDAO\n function registerStandardCallback(\n bytes4 _interfaceId,\n bytes4 _callbackSelector,\n bytes4 _magicNumber\n ) external override auth(REGISTER_STANDARD_CALLBACK_PERMISSION_ID) {\n _registerInterface(_interfaceId);\n _registerCallback(_callbackSelector, _magicNumber);\n emit StandardCallbackRegistered(_interfaceId, _callbackSelector, _magicNumber);\n }\n\n /// @inheritdoc IEIP4824\n function daoURI() external view returns (string memory) {\n return _daoURI;\n }\n\n /// @notice Updates the set DAO URI to a new value.\n /// @param newDaoURI The new DAO URI to be set.\n function setDaoURI(string calldata newDaoURI) external auth(SET_METADATA_PERMISSION_ID) {\n _setDaoURI(newDaoURI);\n }\n\n /// @notice Sets the new [ERC-4824](https://eips.ethereum.org/EIPS/eip-4824) DAO URI and emits the associated event.\n /// @param daoURI_ The new DAO URI.\n function _setDaoURI(string calldata daoURI_) internal {\n _daoURI = daoURI_;\n\n emit NewURI(daoURI_);\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[46] private __gap;\n}\n" - }, - "@aragon/osx/core/dao/IDAO.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IDAO\n/// @author Aragon Association - 2022-2023\n/// @notice The interface required for DAOs within the Aragon App DAO framework.\ninterface IDAO {\n /// @notice The action struct to be consumed by the DAO's `execute` function resulting in an external call.\n /// @param to The address to call.\n /// @param value The native token value to be sent with the call.\n /// @param data The bytes-encoded function selector and calldata for the call.\n struct Action {\n address to;\n uint256 value;\n bytes data;\n }\n\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\n /// @param _where The address of the contract.\n /// @param _who The address of a EOA or contract to give the permissions.\n /// @param _permissionId The permission identifier.\n /// @param _data The optional data passed to the `PermissionCondition` registered.\n /// @return Returns true if the address has permission, false if not.\n function hasPermission(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes memory _data\n ) external view returns (bool);\n\n /// @notice Updates the DAO metadata (e.g., an IPFS hash).\n /// @param _metadata The IPFS hash of the new metadata object.\n function setMetadata(bytes calldata _metadata) external;\n\n /// @notice Emitted when the DAO metadata is updated.\n /// @param metadata The IPFS hash of the new metadata object.\n event MetadataSet(bytes metadata);\n\n /// @notice Executes a list of actions. If a zero allow-failure map is provided, a failing action reverts the entire execution. If a non-zero allow-failure map is provided, allowed actions can fail without the entire call being reverted.\n /// @param _callId The ID of the call. The definition of the value of `callId` is up to the calling contract and can be used, e.g., as a nonce.\n /// @param _actions The array of actions.\n /// @param _allowFailureMap A bitmap allowing execution to succeed, even if individual actions might revert. If the bit at index `i` is 1, the execution succeeds even if the `i`th action reverts. A failure map value of 0 requires every action to not revert.\n /// @return The array of results obtained from the executed actions in `bytes`.\n /// @return The resulting failure map containing the actions have actually failed.\n function execute(\n bytes32 _callId,\n Action[] memory _actions,\n uint256 _allowFailureMap\n ) external returns (bytes[] memory, uint256);\n\n /// @notice Emitted when a proposal is executed.\n /// @param actor The address of the caller.\n /// @param callId The ID of the call.\n /// @param actions The array of actions executed.\n /// @param allowFailureMap The allow failure map encoding which actions are allowed to fail.\n /// @param failureMap The failure map encoding which actions have failed.\n /// @param execResults The array with the results of the executed actions.\n /// @dev The value of `callId` is defined by the component/contract calling the execute function. A `Plugin` implementation can use it, for example, as a nonce.\n event Executed(\n address indexed actor,\n bytes32 callId,\n Action[] actions,\n uint256 allowFailureMap,\n uint256 failureMap,\n bytes[] execResults\n );\n\n /// @notice Emitted when a standard callback is registered.\n /// @param interfaceId The ID of the interface.\n /// @param callbackSelector The selector of the callback function.\n /// @param magicNumber The magic number to be registered for the callback function selector.\n event StandardCallbackRegistered(\n bytes4 interfaceId,\n bytes4 callbackSelector,\n bytes4 magicNumber\n );\n\n /// @notice Deposits (native) tokens to the DAO contract with a reference string.\n /// @param _token The address of the token or address(0) in case of the native token.\n /// @param _amount The amount of tokens to deposit.\n /// @param _reference The reference describing the deposit reason.\n function deposit(address _token, uint256 _amount, string calldata _reference) external payable;\n\n /// @notice Emitted when a token deposit has been made to the DAO.\n /// @param sender The address of the sender.\n /// @param token The address of the deposited token.\n /// @param amount The amount of tokens deposited.\n /// @param _reference The reference describing the deposit reason.\n event Deposited(\n address indexed sender,\n address indexed token,\n uint256 amount,\n string _reference\n );\n\n /// @notice Emitted when a native token deposit has been made to the DAO.\n /// @dev This event is intended to be emitted in the `receive` function and is therefore bound by the gas limitations for `send`/`transfer` calls introduced by [ERC-2929](https://eips.ethereum.org/EIPS/eip-2929).\n /// @param sender The address of the sender.\n /// @param amount The amount of native tokens deposited.\n event NativeTokenDeposited(address sender, uint256 amount);\n\n /// @notice Setter for the trusted forwarder verifying the meta transaction.\n /// @param _trustedForwarder The trusted forwarder address.\n function setTrustedForwarder(address _trustedForwarder) external;\n\n /// @notice Getter for the trusted forwarder verifying the meta transaction.\n /// @return The trusted forwarder address.\n function getTrustedForwarder() external view returns (address);\n\n /// @notice Emitted when a new TrustedForwarder is set on the DAO.\n /// @param forwarder the new forwarder address.\n event TrustedForwarderSet(address forwarder);\n\n /// @notice Setter for the [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\n /// @param _signatureValidator The address of the signature validator.\n function setSignatureValidator(address _signatureValidator) external;\n\n /// @notice Emitted when the signature validator address is updated.\n /// @param signatureValidator The address of the signature validator.\n event SignatureValidatorSet(address signatureValidator);\n\n /// @notice Checks whether a signature is valid for the provided hash by forwarding the call to the set [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) signature validator contract.\n /// @param _hash The hash of the data to be signed.\n /// @param _signature The signature byte array associated with `_hash`.\n /// @return Returns the `bytes4` magic value `0x1626ba7e` if the signature is valid.\n function isValidSignature(bytes32 _hash, bytes memory _signature) external returns (bytes4);\n\n /// @notice Registers an ERC standard having a callback by registering its [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID and callback function signature.\n /// @param _interfaceId The ID of the interface.\n /// @param _callbackSelector The selector of the callback function.\n /// @param _magicNumber The magic number to be registered for the function signature.\n function registerStandardCallback(\n bytes4 _interfaceId,\n bytes4 _callbackSelector,\n bytes4 _magicNumber\n ) external;\n}\n" - }, - "@aragon/osx/core/dao/IEIP4824.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @title EIP-4824 Common Interfaces for DAOs\n/// @dev See https://eips.ethereum.org/EIPS/eip-4824\n/// @author Aragon Association - 2021-2023\ninterface IEIP4824 {\n /// @notice A distinct Uniform Resource Identifier (URI) pointing to a JSON object following the \"EIP-4824 DAO JSON-LD Schema\". This JSON file splits into four URIs: membersURI, proposalsURI, activityLogURI, and governanceURI. The membersURI should point to a JSON file that conforms to the \"EIP-4824 Members JSON-LD Schema\". The proposalsURI should point to a JSON file that conforms to the \"EIP-4824 Proposals JSON-LD Schema\". The activityLogURI should point to a JSON file that conforms to the \"EIP-4824 Activity Log JSON-LD Schema\". The governanceURI should point to a flatfile, normatively a .md file. Each of the JSON files named above can be statically hosted or dynamically-generated.\n /// @return _daoURI The DAO URI.\n function daoURI() external view returns (string memory _daoURI);\n}\n" - }, - "@aragon/osx/core/permission/IPermissionCondition.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IPermissionCondition\n/// @author Aragon Association - 2021-2023\n/// @notice This interface can be implemented to support more customary permissions depending on on- or off-chain state, e.g., by querying token ownershop or a secondary condition, respectively.\ninterface IPermissionCondition {\n /// @notice This method is used to check if a call is permitted.\n /// @param _where The address of the target contract.\n /// @param _who The address (EOA or contract) for which the permissions are checked.\n /// @param _permissionId The permission identifier.\n /// @param _data Optional data passed to the `PermissionCondition` implementation.\n /// @return allowed Returns true if the call is permitted.\n function isGranted(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes calldata _data\n ) external view returns (bool allowed);\n}\n" - }, - "@aragon/osx/core/permission/PermissionCondition.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nimport {IPermissionCondition} from \"./IPermissionCondition.sol\";\n\n/// @title PermissionCondition\n/// @author Aragon Association - 2023\n/// @notice An abstract contract for non-upgradeable contracts instantiated via the `new` keyword to inherit from to support customary permissions depending on arbitrary on-chain state.\nabstract contract PermissionCondition is ERC165, IPermissionCondition {\n /// @notice Checks if an interface is supported by this or its parent contract.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view override returns (bool) {\n return\n _interfaceId == type(IPermissionCondition).interfaceId ||\n super.supportsInterface(_interfaceId);\n }\n}\n" - }, - "@aragon/osx/core/permission/PermissionLib.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title PermissionLib\n/// @author Aragon Association - 2021-2023\n/// @notice A library containing objects for permission processing.\nlibrary PermissionLib {\n /// @notice A constant expressing that no condition is applied to a permission.\n address public constant NO_CONDITION = address(0);\n\n /// @notice The types of permission operations available in the `PermissionManager`.\n /// @param Grant The grant operation setting a permission without a condition.\n /// @param Revoke The revoke operation removing a permission (that was granted with or without a condition).\n /// @param GrantWithCondition The grant operation setting a permission with a condition.\n enum Operation {\n Grant,\n Revoke,\n GrantWithCondition\n }\n\n /// @notice A struct containing the information for a permission to be applied on a single target contract without a condition.\n /// @param operation The permission operation type.\n /// @param who The address (EOA or contract) receiving the permission.\n /// @param permissionId The permission identifier.\n struct SingleTargetPermission {\n Operation operation;\n address who;\n bytes32 permissionId;\n }\n\n /// @notice A struct containing the information for a permission to be applied on multiple target contracts, optionally, with a condition.\n /// @param operation The permission operation type.\n /// @param where The address of the target contract for which `who` receives permission.\n /// @param who The address (EOA or contract) receiving the permission.\n /// @param condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\n /// @param permissionId The permission identifier.\n struct MultiTargetPermission {\n Operation operation;\n address where;\n address who;\n address condition;\n bytes32 permissionId;\n }\n}\n" - }, - "@aragon/osx/core/permission/PermissionManager.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\n\nimport {IPermissionCondition} from \"./IPermissionCondition.sol\";\nimport {PermissionCondition} from \"./PermissionCondition.sol\";\nimport \"./PermissionLib.sol\";\n\n/// @title PermissionManager\n/// @author Aragon Association - 2021-2023\n/// @notice The abstract permission manager used in a DAO, its associated plugins, and other framework-related components.\nabstract contract PermissionManager is Initializable {\n using AddressUpgradeable for address;\n\n /// @notice The ID of the permission required to call the `grant`, `grantWithCondition`, `revoke`, and `bulk` function.\n bytes32 public constant ROOT_PERMISSION_ID = keccak256(\"ROOT_PERMISSION\");\n\n /// @notice A special address encoding permissions that are valid for any address `who` or `where`.\n address internal constant ANY_ADDR = address(type(uint160).max);\n\n /// @notice A special address encoding if a permissions is not set and therefore not allowed.\n address internal constant UNSET_FLAG = address(0);\n\n /// @notice A special address encoding if a permission is allowed.\n address internal constant ALLOW_FLAG = address(2);\n\n /// @notice A mapping storing permissions as hashes (i.e., `permissionHash(where, who, permissionId)`) and their status encoded by an address (unset, allowed, or redirecting to a `PermissionCondition`).\n mapping(bytes32 => address) internal permissionsHashed;\n\n /// @notice Thrown if a call is unauthorized.\n /// @param where The context in which the authorization reverted.\n /// @param who The address (EOA or contract) missing the permission.\n /// @param permissionId The permission identifier.\n error Unauthorized(address where, address who, bytes32 permissionId);\n\n /// @notice Thrown if a permission has been already granted with a different condition.\n /// @dev This makes sure that condition on the same permission can not be overwriten by a different condition.\n /// @param where The address of the target contract to grant `_who` permission to.\n /// @param who The address (EOA or contract) to which the permission has already been granted.\n /// @param permissionId The permission identifier.\n /// @param currentCondition The current condition set for permissionId.\n /// @param newCondition The new condition it tries to set for permissionId.\n error PermissionAlreadyGrantedForDifferentCondition(\n address where,\n address who,\n bytes32 permissionId,\n address currentCondition,\n address newCondition\n );\n\n /// @notice Thrown if a condition address is not a contract.\n /// @param condition The address that is not a contract.\n error ConditionNotAContract(IPermissionCondition condition);\n\n /// @notice Thrown if a condition contract does not support the `IPermissionCondition` interface.\n /// @param condition The address that is not a contract.\n error ConditionInterfacNotSupported(IPermissionCondition condition);\n\n /// @notice Thrown for `ROOT_PERMISSION_ID` or `EXECUTE_PERMISSION_ID` permission grants where `who` or `where` is `ANY_ADDR`.\n\n error PermissionsForAnyAddressDisallowed();\n\n /// @notice Thrown for permission grants where `who` and `where` are both `ANY_ADDR`.\n error AnyAddressDisallowedForWhoAndWhere();\n\n /// @notice Thrown if `Operation.GrantWithCondition` is requested as an operation but the method does not support it.\n error GrantWithConditionNotSupported();\n\n /// @notice Emitted when a permission `permission` is granted in the context `here` to the address `_who` for the contract `_where`.\n /// @param permissionId The permission identifier.\n /// @param here The address of the context in which the permission is granted.\n /// @param where The address of the target contract for which `_who` receives permission.\n /// @param who The address (EOA or contract) receiving the permission.\n /// @param condition The address `ALLOW_FLAG` for regular permissions or, alternatively, the `IPermissionCondition` contract implementation to be used.\n event Granted(\n bytes32 indexed permissionId,\n address indexed here,\n address where,\n address indexed who,\n address condition\n );\n\n /// @notice Emitted when a permission `permission` is revoked in the context `here` from the address `_who` for the contract `_where`.\n /// @param permissionId The permission identifier.\n /// @param here The address of the context in which the permission is revoked.\n /// @param where The address of the target contract for which `_who` loses permission.\n /// @param who The address (EOA or contract) losing the permission.\n event Revoked(\n bytes32 indexed permissionId,\n address indexed here,\n address where,\n address indexed who\n );\n\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through this permission manager.\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\n modifier auth(bytes32 _permissionId) {\n _auth(_permissionId);\n _;\n }\n\n /// @notice Initialization method to set the initial owner of the permission manager.\n /// @dev The initial owner is granted the `ROOT_PERMISSION_ID` permission.\n /// @param _initialOwner The initial owner of the permission manager.\n function __PermissionManager_init(address _initialOwner) internal onlyInitializing {\n _initializePermissionManager(_initialOwner);\n }\n\n /// @notice Grants permission to an address to call methods in a contract guarded by an auth modifier with the specified permission identifier.\n /// @dev Requires the `ROOT_PERMISSION_ID` permission.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) receiving the permission.\n /// @param _permissionId The permission identifier.\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function grant(\n address _where,\n address _who,\n bytes32 _permissionId\n ) external virtual auth(ROOT_PERMISSION_ID) {\n _grant(_where, _who, _permissionId);\n }\n\n /// @notice Grants permission to an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier if the referenced condition permits it.\n /// @dev Requires the `ROOT_PERMISSION_ID` permission\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) receiving the permission.\n /// @param _permissionId The permission identifier.\n /// @param _condition The `PermissionCondition` that will be asked for authorization on calls connected to the specified permission identifier.\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function grantWithCondition(\n address _where,\n address _who,\n bytes32 _permissionId,\n IPermissionCondition _condition\n ) external virtual auth(ROOT_PERMISSION_ID) {\n _grantWithCondition(_where, _who, _permissionId, _condition);\n }\n\n /// @notice Revokes permission from an address to call methods in a target contract guarded by an auth modifier with the specified permission identifier.\n /// @dev Requires the `ROOT_PERMISSION_ID` permission.\n /// @param _where The address of the target contract for which `_who` loses permission.\n /// @param _who The address (EOA or contract) losing the permission.\n /// @param _permissionId The permission identifier.\n /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function revoke(\n address _where,\n address _who,\n bytes32 _permissionId\n ) external virtual auth(ROOT_PERMISSION_ID) {\n _revoke(_where, _who, _permissionId);\n }\n\n /// @notice Applies an array of permission operations on a single target contracts `_where`.\n /// @param _where The address of the single target contract.\n /// @param items The array of single-targeted permission operations to apply.\n function applySingleTargetPermissions(\n address _where,\n PermissionLib.SingleTargetPermission[] calldata items\n ) external virtual auth(ROOT_PERMISSION_ID) {\n for (uint256 i; i < items.length; ) {\n PermissionLib.SingleTargetPermission memory item = items[i];\n\n if (item.operation == PermissionLib.Operation.Grant) {\n _grant(_where, item.who, item.permissionId);\n } else if (item.operation == PermissionLib.Operation.Revoke) {\n _revoke(_where, item.who, item.permissionId);\n } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\n revert GrantWithConditionNotSupported();\n }\n\n unchecked {\n ++i;\n }\n }\n }\n\n /// @notice Applies an array of permission operations on multiple target contracts `items[i].where`.\n /// @param _items The array of multi-targeted permission operations to apply.\n function applyMultiTargetPermissions(\n PermissionLib.MultiTargetPermission[] calldata _items\n ) external virtual auth(ROOT_PERMISSION_ID) {\n for (uint256 i; i < _items.length; ) {\n PermissionLib.MultiTargetPermission memory item = _items[i];\n\n if (item.operation == PermissionLib.Operation.Grant) {\n _grant(item.where, item.who, item.permissionId);\n } else if (item.operation == PermissionLib.Operation.Revoke) {\n _revoke(item.where, item.who, item.permissionId);\n } else if (item.operation == PermissionLib.Operation.GrantWithCondition) {\n _grantWithCondition(\n item.where,\n item.who,\n item.permissionId,\n IPermissionCondition(item.condition)\n );\n }\n\n unchecked {\n ++i;\n }\n }\n }\n\n /// @notice Checks if an address has permission on a contract via a permission identifier and considers if `ANY_ADDRESS` was used in the granting process.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) for which the permission is checked.\n /// @param _permissionId The permission identifier.\n /// @param _data The optional data passed to the `PermissionCondition` registered.\n /// @return Returns true if `_who` has the permissions on the target contract via the specified permission identifier.\n function isGranted(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes memory _data\n ) public view virtual returns (bool) {\n return\n _isGranted(_where, _who, _permissionId, _data) || // check if `_who` has permission for `_permissionId` on `_where`\n _isGranted(_where, ANY_ADDR, _permissionId, _data) || // check if anyone has permission for `_permissionId` on `_where`\n _isGranted(ANY_ADDR, _who, _permissionId, _data); // check if `_who` has permission for `_permissionI` on any contract\n }\n\n /// @notice Grants the `ROOT_PERMISSION_ID` permission to the initial owner during initialization of the permission manager.\n /// @param _initialOwner The initial owner of the permission manager.\n function _initializePermissionManager(address _initialOwner) internal {\n _grant(address(this), _initialOwner, ROOT_PERMISSION_ID);\n }\n\n /// @notice This method is used in the external `grant` method of the permission manager.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function _grant(address _where, address _who, bytes32 _permissionId) internal virtual {\n if (_where == ANY_ADDR || _who == ANY_ADDR) {\n revert PermissionsForAnyAddressDisallowed();\n }\n\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\n\n address currentFlag = permissionsHashed[permHash];\n\n // Means permHash is not currently set.\n if (currentFlag == UNSET_FLAG) {\n permissionsHashed[permHash] = ALLOW_FLAG;\n\n emit Granted(_permissionId, msg.sender, _where, _who, ALLOW_FLAG);\n }\n }\n\n /// @notice This method is used in the external `grantWithCondition` method of the permission manager.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @param _condition An address either resolving to a `PermissionCondition` contract address or being the `ALLOW_FLAG` address (`address(2)`).\n /// @dev Note, that granting permissions with `_who` or `_where` equal to `ANY_ADDR` does not replace other permissions with specific `_who` and `_where` addresses that exist in parallel.\n function _grantWithCondition(\n address _where,\n address _who,\n bytes32 _permissionId,\n IPermissionCondition _condition\n ) internal virtual {\n address conditionAddr = address(_condition);\n\n if (!conditionAddr.isContract()) {\n revert ConditionNotAContract(_condition);\n }\n\n if (\n !PermissionCondition(conditionAddr).supportsInterface(\n type(IPermissionCondition).interfaceId\n )\n ) {\n revert ConditionInterfacNotSupported(_condition);\n }\n\n if (_where == ANY_ADDR && _who == ANY_ADDR) {\n revert AnyAddressDisallowedForWhoAndWhere();\n }\n\n if (_where == ANY_ADDR || _who == ANY_ADDR) {\n if (\n _permissionId == ROOT_PERMISSION_ID ||\n isPermissionRestrictedForAnyAddr(_permissionId)\n ) {\n revert PermissionsForAnyAddressDisallowed();\n }\n }\n\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\n\n address currentCondition = permissionsHashed[permHash];\n\n // Means permHash is not currently set.\n if (currentCondition == UNSET_FLAG) {\n permissionsHashed[permHash] = conditionAddr;\n\n emit Granted(_permissionId, msg.sender, _where, _who, conditionAddr);\n } else if (currentCondition != conditionAddr) {\n // Revert if `permHash` is already granted, but uses a different condition.\n // If we don't revert, we either should:\n // - allow overriding the condition on the same permission\n // which could be confusing whoever granted the same permission first\n // - or do nothing and succeed silently which could be confusing for the caller.\n revert PermissionAlreadyGrantedForDifferentCondition({\n where: _where,\n who: _who,\n permissionId: _permissionId,\n currentCondition: currentCondition,\n newCondition: conditionAddr\n });\n }\n }\n\n /// @notice This method is used in the public `revoke` method of the permission manager.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @dev Note, that revoking permissions with `_who` or `_where` equal to `ANY_ADDR` does not revoke other permissions with specific `_who` and `_where` addresses that might have been granted in parallel.\n function _revoke(address _where, address _who, bytes32 _permissionId) internal virtual {\n bytes32 permHash = permissionHash(_where, _who, _permissionId);\n if (permissionsHashed[permHash] != UNSET_FLAG) {\n permissionsHashed[permHash] = UNSET_FLAG;\n\n emit Revoked(_permissionId, msg.sender, _where, _who);\n }\n }\n\n /// @notice Checks if a caller is granted permissions on a target contract via a permission identifier and redirects the approval to a `PermissionCondition` if this was specified in the setup.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @param _data The optional data passed to the `PermissionCondition` registered.\n /// @return Returns true if `_who` has the permissions on the contract via the specified permissionId identifier.\n function _isGranted(\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes memory _data\n ) internal view virtual returns (bool) {\n address accessFlagOrCondition = permissionsHashed[\n permissionHash(_where, _who, _permissionId)\n ];\n\n if (accessFlagOrCondition == UNSET_FLAG) return false;\n if (accessFlagOrCondition == ALLOW_FLAG) return true;\n\n // Since it's not a flag, assume it's a PermissionCondition and try-catch to skip failures\n try\n IPermissionCondition(accessFlagOrCondition).isGranted(\n _where,\n _who,\n _permissionId,\n _data\n )\n returns (bool allowed) {\n if (allowed) return true;\n } catch {}\n\n return false;\n }\n\n /// @notice A private function to be used to check permissions on the permission manager contract (`address(this)`) itself.\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\n function _auth(bytes32 _permissionId) internal view virtual {\n if (!isGranted(address(this), msg.sender, _permissionId, msg.data)) {\n revert Unauthorized({\n where: address(this),\n who: msg.sender,\n permissionId: _permissionId\n });\n }\n }\n\n /// @notice Generates the hash for the `permissionsHashed` mapping obtained from the word \"PERMISSION\", the contract address, the address owning the permission, and the permission identifier.\n /// @param _where The address of the target contract for which `_who` receives permission.\n /// @param _who The address (EOA or contract) owning the permission.\n /// @param _permissionId The permission identifier.\n /// @return The permission hash.\n function permissionHash(\n address _where,\n address _who,\n bytes32 _permissionId\n ) internal pure virtual returns (bytes32) {\n return keccak256(abi.encodePacked(\"PERMISSION\", _who, _where, _permissionId));\n }\n\n /// @notice Decides if the granting permissionId is restricted when `_who == ANY_ADDR` or `_where == ANY_ADDR`.\n /// @param _permissionId The permission identifier.\n /// @return Whether or not the permission is restricted.\n /// @dev By default, every permission is unrestricted and it is the derived contract's responsibility to override it. Note, that the `ROOT_PERMISSION_ID` is included and not required to be set it again.\n function isPermissionRestrictedForAnyAddr(\n bytes32 _permissionId\n ) internal view virtual returns (bool) {\n (_permissionId); // silence the warning.\n return false;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[49] private __gap;\n}\n" - }, - "@aragon/osx/core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {ContextUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\";\n\nimport {IDAO} from \"../../dao/IDAO.sol\";\nimport {_auth} from \"../../utils/auth.sol\";\n\n/// @title DaoAuthorizableUpgradeable\n/// @author Aragon Association - 2022-2023\n/// @notice An abstract contract providing a meta-transaction compatible modifier for upgradeable or cloneable contracts to authorize function calls through an associated DAO.\n/// @dev Make sure to call `__DaoAuthorizableUpgradeable_init` during initialization of the inheriting contract.\nabstract contract DaoAuthorizableUpgradeable is ContextUpgradeable {\n /// @notice The associated DAO managing the permissions of inheriting contracts.\n IDAO private dao_;\n\n /// @notice Initializes the contract by setting the associated DAO.\n /// @param _dao The associated DAO address.\n function __DaoAuthorizableUpgradeable_init(IDAO _dao) internal onlyInitializing {\n dao_ = _dao;\n }\n\n /// @notice Returns the DAO contract.\n /// @return The DAO contract.\n function dao() public view returns (IDAO) {\n return dao_;\n }\n\n /// @notice A modifier to make functions on inheriting contracts authorized. Permissions to call the function are checked through the associated DAO's permission manager.\n /// @param _permissionId The permission identifier required to call the method this modifier is applied to.\n modifier auth(bytes32 _permissionId) {\n _auth(dao_, address(this), _msgSender(), _permissionId, _msgData());\n _;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[49] private __gap;\n}\n" - }, - "@aragon/osx/core/plugin/IPlugin.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IPlugin\n/// @author Aragon Association - 2022-2023\n/// @notice An interface defining the traits of a plugin.\ninterface IPlugin {\n enum PluginType {\n UUPS,\n Cloneable,\n Constructable\n }\n\n /// @notice Returns the plugin's type\n function pluginType() external view returns (PluginType);\n}\n" - }, - "@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {IERC1822ProxiableUpgradeable} from \"@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol\";\nimport {ERC165Upgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\";\n\nimport {IDAO} from \"../dao/IDAO.sol\";\nimport {DaoAuthorizableUpgradeable} from \"./dao-authorizable/DaoAuthorizableUpgradeable.sol\";\nimport {IPlugin} from \"./IPlugin.sol\";\n\n/// @title PluginUUPSUpgradeable\n/// @author Aragon Association - 2022-2023\n/// @notice An abstract, upgradeable contract to inherit from when creating a plugin being deployed via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\nabstract contract PluginUUPSUpgradeable is\n IPlugin,\n ERC165Upgradeable,\n UUPSUpgradeable,\n DaoAuthorizableUpgradeable\n{\n // NOTE: When adding new state variables to the contract, the size of `_gap` has to be adapted below as well.\n\n /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized.\n constructor() {\n _disableInitializers();\n }\n\n /// @inheritdoc IPlugin\n function pluginType() public pure override returns (PluginType) {\n return PluginType.UUPS;\n }\n\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\n bytes32 public constant UPGRADE_PLUGIN_PERMISSION_ID = keccak256(\"UPGRADE_PLUGIN_PERMISSION\");\n\n /// @notice Initializes the plugin by storing the associated DAO.\n /// @param _dao The DAO contract.\n function __PluginUUPSUpgradeable_init(IDAO _dao) internal virtual onlyInitializing {\n __DaoAuthorizableUpgradeable_init(_dao);\n }\n\n /// @notice Checks if an interface is supported by this or its parent contract.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n return\n _interfaceId == type(IPlugin).interfaceId ||\n _interfaceId == type(IERC1822ProxiableUpgradeable).interfaceId ||\n super.supportsInterface(_interfaceId);\n }\n\n /// @notice Returns the address of the implementation contract in the [proxy storage slot](https://eips.ethereum.org/EIPS/eip-1967) slot the [UUPS proxy](https://eips.ethereum.org/EIPS/eip-1822) is pointing to.\n /// @return The address of the implementation contract.\n function implementation() public view returns (address) {\n return _getImplementation();\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_PLUGIN_PERMISSION_ID` permission.\n function _authorizeUpgrade(\n address\n ) internal virtual override auth(UPGRADE_PLUGIN_PERMISSION_ID) {}\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[50] private __gap;\n}\n" - }, - "@aragon/osx/core/utils/auth.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {IDAO} from \"../dao/IDAO.sol\";\n\n/// @notice Thrown if a call is unauthorized in the associated DAO.\n/// @param dao The associated DAO.\n/// @param where The context in which the authorization reverted.\n/// @param who The address (EOA or contract) missing the permission.\n/// @param permissionId The permission identifier.\nerror DaoUnauthorized(address dao, address where, address who, bytes32 permissionId);\n\n/// @notice A free function checking if a caller is granted permissions on a target contract via a permission identifier that redirects the approval to a `PermissionCondition` if this was specified in the setup.\n/// @param _where The address of the target contract for which `who` receives permission.\n/// @param _who The address (EOA or contract) owning the permission.\n/// @param _permissionId The permission identifier.\n/// @param _data The optional data passed to the `PermissionCondition` registered.\nfunction _auth(\n IDAO _dao,\n address _where,\n address _who,\n bytes32 _permissionId,\n bytes calldata _data\n) view {\n if (!_dao.hasPermission(_where, _who, _permissionId, _data))\n revert DaoUnauthorized({\n dao: address(_dao),\n where: _where,\n who: _who,\n permissionId: _permissionId\n });\n}\n" - }, - "@aragon/osx/core/utils/BitMap.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @param bitmap The `uint256` representation of bits.\n/// @param index The index number to check whether 1 or 0 is set.\n/// @return Returns `true` if the bit is set at `index` on `bitmap`.\nfunction hasBit(uint256 bitmap, uint8 index) pure returns (bool) {\n uint256 bitValue = bitmap & (1 << index);\n return bitValue > 0;\n}\n\n/// @param bitmap The `uint256` representation of bits.\n/// @param index The index number to set the bit.\n/// @return Returns a new number in which the bit is set at `index`.\nfunction flipBit(uint256 bitmap, uint8 index) pure returns (uint256) {\n return bitmap ^ (1 << index);\n}\n" - }, - "@aragon/osx/core/utils/CallbackHandler.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @title CallbackHandler\n/// @author Aragon Association - 2022-2023\n/// @notice This contract handles callbacks by registering a magic number together with the callback function's selector. It provides the `_handleCallback` function that inheriting contracts have to call inside their `fallback()` function (`_handleCallback(msg.callbackSelector, msg.data)`). This allows to adaptively register ERC standards (e.g., [ERC-721](https://eips.ethereum.org/EIPS/eip-721), [ERC-1115](https://eips.ethereum.org/EIPS/eip-1155), or future versions of [ERC-165](https://eips.ethereum.org/EIPS/eip-165)) and returning the required magic numbers for the associated callback functions for the inheriting contract so that it doesn't need to be upgraded.\n/// @dev This callback handling functionality is intented to be used by executor contracts (i.e., `DAO.sol`).\nabstract contract CallbackHandler {\n /// @notice A mapping between callback function selectors and magic return numbers.\n mapping(bytes4 => bytes4) internal callbackMagicNumbers;\n\n /// @notice The magic number refering to unregistered callbacks.\n bytes4 internal constant UNREGISTERED_CALLBACK = bytes4(0);\n\n /// @notice Thrown if the callback function is not registered.\n /// @param callbackSelector The selector of the callback function.\n /// @param magicNumber The magic number to be registered for the callback function selector.\n error UnkownCallback(bytes4 callbackSelector, bytes4 magicNumber);\n\n /// @notice Emitted when `_handleCallback` is called.\n /// @param sender Who called the callback.\n /// @param sig The function signature.\n /// @param data The calldata.\n event CallbackReceived(address sender, bytes4 indexed sig, bytes data);\n\n /// @notice Handles callbacks to adaptively support ERC standards.\n /// @dev This function is supposed to be called via `_handleCallback(msg.sig, msg.data)` in the `fallback()` function of the inheriting contract.\n /// @param _callbackSelector The function selector of the callback function.\n /// @param _data The calldata.\n /// @return The magic number registered for the function selector triggering the fallback.\n function _handleCallback(\n bytes4 _callbackSelector,\n bytes memory _data\n ) internal virtual returns (bytes4) {\n bytes4 magicNumber = callbackMagicNumbers[_callbackSelector];\n if (magicNumber == UNREGISTERED_CALLBACK) {\n revert UnkownCallback({callbackSelector: _callbackSelector, magicNumber: magicNumber});\n }\n\n emit CallbackReceived({sender: msg.sender, sig: _callbackSelector, data: _data});\n\n return magicNumber;\n }\n\n /// @notice Registers a magic number for a callback function selector.\n /// @param _callbackSelector The selector of the callback function.\n /// @param _magicNumber The magic number to be registered for the callback function selector.\n function _registerCallback(bytes4 _callbackSelector, bytes4 _magicNumber) internal virtual {\n callbackMagicNumbers[_callbackSelector] = _magicNumber;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[49] private __gap;\n}\n" - }, - "@aragon/osx/framework/plugin/repo/IPluginRepo.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @title IPluginRepo\n/// @author Aragon Association - 2022-2023\n/// @notice The interface required for a plugin repository.\ninterface IPluginRepo {\n /// @notice Updates the metadata for release with content `@fromHex(_releaseMetadata)`.\n /// @param _release The release number.\n /// @param _releaseMetadata The release metadata URI.\n function updateReleaseMetadata(uint8 _release, bytes calldata _releaseMetadata) external;\n\n /// @notice Creates a new plugin version as the latest build for an existing release number or the first build for a new release number for the provided `PluginSetup` contract address and metadata.\n /// @param _release The release number.\n /// @param _pluginSetupAddress The address of the plugin setup contract.\n /// @param _buildMetadata The build metadata URI.\n /// @param _releaseMetadata The release metadata URI.\n function createVersion(\n uint8 _release,\n address _pluginSetupAddress,\n bytes calldata _buildMetadata,\n bytes calldata _releaseMetadata\n ) external;\n}\n" - }, - "@aragon/osx/framework/plugin/repo/PluginRepo.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {Initializable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport {ERC165Upgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol\";\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {AddressUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\";\nimport {ERC165CheckerUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\";\n\nimport {IProtocolVersion} from \"../../../utils/protocol/IProtocolVersion.sol\";\nimport {ProtocolVersion} from \"../../../utils/protocol/ProtocolVersion.sol\";\nimport {PermissionManager} from \"../../../core/permission/PermissionManager.sol\";\nimport {PluginSetup} from \"../setup/PluginSetup.sol\";\nimport {IPluginSetup} from \"../setup/PluginSetup.sol\";\nimport {IPluginRepo} from \"./IPluginRepo.sol\";\n\n/// @title PluginRepo\n/// @author Aragon Association - 2020 - 2023\n/// @notice The plugin repository contract required for managing and publishing different plugin versions within the Aragon DAO framework.\ncontract PluginRepo is\n Initializable,\n ERC165Upgradeable,\n IPluginRepo,\n UUPSUpgradeable,\n ProtocolVersion,\n PermissionManager\n{\n using AddressUpgradeable for address;\n using ERC165CheckerUpgradeable for address;\n\n /// @notice The struct describing the tag of a version obtained by a release and build number as `RELEASE.BUILD`.\n /// @param release The release number.\n /// @param build The build number\n /// @dev Releases can include a storage layout or the addition of new functions. Builds include logic changes or updates of the UI.\n struct Tag {\n uint8 release;\n uint16 build;\n }\n\n /// @notice The struct describing a plugin version (release and build).\n /// @param tag The version tag.\n /// @param pluginSetup The setup contract associated with this version.\n /// @param buildMetadata The build metadata URI.\n struct Version {\n Tag tag;\n address pluginSetup;\n bytes buildMetadata;\n }\n\n /// @notice The ID of the permission required to call the `createVersion` function.\n bytes32 public constant MAINTAINER_PERMISSION_ID = keccak256(\"MAINTAINER_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `createVersion` function.\n bytes32 public constant UPGRADE_REPO_PERMISSION_ID = keccak256(\"UPGRADE_REPO_PERMISSION\");\n\n /// @notice The mapping between release and build numbers.\n mapping(uint8 => uint16) internal buildsPerRelease;\n\n /// @notice The mapping between the version hash and the corresponding version information.\n mapping(bytes32 => Version) internal versions;\n\n /// @notice The mapping between the plugin setup address and its corresponding version hash.\n mapping(address => bytes32) internal latestTagHashForPluginSetup;\n\n /// @notice The ID of the latest release.\n /// @dev The maximum release number is 255.\n uint8 public latestRelease;\n\n /// @notice Thrown if a version does not exist.\n /// @param versionHash The tag hash.\n error VersionHashDoesNotExist(bytes32 versionHash);\n\n /// @notice Thrown if a plugin setup contract does not inherit from `PluginSetup`.\n error InvalidPluginSetupInterface();\n\n /// @notice Thrown if a release number is zero.\n error ReleaseZeroNotAllowed();\n\n /// @notice Thrown if a release number is incremented by more than one.\n /// @param latestRelease The latest release number.\n /// @param newRelease The new release number.\n error InvalidReleaseIncrement(uint8 latestRelease, uint8 newRelease);\n\n /// @notice Thrown if the same plugin setup contract exists already in a previous releases.\n /// @param release The release number of the already existing plugin setup.\n /// @param build The build number of the already existing plugin setup.\n /// @param pluginSetup The plugin setup contract address.\n error PluginSetupAlreadyInPreviousRelease(uint8 release, uint16 build, address pluginSetup);\n\n /// @notice Thrown if the metadata URI is empty.\n error EmptyReleaseMetadata();\n\n /// @notice Thrown if release does not exist.\n error ReleaseDoesNotExist();\n\n /// @notice Thrown if the same plugin setup exists in previous releases.\n /// @param release The release number.\n /// @param build The build number.\n /// @param pluginSetup The address of the plugin setup contract.\n /// @param buildMetadata The build metadata URI.\n event VersionCreated(\n uint8 release,\n uint16 build,\n address indexed pluginSetup,\n bytes buildMetadata\n );\n\n /// @notice Thrown when a release's metadata was updated.\n /// @param release The release number.\n /// @param releaseMetadata The release metadata URI.\n event ReleaseMetadataUpdated(uint8 release, bytes releaseMetadata);\n\n /// @dev Used to disallow initializing the implementation contract by an attacker for extra safety.\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the contract by\n /// - initializing the permission manager\n /// - granting the `MAINTAINER_PERMISSION_ID` permission to the initial owner.\n /// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).\n function initialize(address initialOwner) external initializer {\n __PermissionManager_init(initialOwner);\n\n _grant(address(this), initialOwner, MAINTAINER_PERMISSION_ID);\n _grant(address(this), initialOwner, UPGRADE_REPO_PERMISSION_ID);\n }\n\n /// @inheritdoc IPluginRepo\n function createVersion(\n uint8 _release,\n address _pluginSetup,\n bytes calldata _buildMetadata,\n bytes calldata _releaseMetadata\n ) external auth(MAINTAINER_PERMISSION_ID) {\n if (!_pluginSetup.supportsInterface(type(IPluginSetup).interfaceId)) {\n revert InvalidPluginSetupInterface();\n }\n\n if (_release == 0) {\n revert ReleaseZeroNotAllowed();\n }\n\n // Check that the release number is not incremented by more than one\n if (_release - latestRelease > 1) {\n revert InvalidReleaseIncrement({latestRelease: latestRelease, newRelease: _release});\n }\n\n if (_release > latestRelease) {\n latestRelease = _release;\n\n if (_releaseMetadata.length == 0) {\n revert EmptyReleaseMetadata();\n }\n }\n\n // Make sure the same plugin setup wasn't used in previous releases.\n Version storage version = versions[latestTagHashForPluginSetup[_pluginSetup]];\n if (version.tag.release != 0 && version.tag.release != _release) {\n revert PluginSetupAlreadyInPreviousRelease(\n version.tag.release,\n version.tag.build,\n _pluginSetup\n );\n }\n\n uint16 build = ++buildsPerRelease[_release];\n\n Tag memory tag = Tag(_release, build);\n bytes32 _tagHash = tagHash(tag);\n\n versions[_tagHash] = Version(tag, _pluginSetup, _buildMetadata);\n\n latestTagHashForPluginSetup[_pluginSetup] = _tagHash;\n\n emit VersionCreated({\n release: _release,\n build: build,\n pluginSetup: _pluginSetup,\n buildMetadata: _buildMetadata\n });\n\n if (_releaseMetadata.length > 0) {\n emit ReleaseMetadataUpdated(_release, _releaseMetadata);\n }\n }\n\n /// @inheritdoc IPluginRepo\n function updateReleaseMetadata(\n uint8 _release,\n bytes calldata _releaseMetadata\n ) external auth(MAINTAINER_PERMISSION_ID) {\n if (_release == 0) {\n revert ReleaseZeroNotAllowed();\n }\n\n if (_release > latestRelease) {\n revert ReleaseDoesNotExist();\n }\n\n if (_releaseMetadata.length == 0) {\n revert EmptyReleaseMetadata();\n }\n\n emit ReleaseMetadataUpdated(_release, _releaseMetadata);\n }\n\n /// @notice Returns the latest version for a given release number.\n /// @param _release The release number.\n /// @return The latest version of this release.\n function getLatestVersion(uint8 _release) public view returns (Version memory) {\n uint16 latestBuild = uint16(buildsPerRelease[_release]);\n return getVersion(tagHash(Tag(_release, latestBuild)));\n }\n\n /// @notice Returns the latest version for a given plugin setup.\n /// @param _pluginSetup The plugin setup address\n /// @return The latest version associated with the plugin Setup.\n function getLatestVersion(address _pluginSetup) public view returns (Version memory) {\n return getVersion(latestTagHashForPluginSetup[_pluginSetup]);\n }\n\n /// @notice Returns the version associated with a tag.\n /// @param _tag The version tag.\n /// @return The version associated with the tag.\n function getVersion(Tag calldata _tag) public view returns (Version memory) {\n return getVersion(tagHash(_tag));\n }\n\n /// @notice Returns the version for a tag hash.\n /// @param _tagHash The tag hash.\n /// @return The version associated with a tag hash.\n function getVersion(bytes32 _tagHash) public view returns (Version memory) {\n Version storage version = versions[_tagHash];\n\n if (version.tag.release == 0) {\n revert VersionHashDoesNotExist(_tagHash);\n }\n\n return version;\n }\n\n /// @notice Gets the total number of builds for a given release number.\n /// @param _release The release number.\n /// @return The number of builds of this release.\n function buildCount(uint8 _release) public view returns (uint256) {\n return buildsPerRelease[_release];\n }\n\n /// @notice The hash of the version tag obtained from the packed, bytes-encoded release and build number.\n /// @param _tag The version tag.\n /// @return The version tag hash.\n function tagHash(Tag memory _tag) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(_tag.release, _tag.build));\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_REPO_PERMISSION_ID` permission.\n function _authorizeUpgrade(\n address\n ) internal virtual override auth(UPGRADE_REPO_PERMISSION_ID) {}\n\n /// @notice Checks if this or the parent contract supports an interface by its ID.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n return\n _interfaceId == type(IPluginRepo).interfaceId ||\n _interfaceId == type(IProtocolVersion).interfaceId ||\n super.supportsInterface(_interfaceId);\n }\n}\n" - }, - "@aragon/osx/framework/plugin/repo/PluginRepoFactory.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {IProtocolVersion} from \"../../../utils/protocol/IProtocolVersion.sol\";\nimport {ProtocolVersion} from \"../../../utils/protocol/ProtocolVersion.sol\";\nimport {createERC1967Proxy} from \"../../../utils/Proxy.sol\";\nimport {PluginRepoRegistry} from \"./PluginRepoRegistry.sol\";\nimport {PluginRepo} from \"./PluginRepo.sol\";\n\n/// @title PluginRepoFactory\n/// @author Aragon Association - 2022-2023\n/// @notice This contract creates `PluginRepo` proxies and registers them on a `PluginRepoRegistry` contract.\ncontract PluginRepoFactory is ERC165, ProtocolVersion {\n /// @notice The Aragon plugin registry contract.\n PluginRepoRegistry public pluginRepoRegistry;\n\n /// @notice The address of the `PluginRepo` base contract to proxy to..\n address public pluginRepoBase;\n\n /// @notice Initializes the addresses of the Aragon plugin registry and `PluginRepo` base contract to proxy to.\n /// @param _pluginRepoRegistry The aragon plugin registry address.\n constructor(PluginRepoRegistry _pluginRepoRegistry) {\n pluginRepoRegistry = _pluginRepoRegistry;\n\n pluginRepoBase = address(new PluginRepo());\n }\n\n /// @notice Checks if this or the parent contract supports an interface by its ID.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n return\n _interfaceId == type(IProtocolVersion).interfaceId ||\n super.supportsInterface(_interfaceId);\n }\n\n /// @notice Creates a plugin repository proxy pointing to the `pluginRepoBase` implementation and registers it in the Aragon plugin registry.\n /// @param _subdomain The plugin repository subdomain.\n /// @param _initialOwner The plugin maintainer address.\n function createPluginRepo(\n string calldata _subdomain,\n address _initialOwner\n ) external returns (PluginRepo) {\n return _createPluginRepo(_subdomain, _initialOwner);\n }\n\n /// @notice Creates and registers a `PluginRepo` with an ENS subdomain and publishes an initial version `1.1`.\n /// @param _subdomain The plugin repository subdomain.\n /// @param _pluginSetup The plugin factory contract associated with the plugin version.\n /// @param _maintainer The maintainer of the plugin repo. This address has permission to update metadata, upgrade the repo logic, and manage the repo permissions.\n /// @param _releaseMetadata The release metadata URI.\n /// @param _buildMetadata The build metadata URI.\n /// @dev After the creation of the `PluginRepo` and release of the first version by the factory, ownership is transferred to the `_maintainer` address.\n function createPluginRepoWithFirstVersion(\n string calldata _subdomain,\n address _pluginSetup,\n address _maintainer,\n bytes memory _releaseMetadata,\n bytes memory _buildMetadata\n ) external returns (PluginRepo pluginRepo) {\n // Sets `address(this)` as initial owner which is later replaced with the maintainer address.\n pluginRepo = _createPluginRepo(_subdomain, address(this));\n\n pluginRepo.createVersion(1, _pluginSetup, _buildMetadata, _releaseMetadata);\n\n // Setup permissions and transfer ownership from `address(this)` to `_maintainer`.\n _setPluginRepoPermissions(pluginRepo, _maintainer);\n }\n\n /// @notice Set the final permissions for the published plugin repository maintainer. All permissions are revoked from the plugin factory and granted to the specified plugin maintainer.\n /// @param pluginRepo The plugin repository instance just created.\n /// @param maintainer The plugin maintainer address.\n /// @dev The plugin maintainer is granted the `MAINTAINER_PERMISSION_ID`, `UPGRADE_REPO_PERMISSION_ID`, and `ROOT_PERMISSION_ID`.\n function _setPluginRepoPermissions(PluginRepo pluginRepo, address maintainer) internal {\n // Set permissions on the `PluginRepo`s `PermissionManager`\n PermissionLib.SingleTargetPermission[]\n memory items = new PermissionLib.SingleTargetPermission[](6);\n\n bytes32 rootPermissionID = pluginRepo.ROOT_PERMISSION_ID();\n bytes32 maintainerPermissionID = pluginRepo.MAINTAINER_PERMISSION_ID();\n bytes32 upgradePermissionID = pluginRepo.UPGRADE_REPO_PERMISSION_ID();\n\n // Grant the plugin maintainer all the permissions required\n items[0] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Grant,\n maintainer,\n maintainerPermissionID\n );\n items[1] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Grant,\n maintainer,\n upgradePermissionID\n );\n items[2] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Grant,\n maintainer,\n rootPermissionID\n );\n\n // Revoke permissions from the plugin repository factory (`address(this)`).\n items[3] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Revoke,\n address(this),\n rootPermissionID\n );\n items[4] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Revoke,\n address(this),\n maintainerPermissionID\n );\n items[5] = PermissionLib.SingleTargetPermission(\n PermissionLib.Operation.Revoke,\n address(this),\n upgradePermissionID\n );\n\n pluginRepo.applySingleTargetPermissions(address(pluginRepo), items);\n }\n\n /// @notice Internal method creating a `PluginRepo` via the [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy pattern from the provided base contract and registering it in the Aragon plugin registry.\n /// @dev Passing an empty `_subdomain` will cause the transaction to revert.\n /// @param _subdomain The plugin repository subdomain.\n /// @param _initialOwner The initial owner address.\n function _createPluginRepo(\n string calldata _subdomain,\n address _initialOwner\n ) internal returns (PluginRepo pluginRepo) {\n pluginRepo = PluginRepo(\n createERC1967Proxy(\n pluginRepoBase,\n abi.encodeWithSelector(PluginRepo.initialize.selector, _initialOwner)\n )\n );\n\n pluginRepoRegistry.registerPluginRepo(_subdomain, address(pluginRepo));\n }\n}\n" - }, - "@aragon/osx/framework/plugin/repo/PluginRepoRegistry.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {IDAO} from \"../../../core/dao/IDAO.sol\";\nimport {ENSSubdomainRegistrar} from \"../../utils/ens/ENSSubdomainRegistrar.sol\";\nimport {InterfaceBasedRegistry} from \"../../utils/InterfaceBasedRegistry.sol\";\nimport {isSubdomainValid} from \"../../utils/RegistryUtils.sol\";\nimport {IPluginRepo} from \"./IPluginRepo.sol\";\n\n/// @title PluginRepoRegistry\n/// @author Aragon Association - 2022-2023\n/// @notice This contract maintains an address-based registry of plugin repositories in the Aragon App DAO framework.\ncontract PluginRepoRegistry is InterfaceBasedRegistry {\n /// @notice The ID of the permission required to call the `register` function.\n bytes32 public constant REGISTER_PLUGIN_REPO_PERMISSION_ID =\n keccak256(\"REGISTER_PLUGIN_REPO_PERMISSION\");\n\n /// @notice The ENS subdomain registrar registering the PluginRepo subdomains.\n ENSSubdomainRegistrar public subdomainRegistrar;\n\n /// @notice Emitted if a new plugin repository is registered.\n /// @param subdomain The subdomain of the plugin repository.\n /// @param pluginRepo The address of the plugin repository.\n event PluginRepoRegistered(string subdomain, address pluginRepo);\n\n /// @notice Thrown if the plugin subdomain doesn't match the regex `[0-9a-z\\-]`\n error InvalidPluginSubdomain(string subdomain);\n\n /// @notice Thrown if the plugin repository subdomain is empty.\n error EmptyPluginRepoSubdomain();\n\n /// @dev Used to disallow initializing the implementation contract by an attacker for extra safety.\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the contract by setting calling the `InterfaceBasedRegistry` base class initialize method.\n /// @param _dao The address of the managing DAO.\n /// @param _subdomainRegistrar The `ENSSubdomainRegistrar` where `ENS` subdomain will be registered.\n function initialize(IDAO _dao, ENSSubdomainRegistrar _subdomainRegistrar) external initializer {\n bytes4 pluginRepoInterfaceId = type(IPluginRepo).interfaceId;\n __InterfaceBasedRegistry_init(_dao, pluginRepoInterfaceId);\n\n subdomainRegistrar = _subdomainRegistrar;\n }\n\n /// @notice Registers a plugin repository with a subdomain and address.\n /// @param subdomain The subdomain of the PluginRepo.\n /// @param pluginRepo The address of the PluginRepo contract.\n function registerPluginRepo(\n string calldata subdomain,\n address pluginRepo\n ) external auth(REGISTER_PLUGIN_REPO_PERMISSION_ID) {\n if (!(bytes(subdomain).length > 0)) {\n revert EmptyPluginRepoSubdomain();\n }\n\n if (!isSubdomainValid(subdomain)) {\n revert InvalidPluginSubdomain({subdomain: subdomain});\n }\n\n bytes32 labelhash = keccak256(bytes(subdomain));\n subdomainRegistrar.registerSubnode(labelhash, pluginRepo);\n\n _register(pluginRepo);\n\n emit PluginRepoRegistered(subdomain, pluginRepo);\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[49] private __gap;\n}\n" - }, - "@aragon/osx/framework/plugin/setup/IPluginSetup.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {IDAO} from \"../../../core/dao/IDAO.sol\";\n\n/// @title IPluginSetup\n/// @author Aragon Association - 2022-2023\n/// @notice The interface required for a plugin setup contract to be consumed by the `PluginSetupProcessor` for plugin installations, updates, and uninstallations.\ninterface IPluginSetup {\n /// @notice The data associated with a prepared setup.\n /// @param helpers The address array of helpers (contracts or EOAs) associated with this plugin version after the installation or update.\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the installing or updating DAO.\n struct PreparedSetupData {\n address[] helpers;\n PermissionLib.MultiTargetPermission[] permissions;\n }\n\n /// @notice The payload for plugin updates and uninstallations containing the existing contracts as well as optional data to be consumed by the plugin setup.\n /// @param plugin The address of the `Plugin`.\n /// @param currentHelpers The address array of all current helpers (contracts or EOAs) associated with the plugin to update from.\n /// @param data The bytes-encoded data containing the input parameters for the preparation of update/uninstall as specified in the corresponding ABI on the version's metadata.\n struct SetupPayload {\n address plugin;\n address[] currentHelpers;\n bytes data;\n }\n\n /// @notice Prepares the installation of a plugin.\n /// @param _dao The address of the installing DAO.\n /// @param _data The bytes-encoded data containing the input parameters for the installation as specified in the plugin's build metadata JSON file.\n /// @return plugin The address of the `Plugin` contract being prepared for installation.\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n function prepareInstallation(\n address _dao,\n bytes calldata _data\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData);\n\n /// @notice Prepares the update of a plugin.\n /// @param _dao The address of the updating DAO.\n /// @param _currentBuild The build number of the plugin to update from.\n /// @param _payload The relevant data necessary for the `prepareUpdate`. See above.\n /// @return initData The initialization data to be passed to upgradeable contracts when the update is applied in the `PluginSetupProcessor`.\n /// @return preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n function prepareUpdate(\n address _dao,\n uint16 _currentBuild,\n SetupPayload calldata _payload\n ) external returns (bytes memory initData, PreparedSetupData memory preparedSetupData);\n\n /// @notice Prepares the uninstallation of a plugin.\n /// @param _dao The address of the uninstalling DAO.\n /// @param _payload The relevant data necessary for the `prepareUninstallation`. See above.\n /// @return permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the uninstalling DAO.\n function prepareUninstallation(\n address _dao,\n SetupPayload calldata _payload\n ) external returns (PermissionLib.MultiTargetPermission[] memory permissions);\n\n /// @notice Returns the plugin implementation address.\n /// @return The address of the plugin implementation contract.\n /// @dev The implementation can be instantiated via the `new` keyword, cloned via the minimal clones pattern (see [ERC-1167](https://eips.ethereum.org/EIPS/eip-1167)), or proxied via the UUPS pattern (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n function implementation() external view returns (address);\n}\n" - }, - "@aragon/osx/framework/plugin/setup/PluginSetup.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {ERC165} from \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport {ERC165Checker} from \"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\";\nimport {Clones} from \"@openzeppelin/contracts/proxy/Clones.sol\";\n\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {createERC1967Proxy as createERC1967} from \"../../../utils/Proxy.sol\";\nimport {IPluginSetup} from \"./IPluginSetup.sol\";\n\n/// @title PluginSetup\n/// @author Aragon Association - 2022-2023\n/// @notice An abstract contract that developers have to inherit from to write the setup of a plugin.\nabstract contract PluginSetup is ERC165, IPluginSetup {\n /// @inheritdoc IPluginSetup\n function prepareUpdate(\n address _dao,\n uint16 _currentBuild,\n SetupPayload calldata _payload\n )\n external\n virtual\n override\n returns (bytes memory initData, PreparedSetupData memory preparedSetupData)\n {}\n\n /// @notice A convenience function to create an [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract pointing to an implementation and being associated to a DAO.\n /// @param _implementation The address of the implementation contract to which the proxy is pointing to.\n /// @param _data The data to initialize the storage of the proxy contract.\n /// @return The address of the created proxy contract.\n function createERC1967Proxy(\n address _implementation,\n bytes memory _data\n ) internal returns (address) {\n return createERC1967(_implementation, _data);\n }\n\n /// @notice Checks if this or the parent contract supports an interface by its ID.\n /// @param _interfaceId The ID of the interface.\n /// @return Returns `true` if the interface is supported.\n function supportsInterface(bytes4 _interfaceId) public view virtual override returns (bool) {\n return\n _interfaceId == type(IPluginSetup).interfaceId || super.supportsInterface(_interfaceId);\n }\n}\n" - }, - "@aragon/osx/framework/plugin/setup/PluginSetupProcessor.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {ERC165Checker} from \"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\";\n\nimport {DAO, IDAO} from \"../../../core/dao/DAO.sol\";\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {PluginUUPSUpgradeable} from \"../../../core/plugin/PluginUUPSUpgradeable.sol\";\nimport {IPlugin} from \"../../../core/plugin/IPlugin.sol\";\n\nimport {PluginRepoRegistry} from \"../repo/PluginRepoRegistry.sol\";\nimport {PluginRepo} from \"../repo/PluginRepo.sol\";\n\nimport {IPluginSetup} from \"./IPluginSetup.sol\";\nimport {PluginSetup} from \"./PluginSetup.sol\";\nimport {PluginSetupRef, hashHelpers, hashPermissions, _getPreparedSetupId, _getAppliedSetupId, _getPluginInstallationId, PreparationType} from \"./PluginSetupProcessorHelpers.sol\";\n\n/// @title PluginSetupProcessor\n/// @author Aragon Association - 2022-2023\n/// @notice This contract processes the preparation and application of plugin setups (installation, update, uninstallation) on behalf of a requesting DAO.\n/// @dev This contract is temporarily granted the `ROOT_PERMISSION_ID` permission on the applying DAO and therefore is highly security critical.\ncontract PluginSetupProcessor {\n using ERC165Checker for address;\n\n /// @notice The ID of the permission required to call the `applyInstallation` function.\n bytes32 public constant APPLY_INSTALLATION_PERMISSION_ID =\n keccak256(\"APPLY_INSTALLATION_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `applyUpdate` function.\n bytes32 public constant APPLY_UPDATE_PERMISSION_ID = keccak256(\"APPLY_UPDATE_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `applyUninstallation` function.\n bytes32 public constant APPLY_UNINSTALLATION_PERMISSION_ID =\n keccak256(\"APPLY_UNINSTALLATION_PERMISSION\");\n\n /// @notice The hash obtained from the bytes-encoded empty array to be used for UI updates being required to submit an empty permission array.\n /// @dev The hash is computed via `keccak256(abi.encode([]))`.\n bytes32 private constant EMPTY_ARRAY_HASH =\n 0x569e75fc77c1a856f6daaf9e69d8a9566ca34aa47f9133711ce065a571af0cfd;\n\n /// @notice The hash obtained from the bytes-encoded zero value.\n /// @dev The hash is computed via `keccak256(abi.encode(0))`.\n bytes32 private constant ZERO_BYTES_HASH =\n 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563;\n\n /// @notice A struct containing information related to plugin setups that have been applied.\n /// @param blockNumber The block number at which the `applyInstallation`, `applyUpdate` or `applyUninstallation` was executed.\n /// @param currentAppliedSetupId The current setup id that plugin holds. Needed to confirm that `prepareUpdate` or `prepareUninstallation` happens for the plugin's current/valid dependencies.\n /// @param preparedSetupIdToBlockNumber The mapping between prepared setup IDs and block numbers at which `prepareInstallation`, `prepareUpdate` or `prepareUninstallation` was executed.\n struct PluginState {\n uint256 blockNumber;\n bytes32 currentAppliedSetupId;\n mapping(bytes32 => uint256) preparedSetupIdToBlockNumber;\n }\n\n /// @notice A mapping between the plugin installation ID (obtained from the DAO and plugin address) and the plugin state information.\n /// @dev This variable is public on purpose to allow future versions to access and migrate the storage.\n mapping(bytes32 => PluginState) public states;\n\n /// @notice The struct containing the parameters for the `prepareInstallation` function.\n /// @param pluginSetupRef The reference to the plugin setup to be used for the installation.\n /// @param data The bytes-encoded data containing the input parameters for the installation preparation as specified in the corresponding ABI on the version's metadata.\n struct PrepareInstallationParams {\n PluginSetupRef pluginSetupRef;\n bytes data;\n }\n\n /// @notice The struct containing the parameters for the `applyInstallation` function.\n /// @param pluginSetupRef The reference to the plugin setup used for the installation.\n /// @param plugin The address of the plugin contract to be installed.\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the DAO.\n /// @param helpersHash The hash of helpers that were deployed in `prepareInstallation`. This helps to derive the setup ID.\n struct ApplyInstallationParams {\n PluginSetupRef pluginSetupRef;\n address plugin;\n PermissionLib.MultiTargetPermission[] permissions;\n bytes32 helpersHash;\n }\n\n /// @notice The struct containing the parameters for the `prepareUpdate` function.\n /// @param currentVersionTag The tag of the current plugin version to update from.\n /// @param newVersionTag The tag of the new plugin version to update to.\n /// @param pluginSetupRepo The plugin setup repository address on which the plugin exists.\n /// @param setupPayload The payload containing the plugin and helper contract addresses deployed in a preparation step as well as optional data to be consumed by the plugin setup.\n /// This includes the bytes-encoded data containing the input parameters for the update preparation as specified in the corresponding ABI on the version's metadata.\n struct PrepareUpdateParams {\n PluginRepo.Tag currentVersionTag;\n PluginRepo.Tag newVersionTag;\n PluginRepo pluginSetupRepo;\n IPluginSetup.SetupPayload setupPayload;\n }\n\n /// @notice The struct containing the parameters for the `applyUpdate` function.\n /// @param plugin The address of the plugin contract to be updated.\n /// @param pluginSetupRef The reference to the plugin setup used for the update.\n /// @param initData The encoded data (function selector and arguments) to be provided to `upgradeToAndCall`.\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcessor` to the DAO.\n /// @param helpersHash The hash of helpers that were deployed in `prepareUpdate`. This helps to derive the setup ID.\n struct ApplyUpdateParams {\n address plugin;\n PluginSetupRef pluginSetupRef;\n bytes initData;\n PermissionLib.MultiTargetPermission[] permissions;\n bytes32 helpersHash;\n }\n\n /// @notice The struct containing the parameters for the `prepareUninstallation` function.\n /// @param pluginSetupRef The reference to the plugin setup to be used for the uninstallation.\n /// @param setupPayload The payload containing the plugin and helper contract addresses deployed in a preparation step as well as optional data to be consumed by the plugin setup.\n /// This includes the bytes-encoded data containing the input parameters for the uninstallation preparation as specified in the corresponding ABI on the version's metadata.\n struct PrepareUninstallationParams {\n PluginSetupRef pluginSetupRef;\n IPluginSetup.SetupPayload setupPayload;\n }\n\n /// @notice The struct containing the parameters for the `applyInstallation` function.\n /// @param plugin The address of the plugin contract to be uninstalled.\n /// @param pluginSetupRef The reference to the plugin setup used for the uninstallation.\n /// @param permissions The array of multi-targeted permission operations to be applied by the `PluginSetupProcess.\n struct ApplyUninstallationParams {\n address plugin;\n PluginSetupRef pluginSetupRef;\n PermissionLib.MultiTargetPermission[] permissions;\n }\n\n /// @notice The plugin repo registry listing the `PluginRepo` contracts versioning the `PluginSetup` contracts.\n PluginRepoRegistry public repoRegistry;\n\n /// @notice Thrown if a setup is unauthorized and cannot be applied because of a missing permission of the associated DAO.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param caller The address (EOA or contract) that requested the application of a setup on the associated DAO.\n /// @param permissionId The permission identifier.\n /// @dev This is thrown if the `APPLY_INSTALLATION_PERMISSION_ID`, `APPLY_UPDATE_PERMISSION_ID`, or APPLY_UNINSTALLATION_PERMISSION_ID is missing.\n error SetupApplicationUnauthorized(address dao, address caller, bytes32 permissionId);\n\n /// @notice Thrown if a plugin is not upgradeable.\n /// @param plugin The address of the plugin contract.\n error PluginNonupgradeable(address plugin);\n\n /// @notice Thrown if the upgrade of an `UUPSUpgradeable` proxy contract (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)) failed.\n /// @param proxy The address of the proxy.\n /// @param implementation The address of the implementation contract.\n /// @param initData The initialization data to be passed to the upgradeable plugin contract via `upgradeToAndCall`.\n error PluginProxyUpgradeFailed(address proxy, address implementation, bytes initData);\n\n /// @notice Thrown if a contract does not support the `IPlugin` interface.\n /// @param plugin The address of the contract.\n error IPluginNotSupported(address plugin);\n\n /// @notice Thrown if a plugin repository does not exist on the plugin repo registry.\n error PluginRepoNonexistent();\n\n /// @notice Thrown if a plugin setup was already prepared indicated by the prepared setup ID.\n /// @param preparedSetupId The prepared setup ID.\n error SetupAlreadyPrepared(bytes32 preparedSetupId);\n\n /// @notice Thrown if a prepared setup ID is not eligible to be applied. This can happen if another setup has been already applied or if the setup wasn't prepared in the first place.\n /// @param preparedSetupId The prepared setup ID.\n error SetupNotApplicable(bytes32 preparedSetupId);\n\n /// @notice Thrown if the update version is invalid.\n /// @param currentVersionTag The tag of the current version to update from.\n /// @param newVersionTag The tag of the new version to update to.\n error InvalidUpdateVersion(PluginRepo.Tag currentVersionTag, PluginRepo.Tag newVersionTag);\n\n /// @notice Thrown if plugin is already installed and one tries to prepare or apply install on it.\n error PluginAlreadyInstalled();\n\n /// @notice Thrown if the applied setup ID resulting from the supplied setup payload does not match with the current applied setup ID.\n /// @param currentAppliedSetupId The current applied setup ID with which the data in the supplied payload must match.\n /// @param appliedSetupId The applied setup ID obtained from the data in the supplied setup payload.\n error InvalidAppliedSetupId(bytes32 currentAppliedSetupId, bytes32 appliedSetupId);\n\n /// @notice Emitted with a prepared plugin installation to store data relevant for the application step.\n /// @param sender The sender that prepared the plugin installation.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param preparedSetupId The prepared setup ID obtained from the supplied data.\n /// @param pluginSetupRepo The repository storing the `PluginSetup` contracts of all versions of a plugin.\n /// @param versionTag The version tag of the plugin setup of the prepared installation.\n /// @param data The bytes-encoded data containing the input parameters for the preparation as specified in the corresponding ABI on the version's metadata.\n /// @param plugin The address of the plugin contract.\n /// @param preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n event InstallationPrepared(\n address indexed sender,\n address indexed dao,\n bytes32 preparedSetupId,\n PluginRepo indexed pluginSetupRepo,\n PluginRepo.Tag versionTag,\n bytes data,\n address plugin,\n IPluginSetup.PreparedSetupData preparedSetupData\n );\n\n /// @notice Emitted after a plugin installation was applied.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param plugin The address of the plugin contract.\n /// @param preparedSetupId The prepared setup ID.\n /// @param appliedSetupId The applied setup ID.\n event InstallationApplied(\n address indexed dao,\n address indexed plugin,\n bytes32 preparedSetupId,\n bytes32 appliedSetupId\n );\n\n /// @notice Emitted with a prepared plugin update to store data relevant for the application step.\n /// @param sender The sender that prepared the plugin update.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param preparedSetupId The prepared setup ID.\n /// @param pluginSetupRepo The repository storing the `PluginSetup` contracts of all versions of a plugin.\n /// @param versionTag The version tag of the plugin setup of the prepared update.\n /// @param setupPayload The payload containing the plugin and helper contract addresses deployed in a preparation step as well as optional data to be consumed by the plugin setup.\n /// @param preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n /// @param initData The initialization data to be passed to the upgradeable plugin contract.\n event UpdatePrepared(\n address indexed sender,\n address indexed dao,\n bytes32 preparedSetupId,\n PluginRepo indexed pluginSetupRepo,\n PluginRepo.Tag versionTag,\n IPluginSetup.SetupPayload setupPayload,\n IPluginSetup.PreparedSetupData preparedSetupData,\n bytes initData\n );\n\n /// @notice Emitted after a plugin update was applied.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param plugin The address of the plugin contract.\n /// @param preparedSetupId The prepared setup ID.\n /// @param appliedSetupId The applied setup ID.\n event UpdateApplied(\n address indexed dao,\n address indexed plugin,\n bytes32 preparedSetupId,\n bytes32 appliedSetupId\n );\n\n /// @notice Emitted with a prepared plugin uninstallation to store data relevant for the application step.\n /// @param sender The sender that prepared the plugin uninstallation.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param preparedSetupId The prepared setup ID.\n /// @param pluginSetupRepo The repository storing the `PluginSetup` contracts of all versions of a plugin.\n /// @param versionTag The version tag of the plugin to used for install preparation.\n /// @param setupPayload The payload containing the plugin and helper contract addresses deployed in a preparation step as well as optional data to be consumed by the plugin setup.\n /// @param permissions The list of multi-targeted permission operations to be applied to the installing DAO.\n event UninstallationPrepared(\n address indexed sender,\n address indexed dao,\n bytes32 preparedSetupId,\n PluginRepo indexed pluginSetupRepo,\n PluginRepo.Tag versionTag,\n IPluginSetup.SetupPayload setupPayload,\n PermissionLib.MultiTargetPermission[] permissions\n );\n\n /// @notice Emitted after a plugin installation was applied.\n /// @param dao The address of the DAO to which the plugin belongs.\n /// @param plugin The address of the plugin contract.\n /// @param preparedSetupId The prepared setup ID.\n event UninstallationApplied(\n address indexed dao,\n address indexed plugin,\n bytes32 preparedSetupId\n );\n\n /// @notice A modifier to check if a caller has the permission to apply a prepared setup.\n /// @param _dao The address of the DAO.\n /// @param _permissionId The permission identifier.\n modifier canApply(address _dao, bytes32 _permissionId) {\n _canApply(_dao, _permissionId);\n _;\n }\n\n /// @notice Constructs the plugin setup processor by setting the associated plugin repo registry.\n /// @param _repoRegistry The plugin repo registry contract.\n constructor(PluginRepoRegistry _repoRegistry) {\n repoRegistry = _repoRegistry;\n }\n\n /// @notice Prepares the installation of a plugin.\n /// @param _dao The address of the installing DAO.\n /// @param _params The struct containing the parameters for the `prepareInstallation` function.\n /// @return plugin The prepared plugin contract address.\n /// @return preparedSetupData The data struct containing the array of helper contracts and permissions that the setup has prepared.\n function prepareInstallation(\n address _dao,\n PrepareInstallationParams calldata _params\n ) external returns (address plugin, IPluginSetup.PreparedSetupData memory preparedSetupData) {\n PluginRepo pluginSetupRepo = _params.pluginSetupRef.pluginSetupRepo;\n\n // Check that the plugin repository exists on the plugin repo registry.\n if (!repoRegistry.entries(address(pluginSetupRepo))) {\n revert PluginRepoNonexistent();\n }\n\n // reverts if not found\n PluginRepo.Version memory version = pluginSetupRepo.getVersion(\n _params.pluginSetupRef.versionTag\n );\n\n // Prepare the installation\n (plugin, preparedSetupData) = PluginSetup(version.pluginSetup).prepareInstallation(\n _dao,\n _params.data\n );\n\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, plugin);\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(preparedSetupData.permissions),\n hashHelpers(preparedSetupData.helpers),\n bytes(\"\"),\n PreparationType.Installation\n );\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n // Check if this plugin is already installed.\n if (pluginState.currentAppliedSetupId != bytes32(0)) {\n revert PluginAlreadyInstalled();\n }\n\n // Check if this setup has already been prepared before and is pending.\n if (pluginState.blockNumber < pluginState.preparedSetupIdToBlockNumber[preparedSetupId]) {\n revert SetupAlreadyPrepared({preparedSetupId: preparedSetupId});\n }\n\n pluginState.preparedSetupIdToBlockNumber[preparedSetupId] = block.number;\n\n emit InstallationPrepared({\n sender: msg.sender,\n dao: _dao,\n preparedSetupId: preparedSetupId,\n pluginSetupRepo: pluginSetupRepo,\n versionTag: _params.pluginSetupRef.versionTag,\n data: _params.data,\n plugin: plugin,\n preparedSetupData: preparedSetupData\n });\n\n return (plugin, preparedSetupData);\n }\n\n /// @notice Applies the permissions of a prepared installation to a DAO.\n /// @param _dao The address of the installing DAO.\n /// @param _params The struct containing the parameters for the `applyInstallation` function.\n function applyInstallation(\n address _dao,\n ApplyInstallationParams calldata _params\n ) external canApply(_dao, APPLY_INSTALLATION_PERMISSION_ID) {\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(_params.permissions),\n _params.helpersHash,\n bytes(\"\"),\n PreparationType.Installation\n );\n\n // Check if this plugin is already installed.\n if (pluginState.currentAppliedSetupId != bytes32(0)) {\n revert PluginAlreadyInstalled();\n }\n\n validatePreparedSetupId(pluginInstallationId, preparedSetupId);\n\n bytes32 appliedSetupId = _getAppliedSetupId(_params.pluginSetupRef, _params.helpersHash);\n\n pluginState.currentAppliedSetupId = appliedSetupId;\n pluginState.blockNumber = block.number;\n\n // Process the permissions, which requires the `ROOT_PERMISSION_ID` from the installing DAO.\n if (_params.permissions.length > 0) {\n DAO(payable(_dao)).applyMultiTargetPermissions(_params.permissions);\n }\n\n emit InstallationApplied({\n dao: _dao,\n plugin: _params.plugin,\n preparedSetupId: preparedSetupId,\n appliedSetupId: appliedSetupId\n });\n }\n\n /// @notice Prepares the update of an UUPS upgradeable plugin.\n /// @param _dao The address of the DAO For which preparation of update happens.\n /// @param _params The struct containing the parameters for the `prepareUpdate` function.\n /// @return initData The initialization data to be passed to upgradeable contracts when the update is applied\n /// @return preparedSetupData The data struct containing the array of helper contracts and permissions that the setup has prepared.\n /// @dev The list of `_params.setupPayload.currentHelpers` has to be specified in the same order as they were returned from previous setups preparation steps (the latest `prepareInstallation` or `prepareUpdate` step that has happend) on which the update is prepared for.\n function prepareUpdate(\n address _dao,\n PrepareUpdateParams calldata _params\n )\n external\n returns (bytes memory initData, IPluginSetup.PreparedSetupData memory preparedSetupData)\n {\n if (\n _params.currentVersionTag.release != _params.newVersionTag.release ||\n _params.currentVersionTag.build >= _params.newVersionTag.build\n ) {\n revert InvalidUpdateVersion({\n currentVersionTag: _params.currentVersionTag,\n newVersionTag: _params.newVersionTag\n });\n }\n\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.setupPayload.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 currentHelpersHash = hashHelpers(_params.setupPayload.currentHelpers);\n\n bytes32 appliedSetupId = _getAppliedSetupId(\n PluginSetupRef(_params.currentVersionTag, _params.pluginSetupRepo),\n currentHelpersHash\n );\n\n // The following check implicitly confirms that plugin is currently installed.\n // Otherwise, `currentAppliedSetupId` would not be set.\n if (pluginState.currentAppliedSetupId != appliedSetupId) {\n revert InvalidAppliedSetupId({\n currentAppliedSetupId: pluginState.currentAppliedSetupId,\n appliedSetupId: appliedSetupId\n });\n }\n\n PluginRepo.Version memory currentVersion = _params.pluginSetupRepo.getVersion(\n _params.currentVersionTag\n );\n\n PluginRepo.Version memory newVersion = _params.pluginSetupRepo.getVersion(\n _params.newVersionTag\n );\n\n bytes32 preparedSetupId;\n\n // If the current and new plugin setup are identical, this is an UI update.\n // In this case, the permission hash is set to the empty array hash and the `prepareUpdate` call is skipped to avoid side effects.\n if (currentVersion.pluginSetup == newVersion.pluginSetup) {\n preparedSetupId = _getPreparedSetupId(\n PluginSetupRef(_params.newVersionTag, _params.pluginSetupRepo),\n EMPTY_ARRAY_HASH,\n currentHelpersHash,\n bytes(\"\"),\n PreparationType.Update\n );\n\n // Because UI updates do not change the plugin functionality, the array of helpers\n // associated with this plugin version `preparedSetupData.helpers` and being returned must\n // equal `_params.setupPayload.currentHelpers` returned by the previous setup step (installation or update )\n // that this update is transitioning from.\n preparedSetupData.helpers = _params.setupPayload.currentHelpers;\n } else {\n // Check that plugin is `PluginUUPSUpgradable`.\n if (!_params.setupPayload.plugin.supportsInterface(type(IPlugin).interfaceId)) {\n revert IPluginNotSupported({plugin: _params.setupPayload.plugin});\n }\n if (IPlugin(_params.setupPayload.plugin).pluginType() != IPlugin.PluginType.UUPS) {\n revert PluginNonupgradeable({plugin: _params.setupPayload.plugin});\n }\n\n // Prepare the update.\n (initData, preparedSetupData) = PluginSetup(newVersion.pluginSetup).prepareUpdate(\n _dao,\n _params.currentVersionTag.build,\n _params.setupPayload\n );\n\n preparedSetupId = _getPreparedSetupId(\n PluginSetupRef(_params.newVersionTag, _params.pluginSetupRepo),\n hashPermissions(preparedSetupData.permissions),\n hashHelpers(preparedSetupData.helpers),\n initData,\n PreparationType.Update\n );\n }\n\n // Check if this setup has already been prepared before and is pending.\n if (pluginState.blockNumber < pluginState.preparedSetupIdToBlockNumber[preparedSetupId]) {\n revert SetupAlreadyPrepared({preparedSetupId: preparedSetupId});\n }\n\n pluginState.preparedSetupIdToBlockNumber[preparedSetupId] = block.number;\n\n // Avoid stack too deep.\n emitPrepareUpdateEvent(_dao, preparedSetupId, _params, preparedSetupData, initData);\n\n return (initData, preparedSetupData);\n }\n\n /// @notice Applies the permissions of a prepared update of an UUPS upgradeable proxy contract to a DAO.\n /// @param _dao The address of the updating DAO.\n /// @param _params The struct containing the parameters for the `applyInstallation` function.\n function applyUpdate(\n address _dao,\n ApplyUpdateParams calldata _params\n ) external canApply(_dao, APPLY_UPDATE_PERMISSION_ID) {\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(_params.permissions),\n _params.helpersHash,\n _params.initData,\n PreparationType.Update\n );\n\n validatePreparedSetupId(pluginInstallationId, preparedSetupId);\n\n bytes32 appliedSetupId = _getAppliedSetupId(_params.pluginSetupRef, _params.helpersHash);\n\n pluginState.blockNumber = block.number;\n pluginState.currentAppliedSetupId = appliedSetupId;\n\n PluginRepo.Version memory version = _params.pluginSetupRef.pluginSetupRepo.getVersion(\n _params.pluginSetupRef.versionTag\n );\n\n address currentImplementation = PluginUUPSUpgradeable(_params.plugin).implementation();\n address newImplementation = PluginSetup(version.pluginSetup).implementation();\n\n if (currentImplementation != newImplementation) {\n _upgradeProxy(_params.plugin, newImplementation, _params.initData);\n }\n\n // Process the permissions, which requires the `ROOT_PERMISSION_ID` from the updating DAO.\n if (_params.permissions.length > 0) {\n DAO(payable(_dao)).applyMultiTargetPermissions(_params.permissions);\n }\n\n emit UpdateApplied({\n dao: _dao,\n plugin: _params.plugin,\n preparedSetupId: preparedSetupId,\n appliedSetupId: appliedSetupId\n });\n }\n\n /// @notice Prepares the uninstallation of a plugin.\n /// @param _dao The address of the uninstalling DAO.\n /// @param _params The struct containing the parameters for the `prepareUninstallation` function.\n /// @return permissions The list of multi-targeted permission operations to be applied to the uninstalling DAO.\n /// @dev The list of `_params.setupPayload.currentHelpers` has to be specified in the same order as they were returned from previous setups preparation steps (the latest `prepareInstallation` or `prepareUpdate` step that has happend) on which the uninstallation was prepared for.\n function prepareUninstallation(\n address _dao,\n PrepareUninstallationParams calldata _params\n ) external returns (PermissionLib.MultiTargetPermission[] memory permissions) {\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.setupPayload.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 appliedSetupId = _getAppliedSetupId(\n _params.pluginSetupRef,\n hashHelpers(_params.setupPayload.currentHelpers)\n );\n\n if (pluginState.currentAppliedSetupId != appliedSetupId) {\n revert InvalidAppliedSetupId({\n currentAppliedSetupId: pluginState.currentAppliedSetupId,\n appliedSetupId: appliedSetupId\n });\n }\n\n PluginRepo.Version memory version = _params.pluginSetupRef.pluginSetupRepo.getVersion(\n _params.pluginSetupRef.versionTag\n );\n\n permissions = PluginSetup(version.pluginSetup).prepareUninstallation(\n _dao,\n _params.setupPayload\n );\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(permissions),\n ZERO_BYTES_HASH,\n bytes(\"\"),\n PreparationType.Uninstallation\n );\n\n // Check if this setup has already been prepared before and is pending.\n if (pluginState.blockNumber < pluginState.preparedSetupIdToBlockNumber[preparedSetupId]) {\n revert SetupAlreadyPrepared({preparedSetupId: preparedSetupId});\n }\n\n pluginState.preparedSetupIdToBlockNumber[preparedSetupId] = block.number;\n\n emit UninstallationPrepared({\n sender: msg.sender,\n dao: _dao,\n preparedSetupId: preparedSetupId,\n pluginSetupRepo: _params.pluginSetupRef.pluginSetupRepo,\n versionTag: _params.pluginSetupRef.versionTag,\n setupPayload: _params.setupPayload,\n permissions: permissions\n });\n }\n\n /// @notice Applies the permissions of a prepared uninstallation to a DAO.\n /// @param _dao The address of the DAO.\n /// @param _dao The address of the uninstalling DAO.\n /// @param _params The struct containing the parameters for the `applyUninstallation` function.\n /// @dev The list of `_params.setupPayload.currentHelpers` has to be specified in the same order as they were returned from previous setups preparation steps (the latest `prepareInstallation` or `prepareUpdate` step that has happend) on which the uninstallation was prepared for.\n function applyUninstallation(\n address _dao,\n ApplyUninstallationParams calldata _params\n ) external canApply(_dao, APPLY_UNINSTALLATION_PERMISSION_ID) {\n bytes32 pluginInstallationId = _getPluginInstallationId(_dao, _params.plugin);\n\n PluginState storage pluginState = states[pluginInstallationId];\n\n bytes32 preparedSetupId = _getPreparedSetupId(\n _params.pluginSetupRef,\n hashPermissions(_params.permissions),\n ZERO_BYTES_HASH,\n bytes(\"\"),\n PreparationType.Uninstallation\n );\n\n validatePreparedSetupId(pluginInstallationId, preparedSetupId);\n\n // Since the plugin is uninstalled, only the current block number must be updated.\n pluginState.blockNumber = block.number;\n pluginState.currentAppliedSetupId = bytes32(0);\n\n // Process the permissions, which requires the `ROOT_PERMISSION_ID` from the uninstalling DAO.\n if (_params.permissions.length > 0) {\n DAO(payable(_dao)).applyMultiTargetPermissions(_params.permissions);\n }\n\n emit UninstallationApplied({\n dao: _dao,\n plugin: _params.plugin,\n preparedSetupId: preparedSetupId\n });\n }\n\n /// @notice Validates that a setup ID can be applied for `applyInstallation`, `applyUpdate`, or `applyUninstallation`.\n /// @param pluginInstallationId The plugin installation ID obtained from the hash of `abi.encode(daoAddress, pluginAddress)`.\n /// @param preparedSetupId The prepared setup ID to be validated.\n /// @dev If the block number stored in `states[pluginInstallationId].blockNumber` exceeds the one stored in `pluginState.preparedSetupIdToBlockNumber[preparedSetupId]`, the prepared setup with `preparedSetupId` is outdated and not applicable anymore.\n function validatePreparedSetupId(\n bytes32 pluginInstallationId,\n bytes32 preparedSetupId\n ) public view {\n PluginState storage pluginState = states[pluginInstallationId];\n if (pluginState.blockNumber >= pluginState.preparedSetupIdToBlockNumber[preparedSetupId]) {\n revert SetupNotApplicable({preparedSetupId: preparedSetupId});\n }\n }\n\n /// @notice Upgrades a UUPS upgradeable proxy contract (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @param _proxy The address of the proxy.\n /// @param _implementation The address of the implementation contract.\n /// @param _initData The initialization data to be passed to the upgradeable plugin contract via `upgradeToAndCall`.\n function _upgradeProxy(\n address _proxy,\n address _implementation,\n bytes memory _initData\n ) private {\n if (_initData.length > 0) {\n try\n PluginUUPSUpgradeable(_proxy).upgradeToAndCall(_implementation, _initData)\n {} catch Error(string memory reason) {\n revert(reason);\n } catch (bytes memory /*lowLevelData*/) {\n revert PluginProxyUpgradeFailed({\n proxy: _proxy,\n implementation: _implementation,\n initData: _initData\n });\n }\n } else {\n try PluginUUPSUpgradeable(_proxy).upgradeTo(_implementation) {} catch Error(\n string memory reason\n ) {\n revert(reason);\n } catch (bytes memory /*lowLevelData*/) {\n revert PluginProxyUpgradeFailed({\n proxy: _proxy,\n implementation: _implementation,\n initData: _initData\n });\n }\n }\n }\n\n /// @notice Checks if a caller can apply a setup. The caller can be either the DAO to which the plugin setup is applied to or another account to which the DAO has granted the respective permission.\n /// @param _dao The address of the applying DAO.\n /// @param _permissionId The permission ID.\n function _canApply(address _dao, bytes32 _permissionId) private view {\n if (\n msg.sender != _dao &&\n !DAO(payable(_dao)).hasPermission(address(this), msg.sender, _permissionId, bytes(\"\"))\n ) {\n revert SetupApplicationUnauthorized({\n dao: _dao,\n caller: msg.sender,\n permissionId: _permissionId\n });\n }\n }\n\n /// @notice A helper to emit the `UpdatePrepared` event from the supplied, structured data.\n /// @param _dao The address of the updating DAO.\n /// @param _preparedSetupId The prepared setup ID.\n /// @param _params The struct containing the parameters for the `prepareUpdate` function.\n /// @param _preparedSetupData The deployed plugin's relevant data which consists of helpers and permissions.\n /// @param _initData The initialization data to be passed to upgradeable contracts when the update is applied\n /// @dev This functions exists to avoid stack-too-deep errors.\n function emitPrepareUpdateEvent(\n address _dao,\n bytes32 _preparedSetupId,\n PrepareUpdateParams calldata _params,\n IPluginSetup.PreparedSetupData memory _preparedSetupData,\n bytes memory _initData\n ) private {\n emit UpdatePrepared({\n sender: msg.sender,\n dao: _dao,\n preparedSetupId: _preparedSetupId,\n pluginSetupRepo: _params.pluginSetupRepo,\n versionTag: _params.newVersionTag,\n setupPayload: _params.setupPayload,\n preparedSetupData: _preparedSetupData,\n initData: _initData\n });\n }\n}\n" - }, - "@aragon/osx/framework/plugin/setup/PluginSetupProcessorHelpers.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {PermissionLib} from \"../../../core/permission/PermissionLib.sol\";\nimport {PluginRepo} from \"../repo/PluginRepo.sol\";\nimport {PluginSetup} from \"./PluginSetup.sol\";\n\n/// @notice The struct containing a reference to a plugin setup by specifying the containing plugin repository and the associated version tag.\n/// @param versionTag The tag associated with the plugin setup version.\n/// @param pluginSetupRepo The plugin setup repository.\nstruct PluginSetupRef {\n PluginRepo.Tag versionTag;\n PluginRepo pluginSetupRepo;\n}\n\n/// @notice The different types describing a prepared setup.\n/// @param None The default indicating the lack of a preparation type.\n/// @param Installation The prepared setup installs a new plugin.\n/// @param Update The prepared setup updates an existing plugin.\n/// @param Uninstallation The prepared setup uninstalls an existing plugin.\nenum PreparationType {\n None,\n Installation,\n Update,\n Uninstallation\n}\n\n/// @notice Returns an ID for plugin installation by hashing the DAO and plugin address.\n/// @param _dao The address of the DAO conducting the setup.\n/// @param _plugin The plugin address.\nfunction _getPluginInstallationId(address _dao, address _plugin) pure returns (bytes32) {\n return keccak256(abi.encode(_dao, _plugin));\n}\n\n/// @notice Returns an ID for prepared setup obtained from hashing characterizing elements.\n/// @param _pluginSetupRef The reference of the plugin setup containing plugin setup repo and version tag.\n/// @param _permissionsHash The hash of the permission operations requested by the setup.\n/// @param _helpersHash The hash of the helper contract addresses.\n/// @param _data The bytes-encoded initialize data for the upgrade that is returned by `prepareUpdate`.\n/// @param _preparationType The type of preparation the plugin is currently undergoing. Without this, it is possible to call `applyUpdate` even after `applyInstallation` is called.\n/// @return The prepared setup id.\nfunction _getPreparedSetupId(\n PluginSetupRef memory _pluginSetupRef,\n bytes32 _permissionsHash,\n bytes32 _helpersHash,\n bytes memory _data,\n PreparationType _preparationType\n) pure returns (bytes32) {\n return\n keccak256(\n abi.encode(\n _pluginSetupRef.versionTag,\n _pluginSetupRef.pluginSetupRepo,\n _permissionsHash,\n _helpersHash,\n keccak256(_data),\n _preparationType\n )\n );\n}\n\n/// @notice Returns an identifier for applied installations.\n/// @param _pluginSetupRef The reference of the plugin setup containing plugin setup repo and version tag.\n/// @param _helpersHash The hash of the helper contract addresses.\n/// @return The applied setup id.\nfunction _getAppliedSetupId(\n PluginSetupRef memory _pluginSetupRef,\n bytes32 _helpersHash\n) pure returns (bytes32) {\n return\n keccak256(\n abi.encode(_pluginSetupRef.versionTag, _pluginSetupRef.pluginSetupRepo, _helpersHash)\n );\n}\n\n/// @notice Returns a hash of an array of helper addresses (contracts or EOAs).\n/// @param _helpers The array of helper addresses (contracts or EOAs) to be hashed.\nfunction hashHelpers(address[] memory _helpers) pure returns (bytes32) {\n return keccak256(abi.encode(_helpers));\n}\n\n/// @notice Returns a hash of an array of multi-targeted permission operations.\n/// @param _permissions The array of of multi-targeted permission operations.\n/// @return The hash of the array of permission operations.\nfunction hashPermissions(\n PermissionLib.MultiTargetPermission[] memory _permissions\n) pure returns (bytes32) {\n return keccak256(abi.encode(_permissions));\n}\n" - }, - "@aragon/osx/framework/utils/ens/ENSSubdomainRegistrar.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport \"@ensdomains/ens-contracts/contracts/registry/ENS.sol\";\nimport \"@ensdomains/ens-contracts/contracts/resolvers/Resolver.sol\";\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\n\nimport {DaoAuthorizableUpgradeable} from \"../../../core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\";\nimport {IDAO} from \"../../../core/dao/IDAO.sol\";\n\n/// @title ENSSubdomainRegistrar\n/// @author Aragon Association - 2022-2023\n/// @notice This contract registers ENS subdomains under a parent domain specified in the initialization process and maintains ownership of the subdomain since only the resolver address is set. This contract must either be the domain node owner or an approved operator of the node owner. The default resolver being used is the one specified in the parent domain.\ncontract ENSSubdomainRegistrar is UUPSUpgradeable, DaoAuthorizableUpgradeable {\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\n bytes32 public constant UPGRADE_REGISTRAR_PERMISSION_ID =\n keccak256(\"UPGRADE_REGISTRAR_PERMISSION\");\n\n /// @notice The ID of the permission required to call the `registerSubnode` and `setDefaultResolver` function.\n bytes32 public constant REGISTER_ENS_SUBDOMAIN_PERMISSION_ID =\n keccak256(\"REGISTER_ENS_SUBDOMAIN_PERMISSION\");\n\n /// @notice The ENS registry contract\n ENS public ens;\n\n /// @notice The namehash of the domain on which subdomains are registered.\n bytes32 public node;\n\n /// @notice The address of the ENS resolver resolving the names to an address.\n address public resolver;\n\n /// @notice Thrown if the subnode is already registered.\n /// @param subnode The subnode namehash.\n /// @param nodeOwner The node owner address.\n error AlreadyRegistered(bytes32 subnode, address nodeOwner);\n\n /// @notice Thrown if node's resolver is invalid.\n /// @param node The node namehash.\n /// @param resolver The node resolver address.\n error InvalidResolver(bytes32 node, address resolver);\n\n /// @dev Used to disallow initializing the implementation contract by an attacker for extra safety.\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the component by\n /// - checking that the contract is the domain node owner or an approved operator\n /// - initializing the underlying component\n /// - registering the [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID\n /// - setting the ENS contract, the domain node hash, and resolver.\n /// @param _managingDao The interface of the DAO managing the components permissions.\n /// @param _ens The interface of the ENS registry to be used.\n /// @param _node The ENS parent domain node under which the subdomains are to be registered.\n function initialize(IDAO _managingDao, ENS _ens, bytes32 _node) external initializer {\n __DaoAuthorizableUpgradeable_init(_managingDao);\n\n ens = _ens;\n node = _node;\n\n address nodeResolver = ens.resolver(_node);\n\n if (nodeResolver == address(0)) {\n revert InvalidResolver({node: _node, resolver: nodeResolver});\n }\n\n resolver = nodeResolver;\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_REGISTRAR_PERMISSION_ID` permission.\n function _authorizeUpgrade(\n address\n ) internal virtual override auth(UPGRADE_REGISTRAR_PERMISSION_ID) {}\n\n /// @notice Registers a new subdomain with this registrar as the owner and set the target address in the resolver.\n /// @dev It reverts with no message if this contract isn't the owner nor an approved operator for the given node.\n /// @param _label The labelhash of the subdomain name.\n /// @param _targetAddress The address to which the subdomain resolves.\n function registerSubnode(\n bytes32 _label,\n address _targetAddress\n ) external auth(REGISTER_ENS_SUBDOMAIN_PERMISSION_ID) {\n bytes32 subnode = keccak256(abi.encodePacked(node, _label));\n address currentOwner = ens.owner(subnode);\n\n if (currentOwner != address(0)) {\n revert AlreadyRegistered(subnode, currentOwner);\n }\n\n ens.setSubnodeOwner(node, _label, address(this));\n ens.setResolver(subnode, resolver);\n Resolver(resolver).setAddr(subnode, _targetAddress);\n }\n\n /// @notice Sets the default resolver contract address that the subdomains being registered will use.\n /// @param _resolver The resolver contract to be used.\n function setDefaultResolver(\n address _resolver\n ) external auth(REGISTER_ENS_SUBDOMAIN_PERMISSION_ID) {\n if (_resolver == address(0)) {\n revert InvalidResolver({node: node, resolver: _resolver});\n }\n\n resolver = _resolver;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[47] private __gap;\n}\n" - }, - "@aragon/osx/framework/utils/InterfaceBasedRegistry.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {ERC165CheckerUpgradeable} from \"@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol\";\n\nimport {DaoAuthorizableUpgradeable} from \"../../core/plugin/dao-authorizable/DaoAuthorizableUpgradeable.sol\";\nimport {IDAO} from \"../../core/dao/IDAO.sol\";\n\n/// @title InterfaceBasedRegistry\n/// @author Aragon Association - 2022-2023\n/// @notice An [ERC-165](https://eips.ethereum.org/EIPS/eip-165)-based registry for contracts\nabstract contract InterfaceBasedRegistry is UUPSUpgradeable, DaoAuthorizableUpgradeable {\n using ERC165CheckerUpgradeable for address;\n\n /// @notice The ID of the permission required to call the `_authorizeUpgrade` function.\n bytes32 public constant UPGRADE_REGISTRY_PERMISSION_ID =\n keccak256(\"UPGRADE_REGISTRY_PERMISSION\");\n\n /// @notice The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface ID that the target contracts being registered must support.\n bytes4 public targetInterfaceId;\n\n /// @notice The mapping containing the registry entries returning true for registered contract addresses.\n mapping(address => bool) public entries;\n\n /// @notice Thrown if the contract is already registered.\n /// @param registrant The address of the contract to be registered.\n error ContractAlreadyRegistered(address registrant);\n\n /// @notice Thrown if the contract does not support the required interface.\n /// @param registrant The address of the contract to be registered.\n error ContractInterfaceInvalid(address registrant);\n\n /// @notice Thrown if the contract does not support ERC165.\n /// @param registrant The address of the contract.\n error ContractERC165SupportInvalid(address registrant);\n\n /// @notice Initializes the component.\n /// @dev This is required for the UUPS upgradability pattern.\n /// @param _managingDao The interface of the DAO managing the components permissions.\n /// @param _targetInterfaceId The [ERC-165](https://eips.ethereum.org/EIPS/eip-165) interface id of the contracts to be registered.\n function __InterfaceBasedRegistry_init(\n IDAO _managingDao,\n bytes4 _targetInterfaceId\n ) internal virtual onlyInitializing {\n __DaoAuthorizableUpgradeable_init(_managingDao);\n\n targetInterfaceId = _targetInterfaceId;\n }\n\n /// @notice Internal method authorizing the upgrade of the contract via the [upgradeability mechanism for UUPS proxies](https://docs.openzeppelin.com/contracts/4.x/api/proxy#UUPSUpgradeable) (see [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822)).\n /// @dev The caller must have the `UPGRADE_REGISTRY_PERMISSION_ID` permission.\n function _authorizeUpgrade(\n address\n ) internal virtual override auth(UPGRADE_REGISTRY_PERMISSION_ID) {}\n\n /// @notice Register an [ERC-165](https://eips.ethereum.org/EIPS/eip-165) contract address.\n /// @dev The managing DAO needs to grant REGISTER_PERMISSION_ID to registrar.\n /// @param _registrant The address of an [ERC-165](https://eips.ethereum.org/EIPS/eip-165) contract.\n function _register(address _registrant) internal {\n if (entries[_registrant]) {\n revert ContractAlreadyRegistered({registrant: _registrant});\n }\n\n // Will revert if address is not a contract or doesn't fully support targetInterfaceId + ERC165.\n if (!_registrant.supportsInterface(targetInterfaceId)) {\n revert ContractInterfaceInvalid(_registrant);\n }\n\n entries[_registrant] = true;\n }\n\n /// @notice This empty reserved space is put in place to allow future versions to add new variables without shifting down storage in the inheritance chain (see [OpenZeppelin's guide about storage gaps](https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps)).\n uint256[48] private __gap;\n}\n" - }, - "@aragon/osx/framework/utils/RegistryUtils.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n/// @notice Validates that a subdomain name is composed only from characters in the allowed character set:\n/// - the lowercase letters `a-z`\n/// - the digits `0-9`\n/// - the hyphen `-`\n/// @dev This function allows empty (zero-length) subdomains. If this should not be allowed, make sure to add a respective check when using this function in your code.\n/// @param subDomain The name of the DAO.\n/// @return `true` if the name is valid or `false` if at least one char is invalid.\n/// @dev Aborts on the first invalid char found.\nfunction isSubdomainValid(string calldata subDomain) pure returns (bool) {\n bytes calldata nameBytes = bytes(subDomain);\n uint256 nameLength = nameBytes.length;\n for (uint256 i; i < nameLength; i++) {\n uint8 char = uint8(nameBytes[i]);\n\n // if char is between a-z\n if (char > 96 && char < 123) {\n continue;\n }\n\n // if char is between 0-9\n if (char > 47 && char < 58) {\n continue;\n }\n\n // if char is -\n if (char == 45) {\n continue;\n }\n\n // invalid if one char doesn't work with the rules above\n return false;\n }\n return true;\n}\n" - }, - "@aragon/osx/utils/protocol/IProtocolVersion.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\n/// @title IProtocolVersion\n/// @author Aragon Association - 2022-2023\n/// @notice An interface defining the semantic OSx protocol version.\ninterface IProtocolVersion {\n /// @notice Returns the protocol version at which the current contract was built. Use it to check for future upgrades that might be applicable.\n /// @return _version Returns the semantic OSx protocol version.\n function protocolVersion() external view returns (uint8[3] memory _version);\n}\n" - }, - "@aragon/osx/utils/protocol/ProtocolVersion.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\nimport {IProtocolVersion} from \"./IProtocolVersion.sol\";\n\n/// @title ProtocolVersion\n/// @author Aragon Association - 2023\n/// @notice An abstract, stateless, non-upgradeable contract serves as a base for other contracts requiring awareness of the OSx protocol version.\n/// @dev Do not add any new variables to this contract that would shift down storage in the inheritance chain.\nabstract contract ProtocolVersion is IProtocolVersion {\n // IMPORTANT: Do not add any storage variable, see the above notice.\n\n /// @inheritdoc IProtocolVersion\n function protocolVersion() public pure returns (uint8[3] memory) {\n return [1, 3, 0];\n }\n}\n" - }, - "@aragon/osx/utils/Proxy.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport \"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\";\n\n/// @notice Free function to create a [ERC-1967](https://eips.ethereum.org/EIPS/eip-1967) proxy contract based on the passed base contract address.\n/// @param _logic The base contract address.\n/// @param _data The constructor arguments for this contract.\n/// @return The address of the proxy contract created.\n/// @dev Initializes the upgradeable proxy with an initial implementation specified by _logic. If _data is non-empty, itā€™s used as data in a delegate call to _logic. This will typically be an encoded function call, and allows initializing the storage of the proxy like a Solidity constructor (see [OpenZeppelin ERC1967Proxy-constructor](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Proxy-constructor-address-bytes-)).\nfunction createERC1967Proxy(address _logic, bytes memory _data) returns (address) {\n return address(new ERC1967Proxy(_logic, _data));\n}\n" - }, - "@ensdomains/ens-contracts/contracts/registry/ENS.sol": { - "content": "pragma solidity >=0.8.4;\n\ninterface ENS {\n // Logged when the owner of a node assigns a new owner to a subnode.\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\n\n // Logged when the owner of a node transfers ownership to a new account.\n event Transfer(bytes32 indexed node, address owner);\n\n // Logged when the resolver for a node changes.\n event NewResolver(bytes32 indexed node, address resolver);\n\n // Logged when the TTL of a node changes\n event NewTTL(bytes32 indexed node, uint64 ttl);\n\n // Logged when an operator is added or removed.\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n function setRecord(\n bytes32 node,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner,\n address resolver,\n uint64 ttl\n ) external;\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner\n ) external returns (bytes32);\n\n function setResolver(bytes32 node, address resolver) external;\n\n function setOwner(bytes32 node, address owner) external;\n\n function setTTL(bytes32 node, uint64 ttl) external;\n\n function setApprovalForAll(address operator, bool approved) external;\n\n function owner(bytes32 node) external view returns (address);\n\n function resolver(bytes32 node) external view returns (address);\n\n function ttl(bytes32 node) external view returns (uint64);\n\n function recordExists(bytes32 node) external view returns (bool);\n\n function isApprovedForAll(\n address owner,\n address operator\n ) external view returns (bool);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IABIResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IABIResolver {\n event ABIChanged(bytes32 indexed node, uint256 indexed contentType);\n\n /**\n * Returns the ABI associated with an ENS node.\n * Defined in EIP205.\n * @param node The ENS node to query\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\n * @return contentType The content type of the return value\n * @return data The ABI data\n */\n function ABI(\n bytes32 node,\n uint256 contentTypes\n ) external view returns (uint256, bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddressResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the new (multicoin) addr function.\n */\ninterface IAddressResolver {\n event AddressChanged(\n bytes32 indexed node,\n uint256 coinType,\n bytes newAddress\n );\n\n function addr(\n bytes32 node,\n uint256 coinType\n ) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IAddrResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\n/**\n * Interface for the legacy (ETH-only) addr function.\n */\ninterface IAddrResolver {\n event AddrChanged(bytes32 indexed node, address a);\n\n /**\n * Returns the address associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated address.\n */\n function addr(bytes32 node) external view returns (address payable);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IContentHashResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IContentHashResolver {\n event ContenthashChanged(bytes32 indexed node, bytes hash);\n\n /**\n * Returns the contenthash associated with an ENS node.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function contenthash(bytes32 node) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IDNSRecordResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSRecordResolver {\n // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.\n event DNSRecordChanged(\n bytes32 indexed node,\n bytes name,\n uint16 resource,\n bytes record\n );\n // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.\n event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);\n\n /**\n * Obtain a DNS record.\n * @param node the namehash of the node for which to fetch the record\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\n * @return the DNS record in wire format if present, otherwise empty\n */\n function dnsRecord(\n bytes32 node,\n bytes32 name,\n uint16 resource\n ) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IDNSZoneResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IDNSZoneResolver {\n // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.\n event DNSZonehashChanged(\n bytes32 indexed node,\n bytes lastzonehash,\n bytes zonehash\n );\n\n /**\n * zonehash obtains the hash for the zone.\n * @param node The ENS node to query.\n * @return The associated contenthash.\n */\n function zonehash(bytes32 node) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IExtendedResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.4;\n\ninterface IExtendedResolver {\n function resolve(\n bytes memory name,\n bytes memory data\n ) external view returns (bytes memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IInterfaceResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IInterfaceResolver {\n event InterfaceChanged(\n bytes32 indexed node,\n bytes4 indexed interfaceID,\n address implementer\n );\n\n /**\n * Returns the address of a contract that implements the specified interface for this name.\n * If an implementer has not been set for this interfaceID and name, the resolver will query\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\n * will be returned.\n * @param node The ENS node to query.\n * @param interfaceID The EIP 165 interface ID to check for.\n * @return The address that implements this interface, or 0 if the interface is unsupported.\n */\n function interfaceImplementer(\n bytes32 node,\n bytes4 interfaceID\n ) external view returns (address);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/INameResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface INameResolver {\n event NameChanged(bytes32 indexed node, string name);\n\n /**\n * Returns the name associated with an ENS node, for reverse records.\n * Defined in EIP181.\n * @param node The ENS node to query.\n * @return The associated name.\n */\n function name(bytes32 node) external view returns (string memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/IPubkeyResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface IPubkeyResolver {\n event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);\n\n /**\n * Returns the SECP256k1 public key associated with an ENS node.\n * Defined in EIP 619.\n * @param node The ENS node to query\n * @return x The X coordinate of the curve point for the public key.\n * @return y The Y coordinate of the curve point for the public key.\n */\n function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/profiles/ITextResolver.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\ninterface ITextResolver {\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key,\n string value\n );\n\n /**\n * Returns the text data associated with an ENS node and key.\n * @param node The ENS node to query.\n * @param key The text data key to query.\n * @return The associated text data.\n */\n function text(\n bytes32 node,\n string calldata key\n ) external view returns (string memory);\n}\n" - }, - "@ensdomains/ens-contracts/contracts/resolvers/Resolver.sol": { - "content": "//SPDX-License-Identifier: MIT\npragma solidity >=0.8.4;\n\nimport \"@openzeppelin/contracts/utils/introspection/IERC165.sol\";\nimport \"./profiles/IABIResolver.sol\";\nimport \"./profiles/IAddressResolver.sol\";\nimport \"./profiles/IAddrResolver.sol\";\nimport \"./profiles/IContentHashResolver.sol\";\nimport \"./profiles/IDNSRecordResolver.sol\";\nimport \"./profiles/IDNSZoneResolver.sol\";\nimport \"./profiles/IInterfaceResolver.sol\";\nimport \"./profiles/INameResolver.sol\";\nimport \"./profiles/IPubkeyResolver.sol\";\nimport \"./profiles/ITextResolver.sol\";\nimport \"./profiles/IExtendedResolver.sol\";\n\n/**\n * A generic resolver interface which includes all the functions including the ones deprecated\n */\ninterface Resolver is\n IERC165,\n IABIResolver,\n IAddressResolver,\n IAddrResolver,\n IContentHashResolver,\n IDNSRecordResolver,\n IDNSZoneResolver,\n IInterfaceResolver,\n INameResolver,\n IPubkeyResolver,\n ITextResolver,\n IExtendedResolver\n{\n /* Deprecated events */\n event ContentChanged(bytes32 indexed node, bytes32 hash);\n\n function setABI(\n bytes32 node,\n uint256 contentType,\n bytes calldata data\n ) external;\n\n function setAddr(bytes32 node, address addr) external;\n\n function setAddr(bytes32 node, uint256 coinType, bytes calldata a) external;\n\n function setContenthash(bytes32 node, bytes calldata hash) external;\n\n function setDnsrr(bytes32 node, bytes calldata data) external;\n\n function setName(bytes32 node, string calldata _name) external;\n\n function setPubkey(bytes32 node, bytes32 x, bytes32 y) external;\n\n function setText(\n bytes32 node,\n string calldata key,\n string calldata value\n ) external;\n\n function setInterface(\n bytes32 node,\n bytes4 interfaceID,\n address implementer\n ) external;\n\n function multicall(\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n function multicallWithNodeCheck(\n bytes32 nodehash,\n bytes[] calldata data\n ) external returns (bytes[] memory results);\n\n /* Deprecated functions */\n function content(bytes32 node) external view returns (bytes32);\n\n function multihash(bytes32 node) external view returns (bytes memory);\n\n function setContent(bytes32 node, bytes32 hash) external;\n\n function setMultihash(bytes32 node, bytes calldata hash) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.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 IERC1822ProxiableUpgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/interfaces/IERC1967Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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.8.3._\n */\ninterface IERC1967Upgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.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 IBeaconUpgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.sol\";\nimport \"../../interfaces/IERC1967Upgradeable.sol\";\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/StorageSlotUpgradeable.sol\";\nimport \"../utils/Initializable.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 */\nabstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {\n function __ERC1967Upgrade_init() internal onlyInitializing {\n }\n\n function __ERC1967Upgrade_init_unchained() internal onlyInitializing {\n }\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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlotUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n AddressUpgradeable.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(address newImplementation, bytes memory data, bool forceCall) 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 (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822ProxiableUpgradeable(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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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 StorageSlotUpgradeable.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(AddressUpgradeable.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlotUpgradeable.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(address newBeacon, bytes memory data, bool forceCall) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n }\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```solidity\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n *\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized != type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../interfaces/draft-IERC1822Upgradeable.sol\";\nimport \"../ERC1967/ERC1967UpgradeUpgradeable.sol\";\nimport \"./Initializable.sol\";\n\n/**\n * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an\n * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.\n *\n * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is\n * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing\n * `UUPSUpgradeable` with a custom implementation of upgrades.\n *\n * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.\n *\n * _Available since v4.1._\n */\nabstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {\n function __UUPSUpgradeable_init() internal onlyInitializing {\n }\n\n function __UUPSUpgradeable_init_unchained() internal onlyInitializing {\n }\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment\n address private immutable __self = address(this);\n\n /**\n * @dev Check that the execution is being performed through a delegatecall call and that the execution context is\n * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case\n * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a\n * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to\n * fail.\n */\n modifier onlyProxy() {\n require(address(this) != __self, \"Function must be called through delegatecall\");\n require(_getImplementation() == __self, \"Function must be called through active proxy\");\n _;\n }\n\n /**\n * @dev Check that the execution is not being performed through a delegate call. This allows a function to be\n * callable on the implementing contract but not through proxies.\n */\n modifier notDelegated() {\n require(address(this) == __self, \"UUPSUpgradeable: must not be called through delegatecall\");\n _;\n }\n\n /**\n * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the\n * implementation. It is used to validate the implementation's compatibility when performing an upgrade.\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. This is guaranteed by the `notDelegated` modifier.\n */\n function proxiableUUID() external view virtual override notDelegated returns (bytes32) {\n return _IMPLEMENTATION_SLOT;\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n *\n * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n */\n function upgradeTo(address newImplementation) public virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call\n * encoded in `data`.\n *\n * Calls {_authorizeUpgrade}.\n *\n * Emits an {Upgraded} event.\n *\n * @custom:oz-upgrades-unsafe-allow-reachable delegatecall\n */\n function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {\n _authorizeUpgrade(newImplementation);\n _upgradeToAndCallUUPS(newImplementation, data, true);\n }\n\n /**\n * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by\n * {upgradeTo} and {upgradeToAndCall}.\n *\n * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.\n *\n * ```solidity\n * function _authorizeUpgrade(address) internal override onlyOwner {}\n * ```\n */\n function _authorizeUpgrade(address newImplementation) internal virtual;\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155ReceiverUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155ReceiverUpgradeable is IERC165Upgradeable {\n /**\n * @dev Handles the receipt of a single ERC1155 token type. This function is\n * called at the end of a `safeTransferFrom` after the balance has been updated.\n *\n * NOTE: To accept the transfer, this must return\n * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n * (i.e. 0xf23a6e61, or its own function selector).\n *\n * @param operator The address which initiated the transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param id The ID of the token being transferred\n * @param value 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)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\n * is called at the end of a `safeBatchTransferFrom` after the balances have\n * been updated.\n *\n * NOTE: To accept the transfer(s), this must return\n * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n * (i.e. 0xbc197c81, or its own function selector).\n *\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155Upgradeable is IERC165Upgradeable {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(\n address[] calldata accounts,\n uint256[] calldata ids\n ) external view returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20PermitUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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 IERC20PermitUpgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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 IERC20Upgradeable {\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(address from, address to, uint256 amount) external returns (bool);\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\nimport \"../extensions/IERC20PermitUpgradeable.sol\";\nimport \"../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable {\n using AddressUpgradeable for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) 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(IERC20Upgradeable token, address spender, uint256 value) 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 /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to\n * 0 before setting it to a non-zero value.\n */\n function forceApprove(IERC20Upgradeable token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20PermitUpgradeable 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(IERC20Upgradeable 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 require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation 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 * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20Upgradeable token, bytes memory data) private returns (bool) {\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 cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && AddressUpgradeable.isContract(address(token));\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721ReceiverUpgradeable {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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" - }, - "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\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 ContextUpgradeable is Initializable {\n function __Context_init() internal onlyInitializing {\n }\n\n function __Context_init_unchained() internal onlyInitializing {\n }\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 /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165CheckerUpgradeable {\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n /**\n * @dev Returns true if `account` supports the {IERC165} interface.\n */\n function supportsERC165(address account) internal view returns (bool) {\n // Any contract that implements ERC165 must explicitly indicate support of\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n return\n supportsERC165InterfaceUnchecked(account, type(IERC165Upgradeable).interfaceId) &&\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\n }\n\n /**\n * @dev Returns true if `account` supports the interface defined by\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n // query support of both ERC165 as per the spec and support of _interfaceId\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\n }\n\n /**\n * @dev Returns a boolean array where each value corresponds to the\n * interfaces passed in and whether they're supported or not. This allows\n * you to batch check interfaces for a contract where your expectation\n * is that some interfaces may not be supported.\n *\n * See {IERC165-supportsInterface}.\n *\n * _Available since v3.4._\n */\n function getSupportedInterfaces(\n address account,\n bytes4[] memory interfaceIds\n ) internal view returns (bool[] memory) {\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n // query support of ERC165 itself\n if (supportsERC165(account)) {\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\n }\n }\n\n return interfaceIdsSupported;\n }\n\n /**\n * @dev Returns true if `account` supports all the interfaces defined in\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n *\n * Batch-querying can lead to gas savings by skipping repeated checks for\n * {IERC165} support.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n // query support of ERC165 itself\n if (!supportsERC165(account)) {\n return false;\n }\n\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\n return false;\n }\n }\n\n // all interfaces supported\n return true;\n }\n\n /**\n * @notice Query if a contract implements an interface, does not check ERC165 support\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return true if the contract at account indicates support of the interface with\n * identifier interfaceId, false otherwise\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\n * the behavior of this method is undefined. This precondition can be checked\n * with {supportsERC165}.\n *\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\n * should be exercised when using this function.\n *\n * Interface identification is specified in ERC-165.\n */\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\n // prepare call\n bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId);\n\n // perform static call\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly {\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0x00)\n }\n\n return success && returnSize >= 0x20 && returnValue > 0;\n }\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Storage based implementation of the {IERC165} interface.\n *\n * Contracts may inherit from this and call {_registerInterface} to declare\n * their support of an interface.\n */\nabstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable {\n function __ERC165Storage_init() internal onlyInitializing {\n }\n\n function __ERC165Storage_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev Mapping of interface ids to whether or not it's supported.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId];\n }\n\n /**\n * @dev Registers the contract as an implementer of the interface defined by\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\n * registering its interface id is not required.\n *\n * See {IERC165-supportsInterface}.\n *\n * Requirements:\n *\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n */\n function _registerInterface(bytes4 interfaceId) internal virtual {\n require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n _supportedInterfaces[interfaceId] = true;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[49] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {\n function __ERC165_init() internal onlyInitializing {\n }\n\n function __ERC165_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165Upgradeable).interfaceId;\n }\n\n /**\n * @dev This empty reserved space is put in place to allow future versions to add new\n * variables without shifting down storage in the inheritance chain.\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n */\n uint256[50] private __gap;\n}\n" - }, - "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.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 IERC165Upgradeable {\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" - }, - "@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\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 * ```solidity\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`, `uint256`._\n * _Available since v4.9 for `string`, `bytes`._\n */\nlibrary StorageSlotUpgradeable {\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 struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes 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 /**\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n}\n" - }, - "@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" - }, - "@openzeppelin/contracts/interfaces/IERC1271.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC1271 standard signature validation method for\n * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].\n *\n * _Available since v4.1._\n */\ninterface IERC1271 {\n /**\n * @dev Should return whether the signature provided is valid for the provided data\n * @param hash Hash of the data to be signed\n * @param signature Signature byte array associated with _data\n */\n function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);\n}\n" - }, - "@openzeppelin/contracts/interfaces/IERC1967.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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.8.3._\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" - }, - "@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" - }, - "@openzeppelin/contracts/proxy/Clones.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for\n * deploying minimal proxy contracts, also known as \"clones\".\n *\n * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies\n * > a minimal bytecode implementation that delegates all calls to a known, fixed address.\n *\n * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`\n * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the\n * deterministic method.\n *\n * _Available since v3.4._\n */\nlibrary Clones {\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create opcode, which should never revert.\n */\n function clone(address implementation) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create(0, 0x09, 0x37)\n }\n require(instance != address(0), \"ERC1167: create failed\");\n }\n\n /**\n * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.\n *\n * This function uses the create2 opcode and a `salt` to deterministically deploy\n * the clone. Using the same `implementation` and `salt` multiple time will revert, since\n * the clones cannot be deployed twice at the same address.\n */\n function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {\n /// @solidity memory-safe-assembly\n assembly {\n // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes\n // of the `implementation` address with the bytecode before the address.\n mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))\n // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.\n mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))\n instance := create2(0, 0x09, 0x37, salt)\n }\n require(instance != address(0), \"ERC1167: create2 failed\");\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n bytes32 salt,\n address deployer\n ) internal pure returns (address predicted) {\n /// @solidity memory-safe-assembly\n assembly {\n let ptr := mload(0x40)\n mstore(add(ptr, 0x38), deployer)\n mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)\n mstore(add(ptr, 0x14), implementation)\n mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)\n mstore(add(ptr, 0x58), salt)\n mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))\n predicted := keccak256(add(ptr, 0x43), 0x55)\n }\n }\n\n /**\n * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.\n */\n function predictDeterministicAddress(\n address implementation,\n bytes32 salt\n ) internal view returns (address predicted) {\n return predictDeterministicAddress(implementation, salt, address(this));\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" - }, - "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (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 */\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(address newImplementation, bytes memory data, bool forceCall) 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(address newImplementation, bytes memory data, bool forceCall) 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(address newBeacon, bytes memory data, bool forceCall) 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" - }, - "@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" - }, - "@openzeppelin/contracts/utils/Address.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.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 * Furthermore, `isContract` will also return true if the target contract within\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\n * which only has an effect at the end of a transaction.\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://consensys.net/diligence/blog/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.8.0/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(address target, bytes memory data, uint256 value) 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" - }, - "@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" - }, - "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/introspection/ERC165Checker.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Library used to query support of an interface declared via {IERC165}.\n *\n * Note that these functions return the actual result of the query: they do not\n * `revert` if an interface is not supported. It is up to the caller to decide\n * what to do in these cases.\n */\nlibrary ERC165Checker {\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\n\n /**\n * @dev Returns true if `account` supports the {IERC165} interface.\n */\n function supportsERC165(address account) internal view returns (bool) {\n // Any contract that implements ERC165 must explicitly indicate support of\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\n return\n supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&\n !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);\n }\n\n /**\n * @dev Returns true if `account` supports the interface defined by\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\n // query support of both ERC165 as per the spec and support of _interfaceId\n return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);\n }\n\n /**\n * @dev Returns a boolean array where each value corresponds to the\n * interfaces passed in and whether they're supported or not. This allows\n * you to batch check interfaces for a contract where your expectation\n * is that some interfaces may not be supported.\n *\n * See {IERC165-supportsInterface}.\n *\n * _Available since v3.4._\n */\n function getSupportedInterfaces(\n address account,\n bytes4[] memory interfaceIds\n ) internal view returns (bool[] memory) {\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\n\n // query support of ERC165 itself\n if (supportsERC165(account)) {\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);\n }\n }\n\n return interfaceIdsSupported;\n }\n\n /**\n * @dev Returns true if `account` supports all the interfaces defined in\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\n *\n * Batch-querying can lead to gas savings by skipping repeated checks for\n * {IERC165} support.\n *\n * See {IERC165-supportsInterface}.\n */\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\n // query support of ERC165 itself\n if (!supportsERC165(account)) {\n return false;\n }\n\n // query support of each interface in interfaceIds\n for (uint256 i = 0; i < interfaceIds.length; i++) {\n if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {\n return false;\n }\n }\n\n // all interfaces supported\n return true;\n }\n\n /**\n * @notice Query if a contract implements an interface, does not check ERC165 support\n * @param account The address of the contract to query for support of an interface\n * @param interfaceId The interface identifier, as specified in ERC-165\n * @return true if the contract at account indicates support of the interface with\n * identifier interfaceId, false otherwise\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\n * the behavior of this method is undefined. This precondition can be checked\n * with {supportsERC165}.\n *\n * Some precompiled contracts will falsely indicate support for a given interface, so caution\n * should be exercised when using this function.\n *\n * Interface identification is specified in ERC-165.\n */\n function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {\n // prepare call\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\n\n // perform static call\n bool success;\n uint256 returnSize;\n uint256 returnValue;\n assembly {\n success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)\n returnSize := returndatasize()\n returnValue := mload(0x00)\n }\n\n return success && returnSize >= 0x20 && returnValue > 0;\n }\n}\n" - }, - "@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" - }, - "@openzeppelin/contracts/utils/StorageSlot.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)\n// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.\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 * ```solidity\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`, `uint256`._\n * _Available since v4.9 for `string`, `bytes`._\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 struct StringSlot {\n string value;\n }\n\n struct BytesSlot {\n bytes 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 /**\n * @dev Returns an `StringSlot` with member `value` located at `slot`.\n */\n function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `StringSlot` representation of the string storage pointer `store`.\n */\n function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` with member `value` located at `slot`.\n */\n function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.\n */\n function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {\n /// @solidity memory-safe-assembly\n assembly {\n r.slot := store.slot\n }\n }\n}\n" - }, - "src/Migrations.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity 0.8.17;\n\n// Import all contracts from other repositories to make the openzeppelin-upgrades package work to deploy things.\n// See related issue here https://github.com/OpenZeppelin/openzeppelin-upgrades/issues/86\n\nimport {PluginSetupProcessor} from \"@aragon/osx/framework/plugin/setup/PluginSetupProcessor.sol\";\nimport {PluginRepoFactory} from \"@aragon/osx/framework/plugin/repo/PluginRepoFactory.sol\";\n" - }, - "src/MyPlugin.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\npragma solidity ^0.8.8;\n\nimport {IDAO, PluginUUPSUpgradeable} from \"@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol\";\n\n/// @title MyPlugin\n/// @dev Release 1, Build 1\ncontract MyPlugin is PluginUUPSUpgradeable {\n bytes32 public constant STORE_PERMISSION_ID = keccak256(\"STORE_PERMISSION\");\n\n uint256 public number; // added in build 1\n\n /// @notice Emitted when a number is stored.\n /// @param number The number.\n event NumberStored(uint256 number);\n\n constructor() {\n _disableInitializers();\n }\n\n /// @notice Initializes the plugin when build 1 is installed.\n /// @param _number The number to be stored.\n function initialize(IDAO _dao, uint256 _number) external initializer {\n __PluginUUPSUpgradeable_init(_dao);\n number = _number;\n\n emit NumberStored({number: _number});\n }\n\n /// @notice Stores a new number to storage. Caller needs STORE_PERMISSION.\n /// @param _number The number to be stored.\n function storeNumber(uint256 _number) external auth(STORE_PERMISSION_ID) {\n number = _number;\n\n emit NumberStored({number: _number});\n }\n}\n" - }, - "src/MyPluginSetup.sol": { - "content": "// SPDX-License-Identifier: AGPL-3.0-or-later\n\npragma solidity ^0.8.8;\n\nimport {PermissionLib} from \"@aragon/osx/core/permission/PermissionLib.sol\";\nimport {PluginSetup, IPluginSetup} from \"@aragon/osx/framework/plugin/setup/PluginSetup.sol\";\nimport {MyPlugin} from \"./MyPlugin.sol\";\n\n/// @title MyPluginSetup\n/// @dev Release 1, Build 1\ncontract MyPluginSetup is PluginSetup {\n address private immutable myPluginImplementation;\n\n constructor() {\n myPluginImplementation = address(new MyPlugin());\n }\n\n /// @inheritdoc IPluginSetup\n function prepareInstallation(\n address _dao,\n bytes memory _data\n ) external returns (address plugin, PreparedSetupData memory preparedSetupData) {\n uint256 number = abi.decode(_data, (uint256));\n\n plugin = createERC1967Proxy(\n myPluginImplementation,\n abi.encodeWithSelector(MyPlugin.initialize.selector, _dao, number)\n );\n\n PermissionLib.MultiTargetPermission[]\n memory permissions = new PermissionLib.MultiTargetPermission[](1);\n\n permissions[0] = PermissionLib.MultiTargetPermission({\n operation: PermissionLib.Operation.Grant,\n where: plugin,\n who: _dao,\n condition: PermissionLib.NO_CONDITION,\n permissionId: keccak256(\"STORE_PERMISSION\")\n });\n\n preparedSetupData.permissions = permissions;\n }\n\n /// @inheritdoc IPluginSetup\n function prepareUninstallation(\n address _dao,\n SetupPayload calldata _payload\n ) external pure returns (PermissionLib.MultiTargetPermission[] memory permissions) {\n permissions = new PermissionLib.MultiTargetPermission[](1);\n\n permissions[0] = PermissionLib.MultiTargetPermission({\n operation: PermissionLib.Operation.Revoke,\n where: _payload.plugin,\n who: _dao,\n condition: PermissionLib.NO_CONDITION,\n permissionId: keccak256(\"STORE_PERMISSION\")\n });\n }\n\n /// @inheritdoc IPluginSetup\n function implementation() external view returns (address) {\n return myPluginImplementation;\n }\n}\n" - } - }, - "settings": { - "metadata": { - "bytecodeHash": "none", - "useLiteralContent": true - }, - "optimizer": { - "enabled": true, - "runs": 800 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "storageLayout", - "devdoc", - "userdoc", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - } - } -} \ No newline at end of file diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index f2d6d89e..3608e253 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -1,101 +1,81 @@ -import {NetworkNameMapping} from './utils/helpers'; +import { + NetworkConfigs, + NetworkConfig, + networks, + SupportedNetworks, +} from '@aragon/osx-commons-configs'; import '@nomicfoundation/hardhat-chai-matchers'; import '@nomicfoundation/hardhat-toolbox'; import '@nomiclabs/hardhat-etherscan'; import '@openzeppelin/hardhat-upgrades'; import '@typechain/hardhat'; import {config as dotenvConfig} from 'dotenv'; -import {ethers} from 'ethers'; +import {BigNumber, ethers} from 'ethers'; import 'hardhat-deploy'; import 'hardhat-gas-reporter'; import {extendEnvironment, HardhatUserConfig} from 'hardhat/config'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import type {NetworkUserConfig} from 'hardhat/types'; +import { + HardhatNetworkAccountsUserConfig, + HardhatRuntimeEnvironment, +} from 'hardhat/types'; import {resolve} from 'path'; import 'solidity-coverage'; const dotenvConfigPath: string = process.env.DOTENV_CONFIG_PATH || '../../.env'; -dotenvConfig({path: resolve(__dirname, dotenvConfigPath)}); +dotenvConfig({path: resolve(__dirname, dotenvConfigPath), override: true}); if (!process.env.INFURA_API_KEY) { throw new Error('INFURA_API_KEY in .env not set'); } -const apiUrls: NetworkNameMapping = { - mainnet: 'https://mainnet.infura.io/v3/', - goerli: 'https://goerli.infura.io/v3/', - sepolia: 'https://sepolia.infura.io/v3/', - polygon: 'https://polygon-mainnet.infura.io/v3/', - polygonMumbai: 'https://polygon-mumbai.infura.io/v3/', - base: 'https://mainnet.base.org', - baseGoerli: 'https://goerli.base.org', - arbitrum: 'https://arbitrum-mainnet.infura.io/v3/', - arbitrumGoerli: 'https://arbitrum-goerli.infura.io/v3/', -}; +// Fetch the accounts specified in the .env file +function specifiedAccounts(): string[] { + return process.env.PRIVATE_KEY ? process.env.PRIVATE_KEY.split(',') : []; +} -export const networks: {[index: string]: NetworkUserConfig} = { - hardhat: { - chainId: 31337, - forking: { - url: `${ - apiUrls[process.env.NETWORK_NAME ? process.env.NETWORK_NAME : 'mainnet'] - }${process.env.INFURA_API_KEY}`, - }, - }, - mainnet: { - chainId: 1, - url: `${apiUrls.mainnet}${process.env.INFURA_API_KEY}`, - }, - goerli: { - chainId: 5, - url: `${apiUrls.goerli}${process.env.INFURA_API_KEY}`, - }, - sepolia: { - chainId: 11155111, - url: `${apiUrls.sepolia}${process.env.INFURA_API_KEY}`, - }, - polygon: { - chainId: 137, - url: `${apiUrls.polygon}${process.env.INFURA_API_KEY}`, - }, - polygonMumbai: { - chainId: 80001, - url: `${apiUrls.polygonMumbai}${process.env.INFURA_API_KEY}`, - }, - base: { - chainId: 8453, - url: `${apiUrls.base}`, - gasPrice: ethers.utils.parseUnits('0.001', 'gwei').toNumber(), - }, - baseGoerli: { - chainId: 84531, - url: `${apiUrls.baseGoerli}`, - gasPrice: ethers.utils.parseUnits('0.0000001', 'gwei').toNumber(), - }, - abitrum: { - chainId: 42161, - url: `${apiUrls.abitrum}${process.env.INFURA_API_KEY}`, - }, - arbitrumGoerli: { - chainId: 421613, - url: `${apiUrls.arbitrumGoerli}${process.env.INFURA_API_KEY}`, - }, +function getHardhatNetworkAccountsConfig( + numAccounts: number +): HardhatNetworkAccountsUserConfig { + const hardhatDefaultMnemonic = + 'test test test test test test test test test test test junk'; + + const hardhatDefaultAccounts = Array(numAccounts) + .fill(0) + .map( + (_, i) => + ethers.Wallet.fromMnemonic( + hardhatDefaultMnemonic, + `m/44'/60'/0'/0/${i}` + ).privateKey + ); + + const specAccounts = specifiedAccounts(); + const accounts = specAccounts.concat( + hardhatDefaultAccounts.slice(specAccounts.length) + ); + + const accountsConfig: HardhatNetworkAccountsUserConfig = accounts.map( + privateKey => { + const oneEther = BigNumber.from(10).pow(18); + return { + privateKey, + balance: oneEther.mul(100).toString(), // 100 ether + }; + } + ); + + return accountsConfig; +} + +type HardhatNetworksExtension = NetworkConfig & { + accounts?: string[]; }; -// Uses hardhats private key if none is set. DON'T USE THIS ACCOUNT FOR DEPLOYMENTS -const accounts = process.env.PRIVATE_KEY - ? process.env.PRIVATE_KEY.split(',') - : ['0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80']; - -for (const network in networks) { - // special treatement for hardhat - if (network.startsWith('hardhat')) { - networks[network].accounts = { - mnemonic: 'test test test test test test test test test test test junk', - }; - continue; - } - networks[network].accounts = accounts; +// Add the accounts specified in the `.env` file to the networks from osx-commons-configs +const osxCommonsConfigNetworks: NetworkConfigs = + networks; +for (const network of Object.keys(networks) as SupportedNetworks[]) { + osxCommonsConfigNetworks[network].accounts = specifiedAccounts(); } // Extend HardhatRuntimeEnvironment @@ -103,7 +83,36 @@ extendEnvironment((hre: HardhatRuntimeEnvironment) => { hre.aragonToVerifyContracts = []; }); +const namedAccounts = { + deployer: 0, + alice: 1, + bob: 2, + carol: 3, + dave: 4, + eve: 5, + frank: 6, + grace: 7, + harold: 8, + ivan: 9, + judy: 10, + mallory: 11, +}; + const config: HardhatUserConfig = { + namedAccounts, + networks: { + hardhat: { + throwOnTransactionFailures: true, + throwOnCallFailures: true, + blockGasLimit: BigNumber.from(10).pow(6).mul(30).toNumber(), // 30 million, really high to test some things that are only possible with a higher block gas limit + gasPrice: BigNumber.from(10).pow(9).mul(150).toNumber(), // 150 gwei + accounts: getHardhatNetworkAccountsConfig( + Object.keys(namedAccounts).length + ), + }, + ...osxCommonsConfigNetworks, + }, + defaultNetwork: 'hardhat', etherscan: { apiKey: { @@ -145,21 +154,6 @@ const config: HardhatUserConfig = { ], }, - namedAccounts: { - deployer: 0, - alice: 0, - bob: 1, - carol: 2, - dave: 3, - eve: 4, - frank: 5, - grace: 6, - harold: 7, - ivan: 8, - judy: 9, - mallory: 10, - }, - gasReporter: { currency: 'USD', enabled: process.env.REPORT_GAS === 'true' ? true : false, @@ -167,7 +161,6 @@ const config: HardhatUserConfig = { src: './contracts', coinmarketcap: process.env.COINMARKETCAP_API_KEY, }, - networks, paths: { artifacts: './artifacts', cache: './cache', diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 3826b900..4f57c25a 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -8,6 +8,10 @@ "url": "https://github.com/aragon" }, "devDependencies": { + "@aragon/osx-commons-configs": "0.1.0", + "@aragon/osx-ethers": "1.4.0-alpha.0", + "@aragon/osx-commons-sdk": "0.0.1-alpha.5", + "@aragon/osx-artifacts": "1.3.1", "@ethersproject/abi": "^5.7.0", "@ethersproject/abstract-signer": "^5.7.0", "@ethersproject/bignumber": "^5.7.0", @@ -17,7 +21,8 @@ "@nomicfoundation/hardhat-network-helpers": "^1.0.8", "@nomicfoundation/hardhat-toolbox": "^2.0.2", "@nomiclabs/hardhat-ethers": "^2.2.3", - "@nomiclabs/hardhat-etherscan": "^3.1.7", + "@nomiclabs/hardhat-etherscan": "^3.1.8", + "@openzeppelin/hardhat-upgrades": "^1.28.0", "@typechain/ethers-v5": "^10.1.1", "@typechain/hardhat": "^6.1.4", "@types/chai": "^4.3.4", @@ -40,11 +45,9 @@ "typescript": "^5.2.2" }, "dependencies": { - "@aragon/osx": "^1.3.0", - "@aragon/osx-ethers": "^1.3.0", + "@aragon/osx-commons-contracts": "1.4.0-alpha.3", "@openzeppelin/contracts": "^4.9.5", - "@openzeppelin/contracts-upgradeable": "^4.9.5", - "@openzeppelin/hardhat-upgrades": "^1.28.0" + "@openzeppelin/contracts-upgradeable": "^4.9.5" }, "files": [ "/src" @@ -72,6 +75,6 @@ "lint:ts": "cd ../../ && yarn run lint:contracts:ts", "test": "hardhat test", "typechain": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat typechain", - "clean": "rimraf ./artifacts ./cache ./coverage ./types ./coverage.json && yarn typechain" + "clean": "rimraf ./artifacts ./cache ./coverage ./typechain ./types ./coverage.json && yarn typechain" } } diff --git a/packages/contracts/plugin-settings.ts b/packages/contracts/plugin-settings.ts index 9fab7c5e..b43bb36b 100644 --- a/packages/contracts/plugin-settings.ts +++ b/packages/contracts/plugin-settings.ts @@ -1,15 +1,17 @@ import buildMetadata from './src/build-metadata.json'; import releaseMetadata from './src/release-metadata.json'; +import {VersionTag} from '@aragon/osx-commons-sdk'; export const PLUGIN_CONTRACT_NAME = 'MyPlugin'; // This must match the filename `packages/contracts/src/MyPlugin.sol` and the contract name `MyPlugin` within. export const PLUGIN_SETUP_CONTRACT_NAME = 'MyPluginSetup'; // This must match the filename `packages/contracts/src/MyPluginSetup.sol` and the contract name `MyPluginSetup` within. -export const PLUGIN_REPO_ENS_NAME = 'my'; // Subdomain Name 'my.plugin.dao.eth' +export const PLUGIN_REPO_ENS_SUBDOMAIN_NAME = 'test-2'; // This will result in the domain name 'my.plugin.dao.eth' -export const VERSION = { +export const VERSION: VersionTag = { release: 1, // Increment this number ONLY if breaking/incompatible changes were made. Updates between releases are NOT possible. build: 1, // Increment this number if non-breaking/compatible changes were made. Updates to newer builds are possible. }; +/* DO NOT CHANGE UNLESS YOU KNOW WHAT YOU ARE DOING */ export const METADATA = { build: buildMetadata, release: releaseMetadata, diff --git a/packages/contracts/src/Migrations.sol b/packages/contracts/src/Migrations.sol deleted file mode 100644 index f8328522..00000000 --- a/packages/contracts/src/Migrations.sol +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-or-later - -pragma solidity 0.8.17; - -// Additional, external solidity files can be imported here to generate artifacts and TypeChain bindings. -// These might be older versions of your own contracts or third-party contracts that you don't import in -// your code, but require for integration testing or deployment. - -// solhint-disable no-unused-import -import {DAOFactory} from "@aragon/osx/framework/dao/DAOFactory.sol"; -import {PluginSetupProcessor} from "@aragon/osx/framework/plugin/setup/PluginSetupProcessor.sol"; -import {PluginRepoFactory} from "@aragon/osx/framework/plugin/repo/PluginRepoFactory.sol"; -// solhint-enable no-unused-import diff --git a/packages/contracts/src/MyPlugin.sol b/packages/contracts/src/MyPlugin.sol index ddc8954a..ec8739f7 100644 --- a/packages/contracts/src/MyPlugin.sol +++ b/packages/contracts/src/MyPlugin.sol @@ -1,11 +1,13 @@ // SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity ^0.8.8; -import {IDAO, PluginUUPSUpgradeable} from "@aragon/osx/core/plugin/PluginUUPSUpgradeable.sol"; +import {PluginUUPSUpgradeable} from "@aragon/osx-commons-contracts/src/plugin/PluginUUPSUpgradeable.sol"; +import {IDAO} from "@aragon/osx-commons-contracts/src/dao/IDAO.sol"; /// @title MyPlugin /// @dev Release 1, Build 1 contract MyPlugin is PluginUUPSUpgradeable { + /// @notice The ID of the permission required to call the `storeNumber` function. bytes32 public constant STORE_PERMISSION_ID = keccak256("STORE_PERMISSION"); uint256 public number; // added in build 1 @@ -14,6 +16,8 @@ contract MyPlugin is PluginUUPSUpgradeable { /// @param number The number. event NumberStored(uint256 number); + /// @notice Disables the initializers on the implementation contract to prevent it from being left uninitialized. + /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } diff --git a/packages/contracts/src/MyPluginSetup.sol b/packages/contracts/src/MyPluginSetup.sol index 617d0707..01993a20 100644 --- a/packages/contracts/src/MyPluginSetup.sol +++ b/packages/contracts/src/MyPluginSetup.sol @@ -2,18 +2,26 @@ pragma solidity ^0.8.8; -import {PermissionLib} from "@aragon/osx/core/permission/PermissionLib.sol"; -import {PluginSetup, IPluginSetup} from "@aragon/osx/framework/plugin/setup/PluginSetup.sol"; +import {PermissionLib} from "@aragon/osx-commons-contracts/src/permission/PermissionLib.sol"; +import {ProxyLib} from "@aragon/osx-commons-contracts/src/utils/deployment/ProxyLib.sol"; +import {PluginUpgradeableSetup} from "@aragon/osx-commons-contracts/src/plugin/setup/PluginUpgradeableSetup.sol"; +import {IPluginSetup} from "@aragon/osx-commons-contracts/src/plugin/setup/IPluginSetup.sol"; +import {IDAO} from "@aragon/osx-commons-contracts/src/dao/IDAO.sol"; + import {MyPlugin} from "./MyPlugin.sol"; /// @title MyPluginSetup /// @dev Release 1, Build 1 -contract MyPluginSetup is PluginSetup { - address private immutable MY_PLUGIN_IMPLEMENTATION; +contract MyPluginSetup is PluginUpgradeableSetup { + using ProxyLib for address; - constructor() { - MY_PLUGIN_IMPLEMENTATION = address(new MyPlugin()); - } + /// @notice Constructs the `PluginUpgradeableSetup` by storing the `MyPlugin` implementation address. + /// @dev The implementation address is used to deploy UUPS proxies referencing it and + /// to verify the plugin on the respective block explorers. + constructor() PluginUpgradeableSetup(address(new MyPlugin())) {} + + /// @notice The ID of the permission required to call the `storeNumber` function. + bytes32 internal constant STORE_PERMISSION_ID = keccak256("STORE_PERMISSION"); /// @inheritdoc IPluginSetup function prepareInstallation( @@ -22,9 +30,8 @@ contract MyPluginSetup is PluginSetup { ) external returns (address plugin, PreparedSetupData memory preparedSetupData) { uint256 number = abi.decode(_data, (uint256)); - plugin = createERC1967Proxy( - MY_PLUGIN_IMPLEMENTATION, - abi.encodeWithSelector(MyPlugin.initialize.selector, _dao, number) + plugin = IMPLEMENTATION.deployUUPSProxy( + abi.encodeCall(MyPlugin.initialize, (IDAO(_dao), number)) ); PermissionLib.MultiTargetPermission[] @@ -35,12 +42,23 @@ contract MyPluginSetup is PluginSetup { where: plugin, who: _dao, condition: PermissionLib.NO_CONDITION, - permissionId: keccak256("STORE_PERMISSION") + permissionId: STORE_PERMISSION_ID }); preparedSetupData.permissions = permissions; } + /// @inheritdoc IPluginSetup + /// @dev The default implementation for the initial build 1 that reverts because no earlier build exists. + function prepareUpdate( + address _dao, + uint16 _fromBuild, + SetupPayload calldata _payload + ) external pure virtual returns (bytes memory, PreparedSetupData memory) { + (_dao, _fromBuild, _payload); + revert InvalidUpdatePath({fromBuild: 0, thisBuild: 1}); + } + /// @inheritdoc IPluginSetup function prepareUninstallation( address _dao, @@ -53,12 +71,7 @@ contract MyPluginSetup is PluginSetup { where: _payload.plugin, who: _dao, condition: PermissionLib.NO_CONDITION, - permissionId: keccak256("STORE_PERMISSION") + permissionId: STORE_PERMISSION_ID }); } - - /// @inheritdoc IPluginSetup - function implementation() external view returns (address) { - return MY_PLUGIN_IMPLEMENTATION; - } } diff --git a/packages/contracts/src/build-metadata.json b/packages/contracts/src/build-metadata.json index 4ac5fcb0..ba36b8b4 100644 --- a/packages/contracts/src/build-metadata.json +++ b/packages/contracts/src/build-metadata.json @@ -9,7 +9,7 @@ "name": "number", "type": "uint256", "internalType": "uint256", - "description": "The inital number to be stored." + "description": "The initial number to be stored." } ] }, diff --git a/packages/contracts/src/mocks/DAOMock.sol b/packages/contracts/src/mocks/DAOMock.sol new file mode 100644 index 00000000..008fcecf --- /dev/null +++ b/packages/contracts/src/mocks/DAOMock.sol @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: AGPL-3.0-or-later + +pragma solidity ^0.8.8; + +import {IDAO} from "@aragon/osx-commons-contracts/src/dao/IDAO.sol"; +import {IPermissionCondition} from "@aragon/osx-commons-contracts/src/permission/condition/IPermissionCondition.sol"; +import {PermissionLib} from "@aragon/osx-commons-contracts/src/permission/PermissionLib.sol"; + +contract DAOMock is IDAO { + address internal constant NO_CONDITION = address(0); + + event Granted( + bytes32 indexed permissionId, + address indexed here, + address where, + address indexed who, + address condition + ); + + event Revoked( + bytes32 indexed permissionId, + address indexed here, + address where, + address indexed who + ); + + bool public hasPermissionReturnValueMock; + + function setHasPermissionReturnValueMock(bool _hasPermissionReturnValueMock) external { + hasPermissionReturnValueMock = _hasPermissionReturnValueMock; + } + + function hasPermission( + address _where, + address _who, + bytes32 _permissionId, + bytes memory _data + ) external view override returns (bool) { + (_where, _who, _permissionId, _data); + return hasPermissionReturnValueMock; + } + + function applyMultiTargetPermissions( + PermissionLib.MultiTargetPermission[] calldata _items + ) external { + for (uint256 i; i < _items.length; ) { + PermissionLib.MultiTargetPermission memory item = _items[i]; + + if (item.operation == PermissionLib.Operation.Grant) { + grant({_where: item.where, _who: item.who, _permissionId: item.permissionId}); + } else if (item.operation == PermissionLib.Operation.Revoke) { + revoke({_where: item.where, _who: item.who, _permissionId: item.permissionId}); + } else if (item.operation == PermissionLib.Operation.GrantWithCondition) { + grantWithCondition({ + _where: item.where, + _who: item.who, + _permissionId: item.permissionId, + _condition: IPermissionCondition(item.condition) + }); + } + + unchecked { + ++i; + } + } + } + + function grant(address _where, address _who, bytes32 _permissionId) public { + (_where, _who, _permissionId); + + emit Granted({ + permissionId: _permissionId, + here: msg.sender, + where: _where, + who: _who, + condition: NO_CONDITION + }); + } + + function revoke(address _where, address _who, bytes32 _permissionId) public { + (_where, _who, _permissionId); + + emit Revoked({permissionId: _permissionId, here: msg.sender, where: _where, who: _who}); + } + + function grantWithCondition( + address _where, + address _who, + bytes32 _permissionId, + IPermissionCondition _condition + ) public { + emit Granted({ + permissionId: _permissionId, + here: msg.sender, + where: _where, + who: _who, + condition: address(_condition) + }); + } + + function getTrustedForwarder() public pure override returns (address) { + return address(0); + } + + function setTrustedForwarder(address _trustedForwarder) external pure override { + (_trustedForwarder); + } + + function setMetadata(bytes calldata _metadata) external pure override { + (_metadata); + } + + function execute( + bytes32 callId, + Action[] memory _actions, + uint256 allowFailureMap + ) external override returns (bytes[] memory execResults, uint256 failureMap) { + emit Executed(msg.sender, callId, _actions, allowFailureMap, failureMap, execResults); + } + + function deposit( + address _token, + uint256 _amount, + string calldata _reference + ) external payable override { + (_token, _amount, _reference); + } + + function setSignatureValidator(address _signatureValidator) external pure override { + (_signatureValidator); + } + + function isValidSignature( + bytes32 _hash, + bytes memory _signature + ) external pure override returns (bytes4) { + (_hash, _signature); + return 0x0; + } + + function registerStandardCallback( + bytes4 _interfaceId, + bytes4 _callbackSelector, + bytes4 _magicNumber + ) external pure override { + (_interfaceId, _callbackSelector, _magicNumber); + } +} diff --git a/packages/contracts/test/helpers/constants.ts b/packages/contracts/test/helpers/constants.ts deleted file mode 100644 index 9e0964e4..00000000 --- a/packages/contracts/test/helpers/constants.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {ethers} from 'hardhat'; - -export const EMPTY_DATA = '0x'; - -export const STORE_PERMISSION_ID = ethers.utils.id('STORE_PERMISSION'); - -export const ADDRESS_ZERO = ethers.constants.AddressZero; -export const ADDRESS_ONE = `0x${'0'.repeat(39)}1`; -export const ADDRESS_TWO = `0x${'0'.repeat(39)}2`; -export const NO_CONDITION = ADDRESS_ZERO; diff --git a/packages/contracts/test/helpers/fixture.ts b/packages/contracts/test/helpers/fixture.ts deleted file mode 100644 index 9ab355d8..00000000 --- a/packages/contracts/test/helpers/fixture.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {networks} from '../../hardhat.config'; -import {network} from 'hardhat'; - -export async function initializeFork( - forkNetwork: string, - blockNumber: number -): Promise { - if (!(networks as any)[forkNetwork]) { - throw new Error(`No info found for network '${forkNetwork}'.`); - } - - await network.provider.request({ - method: 'hardhat_reset', - params: [ - { - forking: { - jsonRpcUrl: `${(networks as any)[forkNetwork].url}`, - blockNumber: blockNumber, - }, - }, - ], - }); -} diff --git a/packages/contracts/test/helpers/test-dao.ts b/packages/contracts/test/helpers/test-dao.ts deleted file mode 100644 index c02c8581..00000000 --- a/packages/contracts/test/helpers/test-dao.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {DAO, DAO__factory} from '../../typechain'; -import {deployWithProxy} from '../../utils/helpers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {Wallet} from 'ethers'; -import {ethers} from 'hardhat'; - -export async function deployTestDao( - deployer: SignerWithAddress | Wallet -): Promise { - const DAO = new DAO__factory(deployer); - const dao = await deployWithProxy(DAO); - - const daoExampleURI = 'https://example.com'; - - await dao.initialize( - '0x', - deployer.address, - ethers.constants.AddressZero, - daoExampleURI - ); - - return dao; -} diff --git a/packages/contracts/test/helpers/test-psp.ts b/packages/contracts/test/helpers/test-psp.ts deleted file mode 100644 index 39239e0c..00000000 --- a/packages/contracts/test/helpers/test-psp.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { - DAO, - PluginSetupProcessor, - PluginSetupProcessor__factory, -} from '../../typechain'; -import {osxContracts} from '../../utils/helpers'; -import {Operation} from './types'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - -export async function createPluginSetupProcessor( - deployer: SignerWithAddress, - dao: DAO -): Promise { - // Create the PluginSetupProcessor - - const hardhatForkNetwork = process.env.NETWORK_NAME - ? process.env.NETWORK_NAME - : 'mainnet'; - - const psp = new PluginSetupProcessor__factory(deployer).attach( - osxContracts[hardhatForkNetwork].PluginSetupProcessor - ); - - // grant the owner full permission for plugins - await dao.applySingleTargetPermissions(psp.address, [ - { - operation: Operation.Grant, - who: deployer.address, - permissionId: await psp.APPLY_INSTALLATION_PERMISSION_ID(), - }, - { - operation: Operation.Grant, - who: deployer.address, - permissionId: await psp.APPLY_UPDATE_PERMISSION_ID(), - }, - { - operation: Operation.Grant, - who: deployer.address, - permissionId: await psp.APPLY_UNINSTALLATION_PERMISSION_ID(), - }, - ]); - // grant the PSP root to apply stuff - await dao.grant(dao.address, psp.address, await dao.ROOT_PERMISSION_ID()); - - return psp; -} diff --git a/packages/contracts/test/helpers/types.ts b/packages/contracts/test/helpers/types.ts deleted file mode 100644 index 018620a7..00000000 --- a/packages/contracts/test/helpers/types.ts +++ /dev/null @@ -1,258 +0,0 @@ -import {expect} from 'chai'; -import {BigNumber} from 'ethers'; - -export type VersionTag = {release: BigNumber; build: BigNumber}; - -export enum Operation { - Grant, - Revoke, - GrantWithCondition, -} - -export function getNamedTypesFromMetadata(inputs: any): string[] { - const types: string[] = []; - - for (const input of inputs) { - if (input.type.startsWith('tuple')) { - const tupleResult = getNamedTypesFromMetadata(input.components).join( - ', ' - ); - - let tupleString = `tuple(${tupleResult})`; - - if (input.type.endsWith('[]')) { - tupleString = tupleString.concat('[]'); - } - - types.push(tupleString); - } else if (input.type.endsWith('[]')) { - const baseType = input.type.slice(0, -2); - types.push(`${baseType}[] ${input.name}`); - } else { - types.push(`${input.type} ${input.name}`); - } - } - - return types; -} - -describe('getNamedTypesFromMetadata', function () { - it('simple', async () => { - const json = { - inputs: [ - { - name: 'number', - type: 'uint256', - internalType: 'uint256', - }, - { - name: 'account', - type: 'address', - internalType: 'address', - }, - ], - }; - - expect(getNamedTypesFromMetadata(json.inputs)).to.deep.equal([ - 'uint256 number', - 'address account', - ]); - }); - - it('array', async () => { - const json = { - inputs: [ - { - internalType: 'address[]', - name: 'members', - type: 'address[]', - }, - ], - }; - - expect(getNamedTypesFromMetadata(json.inputs)).to.deep.equal([ - 'address[] members', - ]); - }); - - it('struct', async () => { - const json = { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'onlyListed', - type: 'bool', - }, - { - internalType: 'uint16', - name: 'minApprovals', - type: 'uint16', - }, - ], - internalType: 'struct Multisig.MultisigSettings', - name: 'multisigSettings', - type: 'tuple', - }, - ], - }; - - expect(getNamedTypesFromMetadata(json.inputs)).to.deep.equal([ - 'tuple(bool onlyListed, uint16 minApprovals)', - ]); - }); - - it('nested struct', async () => { - const json = { - inputs: [ - { - components: [ - { - internalType: 'bool', - name: 'var1', - type: 'bool', - }, - { - components: [ - { - internalType: 'bool', - name: 'var2', - type: 'bool', - }, - { - internalType: 'uint16', - name: 'var3', - type: 'uint16', - }, - { - components: [ - { - internalType: 'bool', - name: 'var4', - type: 'bool', - }, - { - internalType: 'uint16', - name: 'var5', - type: 'uint16', - }, - { - internalType: 'bytes', - name: 'var6', - type: 'bytes', - }, - ], - internalType: 'struct Example', - name: 'layer3', - type: 'tuple', - }, - ], - internalType: 'struct Example', - name: 'layer2', - type: 'tuple', - }, - ], - internalType: 'struct Example', - name: 'layer1', - type: 'tuple', - }, - ], - }; - - expect(getNamedTypesFromMetadata(json.inputs)).to.deep.equal([ - 'tuple(bool var1, tuple(bool var2, uint16 var3, tuple(bool var4, uint16 var5, bytes var6)))', - ]); - }); - - it('array of structs', async () => { - const json = { - inputs: [ - { - components: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - indexed: false, - internalType: 'struct IDAO.Action[]', - name: 'actions', - type: 'tuple[]', - }, - ], - }; - - expect(getNamedTypesFromMetadata(json.inputs)).to.deep.equal([ - 'tuple(address to, uint256 value, bytes data)[]', - ]); - }); - - it('nested array of structs', async () => { - const json = { - inputs: [ - { - components: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - { - components: [ - { - internalType: 'address', - name: 'to', - type: 'address', - }, - { - internalType: 'uint256', - name: 'value', - type: 'uint256', - }, - { - internalType: 'bytes', - name: 'data', - type: 'bytes', - }, - ], - indexed: false, - internalType: 'struct IDAO.Action[]', - name: 'actions', - type: 'tuple[]', - }, - ], - indexed: false, - internalType: 'struct IDAO.Action[]', - name: 'actions', - type: 'tuple[]', - }, - ], - }; - - expect(getNamedTypesFromMetadata(json.inputs)).to.deep.equal([ - 'tuple(address to, uint256 value, bytes data, tuple(address to, uint256 value, bytes data)[])[]', - ]); - }); -}); diff --git a/packages/contracts/test/integration-testing/deployment.ts b/packages/contracts/test/integration-testing/deployment.ts index be9f567b..dd5633c0 100644 --- a/packages/contracts/test/integration-testing/deployment.ts +++ b/packages/contracts/test/integration-testing/deployment.ts @@ -1,106 +1,113 @@ +import {METADATA} from '../../plugin-settings'; +import {getProductionNetworkName, findPluginRepo} from '../../utils/helpers'; +import { + getLatestNetworkDeployment, + getNetworkNameByAlias, +} from '@aragon/osx-commons-configs'; +import { + DAO_PERMISSIONS, + PERMISSION_MANAGER_FLAGS, + PLUGIN_REPO_PERMISSIONS, + toHex, + uploadToIPFS, +} from '@aragon/osx-commons-sdk'; import { PluginRepo, - MyPluginSetup, - MyPluginSetup__factory, -} from '../../typechain'; -import {getPluginInfo, osxContracts} from '../../utils/helpers'; -import {toHex} from '../../utils/ipfs'; -import {PluginRepoRegistry__factory} from '@aragon/osx-ethers'; -import {PluginRepoRegistry} from '@aragon/osx-ethers'; -import {PluginRepo__factory} from '@aragon/osx-ethers'; + PluginRepoRegistry, + PluginRepoRegistry__factory, +} from '@aragon/osx-ethers'; +import {loadFixture} from '@nomicfoundation/hardhat-network-helpers'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {expect} from 'chai'; -import {deployments, ethers} from 'hardhat'; - -async function deployAll() { - await deployments.fixture(); -} - -describe('PluginRepo Deployment', function () { - let alice: SignerWithAddress; - let repoRegistry: PluginRepoRegistry; - let pluginRepo: PluginRepo; - - before(async () => { - const hardhatForkNetwork = process.env.NETWORK_NAME - ? process.env.NETWORK_NAME - : 'mainnet'; - - [alice] = await ethers.getSigners(); - - // Deploymen should be empty - expect(await deployments.all()).to.be.empty; +import env, {deployments, ethers} from 'hardhat'; - // Deploy all contracts - await deployAll(); - - // Print info - console.log(JSON.stringify(getPluginInfo('hardhat')['hardhat'], null, 2)); - - // plugin repo registry - repoRegistry = PluginRepoRegistry__factory.connect( - osxContracts[hardhatForkNetwork]['PluginRepoRegistry'], - alice - ); - - pluginRepo = PluginRepo__factory.connect( - getPluginInfo('hardhat')['hardhat'].address, - alice - ); - }); +const productionNetworkName = getProductionNetworkName(env); +describe(`Deployment on network '${productionNetworkName}'`, function () { it('creates the repo', async () => { - expect(await repoRegistry.entries(pluginRepo.address)).to.be.true; + const {pluginRepo, pluginRepoRegistry} = await loadFixture(fixture); + + expect(await pluginRepoRegistry.entries(pluginRepo.address)).to.be.true; }); it('makes the deployer the repo maintainer', async () => { + const {deployer, pluginRepo} = await loadFixture(fixture); + expect( await pluginRepo.isGranted( pluginRepo.address, - alice.address, - ethers.utils.id('ROOT_PERMISSION'), - ethers.constants.AddressZero + deployer.address, + DAO_PERMISSIONS.ROOT_PERMISSION_ID, + PERMISSION_MANAGER_FLAGS.NO_CONDITION ) ).to.be.true; expect( await pluginRepo.isGranted( pluginRepo.address, - alice.address, - ethers.utils.id('UPGRADE_REPO_PERMISSION'), - ethers.constants.AddressZero + deployer.address, + PLUGIN_REPO_PERMISSIONS.UPGRADE_REPO_PERMISSION_ID, + PERMISSION_MANAGER_FLAGS.NO_CONDITION ) ).to.be.true; expect( await pluginRepo.isGranted( pluginRepo.address, - alice.address, - ethers.utils.id('MAINTAINER_PERMISSION'), - ethers.constants.AddressZero + deployer.address, + PLUGIN_REPO_PERMISSIONS.MAINTAINER_PERMISSION_ID, + PERMISSION_MANAGER_FLAGS.NO_CONDITION ) ).to.be.true; }); context('PluginSetup Publication', async () => { - let setup: MyPluginSetup; - - before(async () => { - setup = MyPluginSetup__factory.connect( - (await deployments.get('MyPluginSetup')).address, - alice - ); - }); it('registers the setup', async () => { + const {pluginRepo} = await loadFixture(fixture); + + await pluginRepo['getVersion((uint8,uint16))']({ + release: 1, + build: 1, + }); + const results = await pluginRepo['getVersion((uint8,uint16))']({ release: 1, build: 1, }); - expect(results.pluginSetup).to.equal(setup.address); - expect(results.buildMetadata).to.equal( - toHex('ipfs://QmY919VZ9gkeF6L169qQo89ucsUB9ScTaJVbGn8vMGGHxr') - ); + const buildMetadataURI = `ipfs://${await uploadToIPFS( + JSON.stringify(METADATA.build, null, 2) + )}`; + + expect(results.buildMetadata).to.equal(toHex(buildMetadataURI)); }); }); }); + +type FixtureResult = { + deployer: SignerWithAddress; + pluginRepo: PluginRepo; + pluginRepoRegistry: PluginRepoRegistry; +}; + +async function fixture(): Promise { + // Deploy all + const tags = ['CreateRepo', 'NewVersion']; + await deployments.fixture(tags); + + const [deployer] = await ethers.getSigners(); + + // Plugin repo registry + const pluginRepoRegistry = PluginRepoRegistry__factory.connect( + getLatestNetworkDeployment(getNetworkNameByAlias(productionNetworkName)!)! + .PluginRepoRegistryProxy.address, + deployer + ); + + const {pluginRepo, ensDomain} = await findPluginRepo(env); + if (pluginRepo === null) { + throw `PluginRepo '${ensDomain}' does not exist yet.`; + } + + return {deployer, pluginRepo, pluginRepoRegistry}; +} diff --git a/packages/contracts/test/integration-testing/setup-processing.ts b/packages/contracts/test/integration-testing/setup-processing.ts index 0c590ba9..783a4d38 100644 --- a/packages/contracts/test/integration-testing/setup-processing.ts +++ b/packages/contracts/test/integration-testing/setup-processing.ts @@ -1,110 +1,45 @@ import {METADATA} from '../../plugin-settings'; import { - PluginRepo, - MyPlugin, + DAOMock, + DAOMock__factory, MyPluginSetup, MyPluginSetup__factory, MyPlugin__factory, } from '../../typechain'; -import {PluginSetupRefStruct} from '../../typechain/@aragon/osx/framework/dao/DAOFactory'; -import {getPluginInfo, osxContracts} from '../../utils/helpers'; -import {initializeFork} from '../helpers/fixture'; -import {installPLugin, uninstallPLugin} from '../helpers/setup'; -import {deployTestDao} from '../helpers/test-dao'; -import {getNamedTypesFromMetadata} from '../helpers/types'; +import {getProductionNetworkName, findPluginRepo} from '../../utils/helpers'; +import {installPLugin, uninstallPLugin} from './test-helpers'; +import { + getLatestNetworkDeployment, + getNetworkNameByAlias, +} from '@aragon/osx-commons-configs'; +import {getNamedTypesFromMetadata} from '@aragon/osx-commons-sdk'; import { - DAO, - PluginRepo__factory, PluginSetupProcessor, + PluginRepo, + PluginSetupProcessorStructs, PluginSetupProcessor__factory, } from '@aragon/osx-ethers'; +import {loadFixture} from '@nomicfoundation/hardhat-network-helpers'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {expect} from 'chai'; import {BigNumber} from 'ethers'; -import {ethers} from 'hardhat'; - -describe('PluginSetup Processing', function () { - let alice: SignerWithAddress; - - let psp: PluginSetupProcessor; - let dao: DAO; - let pluginRepo: PluginRepo; - - before(async () => { - [alice] = await ethers.getSigners(); - - const hardhatForkNetwork = 'goerli'; - - await initializeFork( - hardhatForkNetwork, - getPluginInfo(hardhatForkNetwork)[hardhatForkNetwork]['releases']['1'][ - 'builds' - ]['1']['blockNumberOfPublication'] - ); - - // PSP - psp = PluginSetupProcessor__factory.connect( - osxContracts[hardhatForkNetwork]['PluginSetupProcessor'], - alice - ); - - // Deploy DAO. - dao = await deployTestDao(alice); - - await dao.grant( - dao.address, - psp.address, - ethers.utils.id('ROOT_PERMISSION') - ); - await dao.grant( - psp.address, - alice.address, - ethers.utils.id('APPLY_INSTALLATION_PERMISSION') - ); - await dao.grant( - psp.address, - alice.address, - ethers.utils.id('APPLY_UNINSTALLATION_PERMISSION') - ); - await dao.grant( - psp.address, - alice.address, - ethers.utils.id('APPLY_UPDATE_PERMISSION') - ); - - pluginRepo = PluginRepo__factory.connect( - getPluginInfo(hardhatForkNetwork)[hardhatForkNetwork].address, - alice - ); - }); +import env, {deployments, ethers} from 'hardhat'; + +const productionNetworkName = getProductionNetworkName(env); +describe(`PluginSetup processing on network '${productionNetworkName}'`, function () { context('Build 1', async () => { - let setup: MyPluginSetup; - let pluginSetupRef: PluginSetupRefStruct; - let plugin: MyPlugin; - - before(async () => { - // Deploy setups. - setup = MyPluginSetup__factory.connect( - (await pluginRepo['getLatestVersion(uint8)'](1)).pluginSetup, - alice - ); + it('installs & uninstalls', async () => { + const {deployer, psp, daoMock, pluginSetup, pluginSetupRef} = + await loadFixture(fixture); - pluginSetupRef = { - versionTag: { - release: BigNumber.from(1), - build: BigNumber.from(1), - }, - pluginSetupRepo: pluginRepo.address, - }; - }); + // Allow all authorized calls to happen + await daoMock.setHasPermissionReturnValueMock(true); - beforeEach(async () => { // Install build 1. - const results = await installPLugin( psp, - dao, + daoMock, pluginSetupRef, ethers.utils.defaultAbiCoder.encode( getNamedTypesFromMetadata( @@ -114,16 +49,14 @@ describe('PluginSetup Processing', function () { ) ); - plugin = MyPlugin__factory.connect( + const plugin = MyPlugin__factory.connect( results.preparedEvent.args.plugin, - alice + deployer ); - }); - it('installs & uninstalls', async () => { // Check implementation. expect(await plugin.implementation()).to.be.eq( - await setup.implementation() + await pluginSetup.implementation() ); // Check state. @@ -132,7 +65,7 @@ describe('PluginSetup Processing', function () { // Uninstall build 1. await uninstallPLugin( psp, - dao, + daoMock, plugin, pluginSetupRef, ethers.utils.defaultAbiCoder.encode( @@ -146,3 +79,61 @@ describe('PluginSetup Processing', function () { }); }); }); + +type FixtureResult = { + deployer: SignerWithAddress; + alice: SignerWithAddress; + bob: SignerWithAddress; + daoMock: DAOMock; + psp: PluginSetupProcessor; + pluginRepo: PluginRepo; + pluginSetup: MyPluginSetup; + pluginSetupRef: PluginSetupProcessorStructs.PluginSetupRefStruct; +}; + +async function fixture(): Promise { + // Deploy all contracts + const tags = ['CreateRepo', 'NewVersion']; + await deployments.fixture(tags); + + const [deployer, alice, bob] = await ethers.getSigners(); + const daoMock = await new DAOMock__factory(deployer).deploy(); + + // Get the `PluginSetupProcessor` from the network + const psp = PluginSetupProcessor__factory.connect( + getLatestNetworkDeployment(getNetworkNameByAlias(productionNetworkName)!)! + .PluginSetupProcessor.address, + deployer + ); + + // Get the deployed `PluginRepo` + const {pluginRepo, ensDomain} = await findPluginRepo(env); + if (pluginRepo === null) { + throw `PluginRepo '${ensDomain}' does not exist yet.`; + } + + const release = 1; + const pluginSetup = MyPluginSetup__factory.connect( + (await pluginRepo['getLatestVersion(uint8)'](release)).pluginSetup, + deployer + ); + + const pluginSetupRef = { + versionTag: { + release: BigNumber.from(1), + build: BigNumber.from(1), + }, + pluginSetupRepo: pluginRepo.address, + }; + + return { + deployer, + alice, + bob, + psp, + daoMock, + pluginRepo, + pluginSetup, + pluginSetupRef, + }; +} diff --git a/packages/contracts/test/helpers/setup.ts b/packages/contracts/test/integration-testing/test-helpers.ts similarity index 55% rename from packages/contracts/test/helpers/setup.ts rename to packages/contracts/test/integration-testing/test-helpers.ts index 9d9890c7..4e583736 100644 --- a/packages/contracts/test/helpers/setup.ts +++ b/packages/contracts/test/integration-testing/test-helpers.ts @@ -1,40 +1,35 @@ -import {DAO, IPlugin, PluginSetupProcessor} from '../../typechain'; +import {DAOMock, IPlugin} from '../../typechain'; +import {hashHelpers} from '../../utils/helpers'; +import {findEvent} from '@aragon/osx-commons-sdk'; import { - InstallationPreparedEvent, - UninstallationPreparedEvent, - UpdateAppliedEvent, - UpdatePreparedEvent, - PluginSetupRefStruct, - UninstallationAppliedEvent, - InstallationAppliedEvent, -} from '../../typechain/@aragon/osx/framework/plugin/setup/PluginSetupProcessor'; -import {findEvent, hashHelpers} from '../../utils/helpers'; + PluginSetupProcessorEvents, + PluginSetupProcessorStructs, + PluginSetupProcessor, +} from '@aragon/osx-ethers'; import {expect} from 'chai'; import {ContractTransaction} from 'ethers'; export async function installPLugin( psp: PluginSetupProcessor, - dao: DAO, - pluginSetupRef: PluginSetupRefStruct, + dao: DAOMock, + pluginSetupRef: PluginSetupProcessorStructs.PluginSetupRefStruct, data: string ): Promise<{ prepareTx: ContractTransaction; applyTx: ContractTransaction; - preparedEvent: InstallationPreparedEvent; - appliedEvent: InstallationAppliedEvent; + preparedEvent: PluginSetupProcessorEvents.InstallationPreparedEvent; + appliedEvent: PluginSetupProcessorEvents.InstallationAppliedEvent; }> { const prepareTx = await psp.prepareInstallation(dao.address, { pluginSetupRef: pluginSetupRef, data: data, }); - const preparedEvent = await findEvent( - prepareTx, - 'InstallationPrepared' - ); - if (!preparedEvent) { - throw new Error('Failed to get InstallationPrepared event'); - } + const preparedEvent = + await findEvent( + prepareTx, + psp.interface.getEvent('InstallationPrepared').name + ); const plugin = preparedEvent.args.plugin; @@ -45,29 +40,27 @@ export async function installPLugin( helpersHash: hashHelpers(preparedEvent.args.preparedSetupData.helpers), }); - const appliedEvent = await findEvent( - applyTx, - 'InstallationApplied' - ); - if (!appliedEvent) { - throw new Error('Failed to get InstallationApplied event'); - } + const appliedEvent = + await findEvent( + applyTx, + psp.interface.getEvent('InstallationApplied').name + ); return {prepareTx, applyTx, preparedEvent, appliedEvent}; } export async function uninstallPLugin( psp: PluginSetupProcessor, - dao: DAO, + dao: DAOMock, plugin: IPlugin, - pluginSetupRef: PluginSetupRefStruct, + pluginSetupRef: PluginSetupProcessorStructs.PluginSetupRefStruct, data: string, currentHelpers: string[] ): Promise<{ prepareTx: ContractTransaction; applyTx: ContractTransaction; - preparedEvent: UninstallationPreparedEvent; - appliedEvent: UninstallationAppliedEvent; + preparedEvent: PluginSetupProcessorEvents.UninstallationPreparedEvent; + appliedEvent: PluginSetupProcessorEvents.UninstallationAppliedEvent; }> { const prepareTx = await psp.prepareUninstallation(dao.address, { pluginSetupRef: pluginSetupRef, @@ -78,13 +71,11 @@ export async function uninstallPLugin( }, }); - const preparedEvent = await findEvent( - prepareTx, - 'UninstallationPrepared' - ); - if (!preparedEvent) { - throw new Error('Failed to get UninstallationPrepared event'); - } + const preparedEvent = + await findEvent( + prepareTx, + psp.interface.getEvent('UninstallationPrepared').name + ); const preparedPermissions = preparedEvent.args.permissions; @@ -94,30 +85,28 @@ export async function uninstallPLugin( permissions: preparedPermissions, }); - const appliedEvent = await findEvent( - applyTx, - 'UninstallationApplied' - ); - if (!appliedEvent) { - throw new Error('Failed to get UninstallationApplied event'); - } + const appliedEvent = + await findEvent( + applyTx, + psp.interface.getEvent('UninstallationApplied').name + ); return {prepareTx, applyTx, preparedEvent, appliedEvent}; } export async function updatePlugin( psp: PluginSetupProcessor, - dao: DAO, + dao: DAOMock, plugin: IPlugin, currentHelpers: string[], - pluginSetupRefCurrent: PluginSetupRefStruct, - pluginSetupRefUpdate: PluginSetupRefStruct, + pluginSetupRefCurrent: PluginSetupProcessorStructs.PluginSetupRefStruct, + pluginSetupRefUpdate: PluginSetupProcessorStructs.PluginSetupRefStruct, data: string ): Promise<{ prepareTx: ContractTransaction; applyTx: ContractTransaction; - preparedEvent: UpdatePreparedEvent; - appliedEvent: UpdateAppliedEvent; + preparedEvent: PluginSetupProcessorEvents.UpdatePreparedEvent; + appliedEvent: PluginSetupProcessorEvents.UpdateAppliedEvent; }> { expect(pluginSetupRefCurrent.pluginSetupRepo).to.equal( pluginSetupRefUpdate.pluginSetupRepo @@ -133,13 +122,11 @@ export async function updatePlugin( data: data, }, }); - const preparedEvent = await findEvent( - prepareTx, - 'UpdatePrepared' - ); - if (!preparedEvent) { - throw new Error('Failed to get UpdatePrepared event'); - } + const preparedEvent = + await findEvent( + prepareTx, + psp.interface.getEvent('UpdatePrepared').name + ); const applyTx = await psp.applyUpdate(dao.address, { plugin: plugin.address, @@ -148,13 +135,11 @@ export async function updatePlugin( permissions: preparedEvent.args.preparedSetupData.permissions, helpersHash: hashHelpers(preparedEvent.args.preparedSetupData.helpers), }); - const appliedEvent = await findEvent( - applyTx, - 'UpdateApplied' - ); - if (!appliedEvent) { - throw new Error('Failed to get UpdateApplied event'); - } + const appliedEvent = + await findEvent( + applyTx, + psp.interface.getEvent('UpdateApplied').name + ); return {prepareTx, applyTx, preparedEvent, appliedEvent}; } diff --git a/packages/contracts/test/unit-testing/plugin-setup.ts b/packages/contracts/test/unit-testing/plugin-setup.ts index 5632f521..2381e17a 100644 --- a/packages/contracts/test/unit-testing/plugin-setup.ts +++ b/packages/contracts/test/unit-testing/plugin-setup.ts @@ -1,38 +1,41 @@ import {PLUGIN_SETUP_CONTRACT_NAME} from '../../plugin-settings'; import buildMetadata from '../../src/build-metadata.json'; import { - DAO, + DAOMock, + DAOMock__factory, MyPluginSetup, MyPluginSetup__factory, MyPlugin__factory, } from '../../typechain'; +import {STORE_PERMISSION_ID, defaultInitData} from './plugin'; import { - ADDRESS_ZERO, - EMPTY_DATA, - NO_CONDITION, - STORE_PERMISSION_ID, -} from '../helpers/constants'; -import {deployTestDao} from '../helpers/test-dao'; -import {Operation, getNamedTypesFromMetadata} from '../helpers/types'; -import {defaultInitData} from './plugin'; + ADDRESS, + Operation, + PERMISSION_MANAGER_FLAGS, + getNamedTypesFromMetadata, +} from '@aragon/osx-commons-sdk'; +import {loadFixture} from '@nomicfoundation/hardhat-network-helpers'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {expect} from 'chai'; import {ethers} from 'hardhat'; -describe(PLUGIN_SETUP_CONTRACT_NAME, function () { - let alice: SignerWithAddress; - let myPluginSetup: MyPluginSetup; - let MyPluginSetup: MyPluginSetup__factory; - let dao: DAO; +type FixtureResult = { + deployer: SignerWithAddress; + alice: SignerWithAddress; + bob: SignerWithAddress; + pluginSetup: MyPluginSetup; + daoMock: DAOMock; +}; - before(async () => { - [alice] = await ethers.getSigners(); - dao = await deployTestDao(alice); +async function fixture(): Promise { + const [deployer, alice, bob] = await ethers.getSigners(); + const daoMock = await new DAOMock__factory(deployer).deploy(); + const pluginSetup = await new MyPluginSetup__factory(deployer).deploy(); - MyPluginSetup = new MyPluginSetup__factory(alice); - myPluginSetup = await MyPluginSetup.deploy(); - }); + return {deployer, alice, bob, pluginSetup, daoMock}; +} +describe(PLUGIN_SETUP_CONTRACT_NAME, function () { describe('prepareInstallation', async () => { let initData: string; @@ -46,19 +49,21 @@ describe(PLUGIN_SETUP_CONTRACT_NAME, function () { }); it('returns the plugin, helpers, and permissions', async () => { + const {deployer, pluginSetup, daoMock} = await loadFixture(fixture); + const nonce = await ethers.provider.getTransactionCount( - myPluginSetup.address + pluginSetup.address ); const anticipatedPluginAddress = ethers.utils.getContractAddress({ - from: myPluginSetup.address, + from: pluginSetup.address, nonce, }); const { plugin, preparedSetupData: {helpers, permissions}, - } = await myPluginSetup.callStatic.prepareInstallation( - dao.address, + } = await pluginSetup.callStatic.prepareInstallation( + daoMock.address, initData ); @@ -69,31 +74,34 @@ describe(PLUGIN_SETUP_CONTRACT_NAME, function () { [ Operation.Grant, plugin, - dao.address, - NO_CONDITION, + daoMock.address, + PERMISSION_MANAGER_FLAGS.NO_CONDITION, STORE_PERMISSION_ID, ], ]); - await myPluginSetup.prepareInstallation(dao.address, initData); - const myPlugin = new MyPlugin__factory(alice).attach(plugin); + await pluginSetup.prepareInstallation(daoMock.address, initData); + const myPlugin = new MyPlugin__factory(deployer).attach(plugin); // initialization is correct - expect(await myPlugin.dao()).to.eq(dao.address); + expect(await myPlugin.dao()).to.eq(daoMock.address); expect(await myPlugin.number()).to.be.eq(defaultInitData.number); }); }); describe('prepareUninstallation', async () => { it('returns the permissions', async () => { - const dummyAddr = ADDRESS_ZERO; + const {pluginSetup, daoMock} = await loadFixture(fixture); + + const dummyAddr = ADDRESS.ZERO; + const emptyData = '0x'; - const permissions = await myPluginSetup.callStatic.prepareUninstallation( - dao.address, + const permissions = await pluginSetup.callStatic.prepareUninstallation( + daoMock.address, { plugin: dummyAddr, currentHelpers: [], - data: EMPTY_DATA, + data: emptyData, } ); @@ -102,8 +110,8 @@ describe(PLUGIN_SETUP_CONTRACT_NAME, function () { [ Operation.Revoke, dummyAddr, - dao.address, - NO_CONDITION, + daoMock.address, + PERMISSION_MANAGER_FLAGS.NO_CONDITION, STORE_PERMISSION_ID, ], ]); diff --git a/packages/contracts/test/unit-testing/plugin.ts b/packages/contracts/test/unit-testing/plugin.ts index 3f25edf7..715b0922 100644 --- a/packages/contracts/test/unit-testing/plugin.ts +++ b/packages/contracts/test/unit-testing/plugin.ts @@ -1,77 +1,101 @@ import {PLUGIN_CONTRACT_NAME} from '../../plugin-settings'; -import {DAO, MyPlugin, MyPlugin__factory} from '../../typechain'; +import { + DAOMock, + DAOMock__factory, + MyPlugin, + MyPlugin__factory, +} from '../../typechain'; import '../../typechain/src/MyPlugin'; -import {deployWithProxy} from '../../utils/helpers'; -import {STORE_PERMISSION_ID} from '../helpers/constants'; -import {deployTestDao} from '../helpers/test-dao'; +import {loadFixture} from '@nomicfoundation/hardhat-network-helpers'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {expect} from 'chai'; import {BigNumber} from 'ethers'; -import {ethers} from 'hardhat'; +import {ethers, upgrades} from 'hardhat'; export type InitData = {number: BigNumber}; export const defaultInitData: InitData = { number: BigNumber.from(123), }; -describe(PLUGIN_CONTRACT_NAME, function () { - let alice: SignerWithAddress; - let bob: SignerWithAddress; - let dao: DAO; - let myPlugin: MyPlugin; - let defaultInput: InitData; - - before(async () => { - [alice, bob] = await ethers.getSigners(); - dao = await deployTestDao(alice); +export const STORE_PERMISSION_ID = ethers.utils.id('STORE_PERMISSION'); - defaultInput = {number: BigNumber.from(123)}; - }); +type FixtureResult = { + deployer: SignerWithAddress; + alice: SignerWithAddress; + bob: SignerWithAddress; + plugin: MyPlugin; + daoMock: DAOMock; +}; - beforeEach(async () => { - myPlugin = await deployWithProxy(new MyPlugin__factory(alice)); +async function fixture(): Promise { + const [deployer, alice, bob] = await ethers.getSigners(); + const daoMock = await new DAOMock__factory(deployer).deploy(); + const plugin = (await upgrades.deployProxy( + new MyPlugin__factory(deployer), + [daoMock.address, defaultInitData.number], + { + kind: 'uups', + initializer: 'initialize', + unsafeAllow: ['constructor'], + constructorArgs: [], + } + )) as unknown as MyPlugin; - await myPlugin.initialize(dao.address, defaultInput.number); - }); + return {deployer, alice, bob, plugin, daoMock}; +} +describe(PLUGIN_CONTRACT_NAME, function () { describe('initialize', async () => { it('reverts if trying to re-initialize', async () => { + const {plugin, daoMock} = await loadFixture(fixture); await expect( - myPlugin.initialize(dao.address, defaultInput.number) + plugin.initialize(daoMock.address, defaultInitData.number) ).to.be.revertedWith('Initializable: contract is already initialized'); }); it('stores the number', async () => { - expect(await myPlugin.number()).to.equal(defaultInput.number); + const {plugin} = await loadFixture(fixture); + + expect(await plugin.number()).to.equal(defaultInitData.number); }); }); describe('storeNumber', async () => { - const newNumber = BigNumber.from(456); + it('reverts if sender lacks permission', async () => { + const newNumber = BigNumber.from(456); - beforeEach(async () => { - await dao.grant(myPlugin.address, alice.address, STORE_PERMISSION_ID); - }); + const {bob, plugin, daoMock} = await loadFixture(fixture); - it('reverts if sender lacks permission', async () => { - await expect(myPlugin.connect(bob).storeNumber(newNumber)) - .to.be.revertedWithCustomError(myPlugin, 'DaoUnauthorized') + expect(await daoMock.hasPermissionReturnValueMock()).to.equal(false); + + await expect(plugin.connect(bob).storeNumber(newNumber)) + .to.be.revertedWithCustomError(plugin, 'DaoUnauthorized') .withArgs( - dao.address, - myPlugin.address, + daoMock.address, + plugin.address, bob.address, STORE_PERMISSION_ID ); }); it('stores the number', async () => { - await expect(myPlugin.storeNumber(newNumber)).to.not.be.reverted; - expect(await myPlugin.number()).to.equal(newNumber); + const newNumber = BigNumber.from(456); + + const {plugin, daoMock} = await loadFixture(fixture); + await daoMock.setHasPermissionReturnValueMock(true); + + await expect(plugin.storeNumber(newNumber)).to.not.be.reverted; + expect(await plugin.number()).to.equal(newNumber); }); it('emits the NumberStored event', async () => { - await expect(myPlugin.storeNumber(newNumber)) - .to.emit(myPlugin, 'NumberStored') + const newNumber = BigNumber.from(456); + + const {plugin, daoMock} = await loadFixture(fixture); + await daoMock.setHasPermissionReturnValueMock(true); + + await expect(plugin.storeNumber(newNumber)) + .to.emit(plugin, 'NumberStored') .withArgs(newNumber); }); }); diff --git a/packages/contracts/utils/etherscan.ts b/packages/contracts/utils/etherscan.ts index b09324e0..be379144 100644 --- a/packages/contracts/utils/etherscan.ts +++ b/packages/contracts/utils/etherscan.ts @@ -9,7 +9,7 @@ export function delay(ms: number) { export const verifyContract = async ( address: string, - constructorArguments: any[] + constructorArguments: unknown[] ) => { try { const msDelay = 500; // minimum delay between tasks diff --git a/packages/contracts/utils/hardhat.d.ts b/packages/contracts/utils/hardhat.d.ts index a6071bcb..ab5507f8 100644 --- a/packages/contracts/utils/hardhat.d.ts +++ b/packages/contracts/utils/hardhat.d.ts @@ -1,6 +1,6 @@ export type VerifyEntry = { address: string; - args?: any[]; + args?: unknown[]; }; declare module 'hardhat/types' { diff --git a/packages/contracts/utils/helpers.ts b/packages/contracts/utils/helpers.ts index 794503d0..f40c8088 100644 --- a/packages/contracts/utils/helpers.ts +++ b/packages/contracts/utils/helpers.ts @@ -1,237 +1,188 @@ -import {activeContractsList} from '@aragon/osx-ethers'; -import {ContractFactory, ContractTransaction} from 'ethers'; +import {PLUGIN_REPO_ENS_SUBDOMAIN_NAME} from '../plugin-settings'; import { - Interface, - LogDescription, - defaultAbiCoder, - keccak256, -} from 'ethers/lib/utils'; -import {existsSync, statSync, readFileSync, writeFileSync} from 'fs'; + SupportedNetworks, + getLatestNetworkDeployment, + getNetworkNameByAlias, +} from '@aragon/osx-commons-configs'; +import { + UnsupportedNetworkError, + VersionTag, + findEvent, +} from '@aragon/osx-commons-sdk'; +import { + ENSSubdomainRegistrar__factory, + ENS__factory, + IAddrResolver__factory, + PluginRepo, + PluginRepoEvents, + PluginRepo__factory, +} from '@aragon/osx-ethers'; +import {ContractTransaction} from 'ethers'; +import {LogDescription, defaultAbiCoder, keccak256} from 'ethers/lib/utils'; import {ethers} from 'hardhat'; -import {upgrades} from 'hardhat'; - -export type NetworkNameMapping = {[index: string]: string}; - -export type ContractList = {[index: string]: {[index: string]: string}}; - -export type ContractBlockNumberList = { - // network - [index: string]: {[index: string]: {address: string; blockNumber: number}}; -}; - -export const osxContracts: ContractList = activeContractsList; - -export const networkNameMapping: NetworkNameMapping = { - mainnet: 'mainnet', - goerli: 'goerli', - sepolia: 'sepolia', - polygon: 'polygon', - polygonMumbai: 'mumbai', - base: 'base', - baseGoerli: 'baseGoerli', - arbitrum: 'arbitrum', - arbitrumGoerli: 'arbitrumGoerli', -}; - -export const ERRORS = { - ALREADY_INITIALIZED: 'Initializable: contract is already initialized', -}; - -export function getPluginRepoFactoryAddress(networkName: string) { - return getContractAddress(networkName, 'PluginRepoFactory'); +import {HardhatRuntimeEnvironment} from 'hardhat/types'; + +export function isLocal(hre: HardhatRuntimeEnvironment): boolean { + return ( + hre.network.name === 'localhost' || + hre.network.name === 'hardhat' || + hre.network.name === 'coverage' + ); } -export function getPluginRepoRegistryAddress(networkName: string) { - return getContractAddress(networkName, 'PluginRepoRegistry'); -} - -function getContractAddress(networkName: string, contractName: string) { - let contractAddr: string; - - if ( - networkName === 'localhost' || - networkName === 'hardhat' || - networkName === 'coverage' - ) { - const hardhatForkNetwork = process.env.NETWORK_NAME - ? process.env.NETWORK_NAME - : 'mainnet'; - - contractAddr = osxContracts[hardhatForkNetwork][contractName]; - console.log( - `Using the "${hardhatForkNetwork}" ${contractName} address (${contractAddr}) for deployment testing on network "${networkName}"` - ); +export function getProductionNetworkName( + hre: HardhatRuntimeEnvironment +): string { + let productionNetworkName: string; + if (isLocal(hre)) { + if (process.env.NETWORK_NAME) { + productionNetworkName = process.env.NETWORK_NAME; + } else { + console.log( + `No network has been provided in the '.env' file. Defaulting to '${SupportedNetworks.SEPOLIA}' as the production network.` + ); + productionNetworkName = SupportedNetworks.SEPOLIA; + } } else { - contractAddr = osxContracts[networkNameMapping[networkName]][contractName]; - - console.log( - `Using the ${networkNameMapping[networkName]} ${contractName} address (${contractAddr}) for deployment...` - ); + productionNetworkName = hre.network.name; } - return contractAddr; -} - -export function getPluginInfo(networkName: string): any { - let pluginInfoFilePath: string; - let pluginInfo: any = {}; - if (['localhost', 'hardhat', 'coverage'].includes(networkName)) { - pluginInfoFilePath = '../../plugin-info-testing.json'; - } else { - pluginInfoFilePath = '../../plugin-info.json'; + if (getNetworkNameByAlias(productionNetworkName) === null) { + throw new UnsupportedNetworkError(productionNetworkName); } - if ( - existsSync(pluginInfoFilePath) && - statSync(pluginInfoFilePath).size !== 0 - ) { - pluginInfo = JSON.parse(readFileSync(pluginInfoFilePath, 'utf-8')); + return productionNetworkName; +} - if (!pluginInfo[networkName]) { - pluginInfo[networkName] = {}; - } +export function pluginEnsDomain(hre: HardhatRuntimeEnvironment): string { + const network = getProductionNetworkName(hre); + if (network === SupportedNetworks.SEPOLIA) { + return `${PLUGIN_REPO_ENS_SUBDOMAIN_NAME}.plugin.aragon-dao.eth`; } else { - pluginInfo[networkName] = {}; + return `${PLUGIN_REPO_ENS_SUBDOMAIN_NAME}.plugin.dao.eth`; } - return pluginInfo; } -function storePluginInfo(networkName: string, pluginInfo: any) { - if (['localhost', 'hardhat', 'coverage'].includes(networkName)) { - writeFileSync( - '../../plugin-info-testing.json', - JSON.stringify(pluginInfo, null, 2) + '\n' - ); +export async function findPluginRepo( + hre: HardhatRuntimeEnvironment +): Promise<{pluginRepo: PluginRepo | null; ensDomain: string}> { + const [deployer] = await hre.ethers.getSigners(); + const productionNetworkName: string = getProductionNetworkName(hre); + + const registrar = ENSSubdomainRegistrar__factory.connect( + getLatestNetworkDeployment(getNetworkNameByAlias(productionNetworkName)!)! + .PluginENSSubdomainRegistrarProxy.address, + deployer + ); + + // Check if the ens record exists already + const ens = ENS__factory.connect(await registrar.ens(), deployer); + const ensDomain = pluginEnsDomain(hre); + const node = ethers.utils.namehash(ensDomain); + const recordExists = await ens.recordExists(node); + + if (!recordExists) { + return {pluginRepo: null, ensDomain}; } else { - writeFileSync( - '../../plugin-info.json', - JSON.stringify(pluginInfo, null, 2) + '\n' + const resolver = IAddrResolver__factory.connect( + await ens.resolver(node), + deployer ); - } -} -export function addDeployedRepo( - networkName: string, - repoName: string, - contractAddr: string, - args: [], - blockNumber: number -) { - const pluginInfo = getPluginInfo(networkName); - - pluginInfo[networkName]['repo'] = repoName; - pluginInfo[networkName]['address'] = contractAddr; - pluginInfo[networkName]['args'] = args; - pluginInfo[networkName]['blockNumberOfDeployment'] = blockNumber; - - storePluginInfo(networkName, pluginInfo); -} - -export function addCreatedVersion( - networkName: string, - version: {release: number; build: number}, - metadataURIs: {release: string; build: string}, - blockNumberOfPublication: number, - setup: { - name: string; - address: string; - args: []; - blockNumberOfDeployment: number; - }, - implementation: { - name: string; - address: string; - args: []; - blockNumberOfDeployment: number; - }, - helpers: - | [ - { - name: string; - address: string; - args: []; - blockNumberOfDeployment: number; - } - ] - | [] -) { - const pluginInfo = getPluginInfo(networkName); - - // Releases can already exist - if (!pluginInfo[networkName]['releases']) { - pluginInfo[networkName]['releases'] = {}; - } - if (!pluginInfo[networkName]['releases'][version.release]) { - pluginInfo[networkName]['releases'][version.release] = {}; - pluginInfo[networkName]['releases'][version.release]['builds'] = {}; + const pluginRepo = PluginRepo__factory.connect( + await resolver.addr(node), + deployer + ); + return { + pluginRepo, + ensDomain, + }; } - - // Update the releaseMetadataURI - pluginInfo[networkName]['releases'][version.release]['releaseMetadataURI'] = - metadataURIs.release; - - pluginInfo[networkName]['releases'][`${version.release}`]['builds'][ - `${version.build}` - ] = {}; - - pluginInfo[networkName]['releases'][`${version.release}`]['builds'][ - `${version.build}` - ] = { - setup: setup, - implementation: implementation, - helpers: helpers, - buildMetadataURI: metadataURIs.build, - blockNumberOfPublication: blockNumberOfPublication, - }; - - storePluginInfo(networkName, pluginInfo); } -export function toBytes(string: string) { - return ethers.utils.formatBytes32String(string); +export type EventWithBlockNumber = { + event: LogDescription; + blockNumber: number; +}; + +export async function getPastVersionCreatedEvents( + pluginRepo: PluginRepo +): Promise { + const eventFilter = pluginRepo.filters['VersionCreated'](); + + const logs = await pluginRepo.provider.getLogs({ + fromBlock: 0, + toBlock: 'latest', + address: pluginRepo.address, + topics: eventFilter.topics, + }); + + return logs.map((log, index) => { + return { + event: pluginRepo.interface.parseLog(log), + blockNumber: logs[index].blockNumber, + }; + }); } export function hashHelpers(helpers: string[]) { return keccak256(defaultAbiCoder.encode(['address[]'], [helpers])); } -export async function findEvent(tx: ContractTransaction, eventName: string) { - const receipt = await tx.wait(); - - const event = (receipt.events || []).find(event => event.event === eventName); +export type LatestVersion = { + versionTag: VersionTag; + pluginSetupContract: string; + releaseMetadata: string; + buildMetadata: string; +}; - return event as T | undefined; -} +export async function createVersion( + pluginRepoContract: string, + pluginSetupContract: string, + releaseNumber: number, + releaseMetadata: string, + buildMetadata: string +): Promise { + const signers = await ethers.getSigners(); + + const PluginRepo = new PluginRepo__factory(signers[0]); + const pluginRepo = PluginRepo.attach(pluginRepoContract); + + const tx = await pluginRepo.createVersion( + releaseNumber, + pluginSetupContract, + buildMetadata, + releaseMetadata + ); + + console.log(`Creating build for release ${releaseNumber} with tx ${tx.hash}`); + + await tx.wait(); + + const versionCreatedEvent = + await findEvent( + tx, + pluginRepo.interface.events['VersionCreated(uint8,uint16,address,bytes)'] + .name + ); -export async function findEventTopicLog( - tx: ContractTransaction, - iface: Interface, - eventName: string -): Promise { - const receipt = await tx.wait(); - const topic = iface.getEventTopic(eventName); - const log = receipt.logs.find(x => x.topics[0] === topic); - if (!log) { - throw new Error(`No logs found for the topic of event "${eventName}".`); + // Check if versionCreatedEvent is not undefined + if (versionCreatedEvent) { + console.log( + `Created build ${versionCreatedEvent.args.build} for release ${ + versionCreatedEvent.args.release + } with setup address: ${ + versionCreatedEvent.args.pluginSetup + }, with build metadata ${ethers.utils.toUtf8String( + buildMetadata + )} and release metadata ${ethers.utils.toUtf8String(releaseMetadata)}` + ); + } else { + // Handle the case where the event is not found + throw new Error('Failed to get VersionCreatedEvent event log'); } - return iface.parseLog(log) as LogDescription & (T | LogDescription); + return tx; } -type DeployOptions = { - constructurArgs?: unknown[]; - proxyType?: 'uups'; -}; - -export async function deployWithProxy( - contractFactory: ContractFactory, - options: DeployOptions = {} -): Promise { - upgrades.silenceWarnings(); // Needed because we pass the `unsafeAllow: ["constructor"]` option. - - return upgrades.deployProxy(contractFactory, [], { - kind: options.proxyType || 'uups', - initializer: false, - unsafeAllow: ['constructor'], - constructorArgs: options.constructurArgs || [], - }) as unknown as Promise; -} +export const AragonOSxAsciiArt = + " ____ _____ \n /\\ / __ \\ / ____| \n / \\ _ __ __ _ __ _ ___ _ __ | | | | (_____ __ \n / /\\ \\ | '__/ _` |/ _` |/ _ \\| '_ \\ | | | |\\___ \\ \\/ / \n / ____ \\| | | (_| | (_| | (_) | | | | | |__| |____) > < \n /_/ \\_\\_| \\__,_|\\__, |\\___/|_| |_| \\____/|_____/_/\\_\\ \n __/ | \n |___/ \n"; diff --git a/packages/contracts/utils/ipfs.ts b/packages/contracts/utils/ipfs.ts deleted file mode 100644 index 2739b9bd..00000000 --- a/packages/contracts/utils/ipfs.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {BytesLike, ethers} from 'ethers'; -import IPFS from 'ipfs-http-client'; - -export async function uploadToIPFS(content: string): Promise { - const client = IPFS.create({ - url: 'https://prod.ipfs.aragon.network/api/v0', - headers: { - 'X-API-KEY': 'b477RhECf8s8sdM7XrkLBs2wHc4kCMwpbcFC55Kt', - }, - }); - - const res = await client.add(content); - await client.pin.add(res.cid); - return res.cid.toString(); -} - -export function toHex(input: string): BytesLike { - return ethers.utils.hexlify(ethers.utils.toUtf8Bytes(input)); -} diff --git a/packages/contracts/yarn.lock b/packages/contracts/yarn.lock index 6bcec348..43944771 100644 --- a/packages/contracts/yarn.lock +++ b/packages/contracts/yarn.lock @@ -2,21 +2,76 @@ # yarn lockfile v1 -"@aragon/osx-ethers@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@aragon/osx-ethers/-/osx-ethers-1.3.0.tgz#85ddd93f4448789e94154b313f9ddd8069dff568" - integrity sha512-zfLAYdgZ3SSifHiyJLkBKmoDw/IEX/yzvw6liUAa/gz7HZOsrwp3JsBJaIwB2epOnGa6vhXyWTKKZ15aJvoMaA== +"@aragon/osx-artifacts@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@aragon/osx-artifacts/-/osx-artifacts-1.3.1.tgz#68fa04844086a92d74351df2e9392ade3c8696dc" + integrity sha512-u6IFP8fQZIS65Ks5Sl1DKlw8Qp9s5I7DSn9n/odQohWnN65A17HwHaCPTEcXl2AL3r71rFawldQ8i5/2yU3UGA== + +"@aragon/osx-commons-configs@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@aragon/osx-commons-configs/-/osx-commons-configs-0.1.0.tgz#21bbc5a964eb144e30033a44cc352d35c62982f9" + integrity sha512-qTs/loihwqALBGmhZngORb+p7pjuQJY5UEd8TLNiEW/BGHEpAJPp4GeQu7GSnigRGEKWpPD5W96kfEsaPtLkuQ== + dependencies: + tslib "^2.6.2" + +"@aragon/osx-commons-contracts@1.4.0-alpha.3": + version "1.4.0-alpha.3" + resolved "https://registry.yarnpkg.com/@aragon/osx-commons-contracts/-/osx-commons-contracts-1.4.0-alpha.3.tgz#a199720e225ea1da07303d8609948bb4a926508b" + integrity sha512-9ygB2QhroeMetRQJUNvvVKAdOxN3Yhxx+yqz1F5Euf4U3VlPtU9Ick9hlDrwTPuWd5ITufmWEiDAo5zDy1A99A== + dependencies: + "@openzeppelin/contracts" "4.9.5" + "@openzeppelin/contracts-upgradeable" "4.9.5" + +"@aragon/osx-commons-sdk@0.0.1-alpha.5": + version "0.0.1-alpha.5" + resolved "https://registry.yarnpkg.com/@aragon/osx-commons-sdk/-/osx-commons-sdk-0.0.1-alpha.5.tgz#9808e7c6a441af6459f96016abe07812706d97bf" + integrity sha512-GyErC61lMckZyG17BZPgPWMkY3phZGdzZHMP17mUyE6vFhth9at5HKhNBi7bWB0eNkcM9RrQksIWHjmSHbW3ug== + dependencies: + "@aragon/osx-ethers" "^1.3.0-rc0.4" + "@aragon/osx-ethers-v1.0.0" "npm:@aragon/osx-ethers@1.2.1" + "@aragon/sdk-ipfs" "^1.1.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/contracts" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/providers" "^5.7.2" + "@ethersproject/wallet" "^5.7.0" + graphql "^16.5.0" + graphql-request "^4.3.0" + ipfs-http-client "^51.0.0" + yup "^1.2.0" + +"@aragon/osx-ethers-v1.0.0@npm:@aragon/osx-ethers@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@aragon/osx-ethers/-/osx-ethers-1.2.1.tgz#a442048137153ed5a3ca4eff3f3927b45a5134b5" + integrity sha512-3Fscq8C9elIktiI6OT7fR5iaAvim+ghU6IUvZF3P/phvWm9roNp/GXAROhA/Vx41NQxeqmfXokgFo6KOWt4drA== dependencies: ethers "^5.6.2" -"@aragon/osx@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@aragon/osx/-/osx-1.3.0.tgz#eee59963546016bb3b41b7c7a9b7c41d33b37de2" - integrity sha512-ziLmnhWEoFS/uthxAYfI9tSylesMLTDe69XggKP9LK/tIOKAhyYjfAJ2mbhWZcH558c9o0gzAEErkDhqh/wdog== +"@aragon/osx-ethers@1.4.0-alpha.0": + version "1.4.0-alpha.0" + resolved "https://registry.yarnpkg.com/@aragon/osx-ethers/-/osx-ethers-1.4.0-alpha.0.tgz#329f1ac27660b486fa0b296dddeb004ce352001c" + integrity sha512-fFsrG/XMIjZe3MxVQdf87gqAC4q0Z/eBp72QUuzXJQ0gMSTSj/4TvveFn1N8toLN6KsJolMEkaTamyCGYR+5iA== + dependencies: + ethers "^5.6.2" + +"@aragon/osx-ethers@^1.3.0-rc0.4": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@aragon/osx-ethers/-/osx-ethers-1.3.1.tgz#d72decea14cc5c11c55ad6654e97b3380429c1c9" + integrity sha512-6APDAasHrIVmJ0SxUSmWCxusVe46OF3eGZGp8MVD3j4BDJjJ+FIrrjN9ePkTpPja3X8GL6PD00l1WIzW2GZQMQ== + dependencies: + ethers "^5.6.2" + +"@aragon/sdk-ipfs@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@aragon/sdk-ipfs/-/sdk-ipfs-1.1.0.tgz#178ee5ce840ce40b44ba0345dd5068e1b5608f9d" + integrity sha512-2uAh/QPcmaita4AfHYV93lESzAhrmGEZ6CL7pvOH86HTkU6j7LnePvD1ly+x0hxRznTb+zgVgSPPKUn0ArPycw== dependencies: - "@ensdomains/ens-contracts" "0.0.11" - "@openzeppelin/contracts" "4.8.1" - "@openzeppelin/contracts-upgradeable" "4.8.1" + "@web-std/fetch" "^4.1.0" + "@web-std/file" "^3.0.2" + "@web-std/form-data" "^3.0.2" + isomorphic-unfetch "^3.1.0" "@aws-crypto/sha256-js@1.2.2": version "1.2.2" @@ -51,13 +106,6 @@ dependencies: tslib "^2.3.1" -"@babel/runtime@^7.4.4": - version "7.23.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.6.tgz#c05e610dc228855dc92ef1b53d07389ed8ab521d" - integrity sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ== - dependencies: - regenerator-runtime "^0.14.0" - "@chainsafe/as-sha256@^0.3.1": version "0.3.1" resolved "https://registry.yarnpkg.com/@chainsafe/as-sha256/-/as-sha256-0.3.1.tgz#3639df0e1435cab03f4d9870cc3ac079e57a6fc9" @@ -101,110 +149,11 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@ensdomains/address-encoder@^0.1.7": - version "0.1.9" - resolved "https://registry.yarnpkg.com/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz#f948c485443d9ef7ed2c0c4790e931c33334d02d" - integrity sha512-E2d2gP4uxJQnDu2Kfg1tHNspefzbLT8Tyjrm5sEuim32UkU2sm5xL4VXtgc2X33fmPEw9+jUMpGs4veMbf+PYg== - dependencies: - bech32 "^1.1.3" - blakejs "^1.1.0" - bn.js "^4.11.8" - bs58 "^4.0.1" - crypto-addr-codec "^0.1.7" - nano-base32 "^1.0.1" - ripemd160 "^2.0.2" - -"@ensdomains/buffer@^0.0.13": - version "0.0.13" - resolved "https://registry.yarnpkg.com/@ensdomains/buffer/-/buffer-0.0.13.tgz#b9f60defb78fc5f2bee30faca17e63dfbef19253" - integrity sha512-8aA+U/e4S54ebPwcge1HHvvpgXLKxPd6EOSegMlrTvBnKB8RwB3OpNyflaikD6KqzIwDaBaH8bvnTrMcfpV7oQ== - dependencies: - "@nomiclabs/hardhat-truffle5" "^2.0.0" - -"@ensdomains/ens-contracts@0.0.11": - version "0.0.11" - resolved "https://registry.yarnpkg.com/@ensdomains/ens-contracts/-/ens-contracts-0.0.11.tgz#a1cd87af8c454b694acba5be1a44c1b20656a9be" - integrity sha512-b74OlFcds9eyHy26uE2fGcM+ZCSFtPeRGVbUYWq3NRlf+9t8TIgPwF3rCNwpAFQG0B/AHb4C4hYX2BBJYR1zPg== - dependencies: - "@ensdomains/buffer" "^0.0.13" - "@ensdomains/solsha1" "0.0.3" - "@openzeppelin/contracts" "^4.1.0" - dns-packet "^5.3.0" - -"@ensdomains/ens@0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" - integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== - dependencies: - bluebird "^3.5.2" - eth-ens-namehash "^2.0.8" - solc "^0.4.20" - testrpc "0.0.1" - web3-utils "^1.0.0-beta.31" - -"@ensdomains/ensjs@^2.0.1": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@ensdomains/ensjs/-/ensjs-2.1.0.tgz#0a7296c1f3d735ef019320d863a7846a0760c460" - integrity sha512-GRbGPT8Z/OJMDuxs75U/jUNEC0tbL0aj7/L/QQznGYKm/tiasp+ndLOaoULy9kKJFC0TBByqfFliEHDgoLhyog== - dependencies: - "@babel/runtime" "^7.4.4" - "@ensdomains/address-encoder" "^0.1.7" - "@ensdomains/ens" "0.4.5" - "@ensdomains/resolver" "0.2.4" - content-hash "^2.5.2" - eth-ens-namehash "^2.0.8" - ethers "^5.0.13" - js-sha3 "^0.8.0" - -"@ensdomains/resolver@0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" - integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== - -"@ensdomains/solsha1@0.0.3": - version "0.0.3" - resolved "https://registry.yarnpkg.com/@ensdomains/solsha1/-/solsha1-0.0.3.tgz#fd479da9d40aadb59ff4fb4ec50632e7d2275a83" - integrity sha512-uhuG5LzRt/UJC0Ux83cE2rCKwSleRePoYdQVcqPN1wyf3/ekMzT/KZUF9+v7/AG5w9jlMLCQkUM50vfjr0Yu9Q== - dependencies: - hash-test-vectors "^1.3.2" - -"@ethereumjs/common@2.5.0": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.5.0.tgz#ec61551b31bef7a69d1dc634d8932468866a4268" - integrity sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg== - dependencies: - crc-32 "^1.2.0" - ethereumjs-util "^7.1.1" - -"@ethereumjs/common@2.6.5", "@ethereumjs/common@^2.5.0", "@ethereumjs/common@^2.6.4": - version "2.6.5" - resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30" - integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA== - dependencies: - crc-32 "^1.2.0" - ethereumjs-util "^7.1.5" - "@ethereumjs/rlp@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" integrity sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw== -"@ethereumjs/tx@3.3.2": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.2.tgz#348d4624bf248aaab6c44fec2ae67265efe3db00" - integrity sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog== - dependencies: - "@ethereumjs/common" "^2.5.0" - ethereumjs-util "^7.1.2" - -"@ethereumjs/tx@3.5.2": - version "3.5.2" - resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.2.tgz#197b9b6299582ad84f9527ca961466fce2296c1c" - integrity sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw== - dependencies: - "@ethereumjs/common" "^2.6.4" - ethereumjs-util "^7.1.5" - "@ethereumjs/util@^8.1.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.1.0.tgz#299df97fb6b034e0577ce9f94c7d9d1004409ed4" @@ -489,7 +438,7 @@ "@ethersproject/constants" "^5.7.0" "@ethersproject/logger" "^5.7.0" -"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0": +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.7.0": version "5.7.0" resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b" integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ== @@ -606,11 +555,6 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@leichtgewicht/ip-codec@^2.0.1": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" - integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== - "@metamask/eth-sig-util@^4.0.0": version "4.0.1" resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz#3ad61f6ea9ad73ba5b19db780d40d9aae5157088" @@ -898,7 +842,7 @@ resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.3.tgz#b41053e360c31a32c2640c9a45ee981a7e603fe0" integrity sha512-YhzPdzb612X591FOe68q+qXVXGG2ANZRvDo0RRUtimev85rCrAlv/TLMEZw5c+kq9AbzocLTVX/h2jVIFPL9Xg== -"@nomiclabs/hardhat-etherscan@^3.1.7": +"@nomiclabs/hardhat-etherscan@^3.1.8": version "3.1.8" resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.8.tgz#3c12ee90b3733e0775e05111146ef9418d4f5a38" integrity sha512-v5F6IzQhrsjHh6kQz4uNrym49brK9K5bYCq2zQZ729RYRaifI9hHbtmK+KkIVevfhut7huQFEQ77JLRMAzWYjQ== @@ -914,49 +858,12 @@ table "^6.8.0" undici "^5.14.0" -"@nomiclabs/hardhat-truffle5@^2.0.0": - version "2.0.7" - resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-truffle5/-/hardhat-truffle5-2.0.7.tgz#7519eadd2c6c460c2addc3d4d6efda7a8883361e" - integrity sha512-Pw8451IUZp1bTp0QqCHCYfCHs66sCnyxPcaorapu9mfOV9xnZsVaFdtutnhNEiXdiZwbed7LFKpRsde4BjFwig== - dependencies: - "@nomiclabs/truffle-contract" "^4.2.23" - "@types/chai" "^4.2.0" - chai "^4.2.0" - ethereumjs-util "^7.1.4" - fs-extra "^7.0.1" - -"@nomiclabs/truffle-contract@^4.2.23": - version "4.5.10" - resolved "https://registry.yarnpkg.com/@nomiclabs/truffle-contract/-/truffle-contract-4.5.10.tgz#52adcca1068647e1c2b44bf0e6a89fc4ad7f9213" - integrity sha512-nF/6InFV+0hUvutyFgsdOMCoYlr//2fJbRER4itxYtQtc4/O1biTwZIKRu+5l2J5Sq6LU2WX7vZHtDgQdhWxIQ== - dependencies: - "@ensdomains/ensjs" "^2.0.1" - "@truffle/blockchain-utils" "^0.1.3" - "@truffle/contract-schema" "^3.4.7" - "@truffle/debug-utils" "^6.0.22" - "@truffle/error" "^0.1.0" - "@truffle/interface-adapter" "^0.5.16" - bignumber.js "^7.2.1" - ethereum-ens "^0.8.0" - ethers "^4.0.0-beta.1" - source-map-support "^0.5.19" - -"@openzeppelin/contracts-upgradeable@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.1.tgz#363f7dd08f25f8f77e16d374350c3d6b43340a7a" - integrity sha512-1wTv+20lNiC0R07jyIAbHU7TNHKRwGiTGRfiNnA8jOWjKT98g5OgLpYWOi40Vgpk8SPLA9EvfJAbAeIyVn+7Bw== - -"@openzeppelin/contracts-upgradeable@^4.9.4": +"@openzeppelin/contracts-upgradeable@4.9.5", "@openzeppelin/contracts-upgradeable@^4.9.5": version "4.9.5" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.5.tgz#572b5da102fc9be1d73f34968e0ca56765969812" integrity sha512-f7L1//4sLlflAN7fVzJLoRedrf5Na3Oal5PZfIq55NFcVZ90EpV1q5xOvL4lFvg3MNICSDr2hH0JUBxwlxcoPg== -"@openzeppelin/contracts@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.8.1.tgz#709cfc4bbb3ca9f4460d60101f15dac6b7a2d5e4" - integrity sha512-xQ6eUZl+RDyb/FiZe1h+U7qr/f4p/SrTSQcTPH2bjur3C5DbuW/zFgCU/b1P/xcIaEqJep+9ju4xDRi3rmChdQ== - -"@openzeppelin/contracts@^4.1.0", "@openzeppelin/contracts@^4.9.4": +"@openzeppelin/contracts@4.9.5", "@openzeppelin/contracts@^4.9.5": version "4.9.5" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.5.tgz#1eed23d4844c861a1835b5d33507c1017fa98de8" integrity sha512-ZK+W5mVhRppff9BE6YdR8CC52C8zAvsVAiWhEtQ5+oNxFE6h1WdeWo+FJSF8KKvtxxVYZ7MTP/5KoVpAU3aSWg== @@ -1174,11 +1081,6 @@ "@sentry/types" "5.30.0" tslib "^1.9.3" -"@sindresorhus/is@^4.0.0", "@sindresorhus/is@^4.6.0": - version "4.6.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" - integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== - "@smithy/types@^2.7.0": version "2.7.0" resolved "https://registry.yarnpkg.com/@smithy/types/-/types-2.7.0.tgz#6ed9ba5bff7c4d28c980cff967e6d8456840a4f3" @@ -1200,111 +1102,6 @@ dependencies: antlr4ts "^0.5.0-alpha.4" -"@szmarczak/http-timer@^4.0.5": - version "4.0.6" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" - integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== - dependencies: - defer-to-connect "^2.0.0" - -"@szmarczak/http-timer@^5.0.1": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a" - integrity sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw== - dependencies: - defer-to-connect "^2.0.1" - -"@truffle/abi-utils@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@truffle/abi-utils/-/abi-utils-1.0.3.tgz#9f0df7a8aaf5e815bee47e0ad26bd4c91e4045f2" - integrity sha512-AWhs01HCShaVKjml7Z4AbVREr/u4oiWxCcoR7Cktm0mEvtT04pvnxW5xB/cI4znRkrbPdFQlFt67kgrAjesYkw== - dependencies: - change-case "3.0.2" - fast-check "3.1.1" - web3-utils "1.10.0" - -"@truffle/blockchain-utils@^0.1.3": - version "0.1.9" - resolved "https://registry.yarnpkg.com/@truffle/blockchain-utils/-/blockchain-utils-0.1.9.tgz#d9b55bd23a134578e4217bae55a6dfbbb038d6dc" - integrity sha512-RHfumgbIVo68Rv9ofDYfynjnYZIfP/f1vZy4RoqkfYAO+fqfc58PDRzB1WAGq2U6GPuOnipOJxQhnqNnffORZg== - -"@truffle/codec@^0.17.3": - version "0.17.3" - resolved "https://registry.yarnpkg.com/@truffle/codec/-/codec-0.17.3.tgz#94057e56e1a947594b35eba498d96915df3861d2" - integrity sha512-Ko/+dsnntNyrJa57jUD9u4qx9nQby+H4GsUO6yjiCPSX0TQnEHK08XWqBSg0WdmCH2+h0y1nr2CXSx8gbZapxg== - dependencies: - "@truffle/abi-utils" "^1.0.3" - "@truffle/compile-common" "^0.9.8" - big.js "^6.0.3" - bn.js "^5.1.3" - cbor "^5.2.0" - debug "^4.3.1" - lodash "^4.17.21" - semver "^7.5.4" - utf8 "^3.0.0" - web3-utils "1.10.0" - -"@truffle/compile-common@^0.9.8": - version "0.9.8" - resolved "https://registry.yarnpkg.com/@truffle/compile-common/-/compile-common-0.9.8.tgz#f91507c895852289a17bf401eefebc293c4c69f0" - integrity sha512-DTpiyo32t/YhLI1spn84D3MHYHrnoVqO+Gp7ZHrYNwDs86mAxtNiH5lsVzSb8cPgiqlvNsRCU9nm9R0YmKMTBQ== - dependencies: - "@truffle/error" "^0.2.2" - colors "1.4.0" - -"@truffle/contract-schema@^3.4.7": - version "3.4.16" - resolved "https://registry.yarnpkg.com/@truffle/contract-schema/-/contract-schema-3.4.16.tgz#c529c3f230db407b2f03290373b20b7366f2d37e" - integrity sha512-g0WNYR/J327DqtJPI70ubS19K1Fth/1wxt2jFqLsPmz5cGZVjCwuhiie+LfBde4/Mc9QR8G+L3wtmT5cyoBxAg== - dependencies: - ajv "^6.10.0" - debug "^4.3.1" - -"@truffle/debug-utils@^6.0.22": - version "6.0.57" - resolved "https://registry.yarnpkg.com/@truffle/debug-utils/-/debug-utils-6.0.57.tgz#4e9a1051221c5f467daa398b0ca638d8b6408a82" - integrity sha512-Q6oI7zLaeNLB69ixjwZk2UZEWBY6b2OD1sjLMGDKBGR7GaHYiw96GLR2PFgPH1uwEeLmV4N78LYaQCrDsHbNeA== - dependencies: - "@truffle/codec" "^0.17.3" - "@trufflesuite/chromafi" "^3.0.0" - bn.js "^5.1.3" - chalk "^2.4.2" - debug "^4.3.1" - highlightjs-solidity "^2.0.6" - -"@truffle/error@^0.1.0": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.1.1.tgz#e52026ac8ca7180d83443dca73c03e07ace2a301" - integrity sha512-sE7c9IHIGdbK4YayH4BC8i8qMjoAOeg6nUXUDZZp8wlU21/EMpaG+CLx+KqcIPyR+GSWIW3Dm0PXkr2nlggFDA== - -"@truffle/error@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.2.2.tgz#1b4c4237c14dda792f20bd4f19ff4e4585b47796" - integrity sha512-TqbzJ0O8DHh34cu8gDujnYl4dUl6o2DE4PR6iokbybvnIm/L2xl6+Gv1VC+YJS45xfH83Yo3/Zyg/9Oq8/xZWg== - -"@truffle/interface-adapter@^0.5.16": - version "0.5.37" - resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.37.tgz#95d249c1912d2baaa63c54e8a138d3f476a1181a" - integrity sha512-lPH9MDgU+7sNDlJSClwyOwPCfuOimqsCx0HfGkznL3mcFRymc1pukAR1k17zn7ErHqBwJjiKAZ6Ri72KkS+IWw== - dependencies: - bn.js "^5.1.3" - ethers "^4.0.32" - web3 "1.10.0" - -"@trufflesuite/chromafi@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@trufflesuite/chromafi/-/chromafi-3.0.0.tgz#f6956408c1af6a38a6ed1657783ce59504a1eb8b" - integrity sha512-oqWcOqn8nT1bwlPPfidfzS55vqcIDdpfzo3HbU9EnUmcSTX+I8z0UyUFI3tZQjByVJulbzxHxUGS3ZJPwK/GPQ== - dependencies: - camelcase "^4.1.0" - chalk "^2.3.2" - cheerio "^1.0.0-rc.2" - detect-indent "^5.0.0" - highlight.js "^10.4.1" - lodash.merge "^4.6.2" - strip-ansi "^4.0.0" - strip-indent "^2.0.0" - "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -1347,23 +1144,13 @@ dependencies: "@types/node" "*" -"@types/bn.js@^5.1.0", "@types/bn.js@^5.1.1": +"@types/bn.js@^5.1.0": version "5.1.5" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.5.tgz#2e0dacdcce2c0f16b905d20ff87aedbc6f7b4bf0" integrity sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A== dependencies: "@types/node" "*" -"@types/cacheable-request@^6.0.1", "@types/cacheable-request@^6.0.2": - version "6.0.3" - resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" - integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== - dependencies: - "@types/http-cache-semantics" "*" - "@types/keyv" "^3.1.4" - "@types/node" "*" - "@types/responselike" "^1.0.0" - "@types/chai-as-promised@^7.1.3": version "7.1.8" resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.8.tgz#f2b3d82d53c59626b5d6bbc087667ccb4b677fe9" @@ -1371,7 +1158,7 @@ dependencies: "@types/chai" "*" -"@types/chai@*", "@types/chai@^4.2.0", "@types/chai@^4.3.4": +"@types/chai@*", "@types/chai@^4.3.4": version "4.3.11" resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.11.tgz#e95050bf79a932cb7305dd130254ccdf9bde671c" integrity sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ== @@ -1398,18 +1185,6 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/http-cache-semantics@*": - version "4.0.4" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" - integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== - -"@types/keyv@^3.1.4": - version "3.1.4" - resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" - integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== - dependencies: - "@types/node" "*" - "@types/long@^4.0.1": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" @@ -1447,11 +1222,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== -"@types/node@^12.12.6": - version "12.20.55" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - "@types/node@^18.11.9": version "18.19.3" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.3.tgz#e4723c4cb385641d61b983f6fe0b716abd5f8fc0" @@ -1489,13 +1259,6 @@ "@types/node" "*" safe-buffer "~5.1.1" -"@types/responselike@^1.0.0": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.3.tgz#cc29706f0a397cfe6df89debfe4bf5cea159db50" - integrity sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw== - dependencies: - "@types/node" "*" - "@types/secp256k1@^4.0.1": version "4.0.6" resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.6.tgz#d60ba2349a51c2cbc5e816dcd831a42029d376bf" @@ -1503,6 +1266,66 @@ dependencies: "@types/node" "*" +"@web-std/blob@^3.0.3": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@web-std/blob/-/blob-3.0.5.tgz#391e652dd3cc370dbb32c828368a3022b4d55c9c" + integrity sha512-Lm03qr0eT3PoLBuhkvFBLf0EFkAsNz/G/AYCzpOdi483aFaVX86b4iQs0OHhzHJfN5C15q17UtDbyABjlzM96A== + dependencies: + "@web-std/stream" "1.0.0" + web-encoding "1.1.5" + +"@web-std/fetch@^4.1.0": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@web-std/fetch/-/fetch-4.2.1.tgz#692c5545787081217fce3c024708fa8979c21f9c" + integrity sha512-M6sgHDgKegcjuVsq8J6jb/4XvhPGui8uwp3EIoADGXUnBl9vKzKLk9H9iFzrPJ6fSV6zZzFWXPyziBJp9hxzBA== + dependencies: + "@web-std/blob" "^3.0.3" + "@web-std/file" "^3.0.2" + "@web-std/form-data" "^3.0.2" + "@web-std/stream" "^1.0.1" + "@web3-storage/multipart-parser" "^1.0.0" + abort-controller "^3.0.0" + data-uri-to-buffer "^3.0.1" + mrmime "^1.0.0" + +"@web-std/file@^3.0.2": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@web-std/file/-/file-3.0.3.tgz#a29b9164d34155a126d1ab2af5e5867e83c8b098" + integrity sha512-X7YYyvEERBbaDfJeC9lBKC5Q5lIEWYCP1SNftJNwNH/VbFhdHm+3neKOQP+kWEYJmosbDFq+NEUG7+XIvet/Jw== + dependencies: + "@web-std/blob" "^3.0.3" + +"@web-std/form-data@^3.0.2": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@web-std/form-data/-/form-data-3.1.0.tgz#573b40f6296e8bdba31f1bbf2db398f104ef4831" + integrity sha512-WkOrB8rnc2hEK2iVhDl9TFiPMptmxJA1HaIzSdc2/qk3XS4Ny4cCt6/V36U3XmoYKz0Md2YyK2uOZecoZWPAcA== + dependencies: + web-encoding "1.1.5" + +"@web-std/stream@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@web-std/stream/-/stream-1.0.0.tgz#01066f40f536e4329d9b696dc29872f3a14b93c1" + integrity sha512-jyIbdVl+0ZJyKGTV0Ohb9E6UnxP+t7ZzX4Do3AHjZKxUXKMs9EmqnBDQgHF7bEw0EzbQygOjtt/7gvtmi//iCQ== + dependencies: + web-streams-polyfill "^3.1.1" + +"@web-std/stream@^1.0.1": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@web-std/stream/-/stream-1.0.3.tgz#a1df4d4612990d3607f77ad17d0338c7960bbe2e" + integrity sha512-5MIngxWyq4rQiGoDAC2WhjLuDraW8+ff2LD2et4NRY933K3gL8CHlUXrh8ZZ3dC9A9Xaub8c9sl5exOJE58D9Q== + dependencies: + web-streams-polyfill "^3.1.1" + +"@web3-storage/multipart-parser@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@web3-storage/multipart-parser/-/multipart-parser-1.0.0.tgz#6b69dc2a32a5b207ba43e556c25cc136a56659c4" + integrity sha512-BEO6al7BYqcnfX15W2cnGR+Q566ACXAT9UQykORCWW80lmkpWsnEob6zJS1ZVBKsSJC8+7vJkHwlp+lXG1UCdw== + +"@zxing/text-encoding@0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@zxing/text-encoding/-/text-encoding-0.9.0.tgz#fb50ffabc6c7c66a0c96b4c03e3d9be74864b70b" + integrity sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA== + abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -1520,11 +1343,6 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -abortcontroller-polyfill@^1.7.3, abortcontroller-polyfill@^1.7.5: - version "1.7.5" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed" - integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ== - abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" @@ -1538,14 +1356,6 @@ abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: module-error "^1.0.1" queue-microtask "^1.2.3" -accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - acorn-walk@^8.1.1: version "8.3.1" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.1.tgz#2f10f5b69329d90ae18c58bf1fa8fccd8b959a43" @@ -1586,16 +1396,6 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - ajv@^8.0.1: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" @@ -1639,11 +1439,6 @@ ansi-escapes@^4.3.0: dependencies: type-fest "^0.21.3" -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== - ansi-regex@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" @@ -1734,11 +1529,6 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" @@ -1778,18 +1568,6 @@ asap@~2.0.6: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== -asn1@~0.2.3: - version "0.2.6" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" - integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== - assertion-error@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" @@ -1800,11 +1578,6 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - async-retry@^1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/async-retry/-/async-retry-1.3.3.tgz#0e7f36c04d8478e7a58bdbed80cedf977785f280" @@ -1832,16 +1605,6 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA== - -aws4@^1.8.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3" - integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== - axios@^0.21.1, axios@^0.21.2: version "0.21.4" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" @@ -1863,7 +1626,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base-x@^3.0.2, base-x@^3.0.8: +base-x@^3.0.2: version "3.0.9" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320" integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ== @@ -1875,43 +1638,16 @@ base64-js@^1.0.2, base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== - dependencies: - tweetnacl "^0.14.3" - -bech32@1.1.4, bech32@^1.1.3: +bech32@1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== -big-integer@1.6.36: - version "1.6.36" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36" - integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg== - -big.js@^6.0.3: - version "6.2.1" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-6.2.1.tgz#7205ce763efb17c2e41f26f121c420c6a7c2744f" - integrity sha512-bCtHMwL9LeDIozFn+oNhhFoq+yQ3BNdnsLSASUxLciOb1vgvpHsIO1dsENiGMgbb4SkP5TrzWzRiLddn8ahVOQ== - bigint-crypto-utils@^3.0.23: version "3.3.0" resolved "https://registry.yarnpkg.com/bigint-crypto-utils/-/bigint-crypto-utils-3.3.0.tgz#72ad00ae91062cf07f2b1def9594006c279c1d77" integrity sha512-jOTSb+drvEDxEq6OuUybOAv/xxoh3cuYRUIPyu8sSHQNKM303UQ2R1DAo45o1AkcIXw6fzbaFI1+xGGdaXs2lg== -bignumber.js@^7.2.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" - integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== - -bignumber.js@^9.0.0, bignumber.js@^9.0.1: - version "9.1.2" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" - integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -1938,67 +1674,21 @@ blob-to-it@^1.0.1: dependencies: browser-readablestream-to-it "^1.0.3" -bluebird@^3.4.7, bluebird@^3.5.0, bluebird@^3.5.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - bn.js@4.11.6: version "4.11.6" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" integrity sha512-XWwnNNFCuuSQ0m3r3C4LE3EiORltHd9M05pq6FOlVeiophzRbMo50Sbz1ehl8K3Z+jw9+vmgnXefY1hz8X+2wA== -bn.js@^4.11.0, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: +bn.js@^4.11.0, bn.js@^4.11.8, bn.js@^4.11.9: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.1.2, bn.js@^5.1.3, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== -body-parser@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" - integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -body-parser@^1.16.0: - version "1.20.2" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.2.tgz#6feb0e21c4724d06de7ff38da36dad4f57a747fd" - integrity sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA== - dependencies: - bytes "3.1.2" - content-type "~1.0.5" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.2" - type-is "~1.6.18" - unpipe "1.0.0" - -boolbase@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -2058,7 +1748,7 @@ browserify-aes@^1.2.0: inherits "^2.0.1" safe-buffer "^5.0.1" -bs58@^4.0.0, bs58@^4.0.1: +bs58@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw== @@ -2079,11 +1769,6 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer-to-arraybuffer@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" - integrity sha512-3dthu5CYiVB1DEJp61FtApNnNndTckcqe4pFcLdvHtrpG+kcyekCJKg4MRiDcFW7A6AODnXB9U4dwQiCW5kzJQ== - buffer-xor@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" @@ -2098,7 +1783,7 @@ buffer@4.9.2: ieee754 "^1.1.4" isarray "^1.0.0" -buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3: +buffer@^6.0.1, buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA== @@ -2106,49 +1791,11 @@ buffer@6.0.3, buffer@^6.0.1, buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" -buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -bufferutil@^4.0.1: - version "4.0.8" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.8.tgz#1de6a71092d65d7766c4d8a522b261a6e787e8ea" - integrity sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw== - dependencies: - node-gyp-build "^4.3.0" - bytes@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -cacheable-lookup@^5.0.3: - version "5.0.4" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" - integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== - -cacheable-lookup@^6.0.4: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz#0330a543471c61faa4e9035db583aad753b36385" - integrity sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww== - -cacheable-request@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.4.tgz#7a33ebf08613178b403635be7b899d3e69bbe817" - integrity sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^4.0.0" - lowercase-keys "^2.0.0" - normalize-url "^6.0.1" - responselike "^2.0.0" - call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" @@ -2158,24 +1805,6 @@ call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.4, call-bind@^1.0.5: get-intrinsic "^1.2.1" set-function-length "^1.1.1" -camel-case@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" - integrity sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w== - dependencies: - no-case "^2.2.0" - upper-case "^1.1.1" - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg== - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw== - camelcase@^6.0.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" @@ -2196,14 +1825,6 @@ catering@^2.1.0, catering@^2.1.1: resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510" integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w== -cbor@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" - integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== - dependencies: - bignumber.js "^9.0.1" - nofilter "^1.0.4" - cbor@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/cbor/-/cbor-8.1.0.tgz#cfc56437e770b73417a2ecbfc9caf6b771af60d5" @@ -2230,7 +1851,7 @@ chai-as-promised@^7.1.1: dependencies: check-error "^1.0.2" -chai@^4.2.0, chai@^4.3.7: +chai@^4.3.7: version "4.3.10" resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.10.tgz#d784cec635e3b7e2ffb66446a63b4e33bd390384" integrity sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g== @@ -2243,7 +1864,7 @@ chai@^4.2.0, chai@^4.3.7: pathval "^1.1.1" type-detect "^4.0.8" -chalk@^2.3.2, chalk@^2.4.2: +chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2260,30 +1881,6 @@ chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -change-case@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" - integrity sha512-Mww+SLF6MZ0U6kdg11algyKd5BARbyM4TbFBepwowYSR5ClfQGCGtxNXgykpN0uF/bstWeaGDT4JWaDh8zWAHA== - dependencies: - camel-case "^3.0.0" - constant-case "^2.0.0" - dot-case "^2.1.0" - header-case "^1.0.0" - is-lower-case "^1.1.0" - is-upper-case "^1.1.0" - lower-case "^1.1.1" - lower-case-first "^1.0.0" - no-case "^2.3.2" - param-case "^2.1.0" - pascal-case "^2.0.0" - path-case "^2.1.0" - sentence-case "^2.1.0" - snake-case "^2.1.0" - swap-case "^1.1.0" - title-case "^2.1.0" - upper-case "^1.1.1" - upper-case-first "^1.1.0" - "charenc@>= 0.0.1": version "0.0.2" resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" @@ -2296,31 +1893,6 @@ check-error@^1.0.2, check-error@^1.0.3: dependencies: get-func-name "^2.0.2" -cheerio-select@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-2.1.0.tgz#4d8673286b8126ca2a8e42740d5e3c4884ae21b4" - integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== - dependencies: - boolbase "^1.0.0" - css-select "^5.1.0" - css-what "^6.1.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - -cheerio@^1.0.0-rc.2: - version "1.0.0-rc.12" - resolved "https://registry.yarnpkg.com/cheerio/-/cheerio-1.0.0-rc.12.tgz#788bf7466506b1c6bf5fae51d24a2c4d62e47683" - integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== - dependencies: - cheerio-select "^2.1.0" - dom-serializer "^2.0.0" - domhandler "^5.0.3" - domutils "^3.0.1" - htmlparser2 "^8.0.1" - parse5 "^7.0.0" - parse5-htmlparser2-tree-adapter "^7.0.0" - chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -2336,27 +1908,11 @@ chokidar@3.5.3, chokidar@^3.4.0, chokidar@^3.5.2: optionalDependencies: fsevents "~2.3.2" -chownr@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - ci-info@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -cids@^0.7.1: - version "0.7.5" - resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" - integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== - dependencies: - buffer "^5.5.0" - class-is "^1.1.0" - multibase "~0.6.0" - multicodec "^1.0.0" - multihashes "~0.4.15" - cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -2365,11 +1921,6 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" -class-is@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" - integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== - classic-level@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.3.0.tgz#5e36680e01dc6b271775c093f2150844c5edd5c8" @@ -2396,15 +1947,6 @@ cli-table3@^0.5.0: optionalDependencies: colors "^1.1.2" -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w== - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -2414,18 +1956,6 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" -clone-response@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3" - integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== - dependencies: - mimic-response "^1.0.0" - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== - color-convert@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -2455,7 +1985,7 @@ colors@1.4.0, colors@^1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -2512,68 +2042,16 @@ concat-stream@^1.6.0, concat-stream@^1.6.2: readable-stream "^2.2.2" typedarray "^0.0.6" -constant-case@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" - integrity sha512-eS0N9WwmjTqrOmR3o83F5vW8Z+9R1HnVz3xmzT2PMFug9ly+Au/fxRWlEBSb6LcZwspSsEn9Xs1uw9YgzAg1EQ== - dependencies: - snake-case "^2.1.0" - upper-case "^1.1.1" - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.4.tgz#8b82b4efac82512a02bb0b1dcec9d2c5e8eb5bfe" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-hash@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" - integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== - dependencies: - cids "^0.7.1" - multicodec "^0.5.5" - multihashes "^0.4.15" - -content-type@~1.0.4, content-type@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" - integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - cookie@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== -core-util-is@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== - core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cors@^2.8.1: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - crc-32@^1.2.0: version "1.2.2" resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.2.tgz#3cad35a934b8bf71f25ca524b6da51fb7eace2ff" @@ -2614,20 +2092,13 @@ cross-env@^7.0.3: dependencies: cross-spawn "^7.0.1" -cross-fetch@^3.1.4: +cross-fetch@^3.1.5: version "3.1.8" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== dependencies: node-fetch "^2.6.12" -cross-fetch@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" - integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g== - dependencies: - node-fetch "^2.6.12" - cross-spawn@^7.0.0, cross-spawn@^7.0.1: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" @@ -2642,62 +2113,16 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow== -crypto-addr-codec@^0.1.7: - version "0.1.8" - resolved "https://registry.yarnpkg.com/crypto-addr-codec/-/crypto-addr-codec-0.1.8.tgz#45c4b24e2ebce8e24a54536ee0ca25b65787b016" - integrity sha512-GqAK90iLLgP3FvhNmHbpT3wR6dEdaM8hZyZtLX29SPardh3OA13RFLHDR6sntGCgRWOfiHqW6sIyohpNqOtV/g== - dependencies: - base-x "^3.0.8" - big-integer "1.6.36" - blakejs "^1.1.0" - bs58 "^4.0.1" - ripemd160-min "0.0.6" - safe-buffer "^5.2.0" - sha3 "^2.1.1" - -css-select@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" - integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== - dependencies: - boolbase "^1.0.0" - css-what "^6.1.0" - domhandler "^5.0.2" - domutils "^3.0.1" - nth-check "^2.0.1" - -css-what@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== - dependencies: - assert-plus "^1.0.0" +data-uri-to-buffer@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" + integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== death@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/death/-/death-1.1.0.tgz#01aa9c401edd92750514470b8266390c66c67318" integrity sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w== -debug@2.6.9, debug@^2.2.0: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -2705,35 +2130,11 @@ debug@4, debug@4.3.4, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3: dependencies: ms "2.1.2" -decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== - decamelize@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== -decode-uri-component@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9" - integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ== - -decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA== - dependencies: - mimic-response "^1.0.0" - -decompress-response@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" - integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - dependencies: - mimic-response "^3.1.0" - deep-eql@^4.0.1, deep-eql@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.3.tgz#7c7775513092f7df98d8df9996dd085eb668cc6d" @@ -2751,11 +2152,6 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== -defer-to-connect@^2.0.0, defer-to-connect@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" - integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== - define-data-property@^1.0.1, define-data-property@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" @@ -2784,16 +2180,6 @@ depd@2.0.0: resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detect-indent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" - integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== - detect-port@^1.3.0: version "1.5.1" resolved "https://registry.yarnpkg.com/detect-port/-/detect-port-1.5.1.tgz#451ca9b6eaf20451acb0799b8ab40dff7718727b" @@ -2835,55 +2221,6 @@ dns-over-http-resolver@^1.2.3: native-fetch "^3.0.0" receptacle "^1.3.2" -dns-packet@^5.3.0: - version "5.6.1" - resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-5.6.1.tgz#ae888ad425a9d1478a0674256ab866de1012cf2f" - integrity sha512-l4gcSouhcgIKRvyy99RNVOgxXiicE+2jZoNmaNmZ6JXiGajBOJAesk1OBlJuM5k2c+eudGdLxDqXuPCKIj6kpw== - dependencies: - "@leichtgewicht/ip-codec" "^2.0.1" - -dom-serializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-2.0.0.tgz#e41b802e1eedf9f6cae183ce5e622d789d7d8e53" - integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.2" - entities "^4.2.0" - -dom-walk@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" - integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== - -domelementtype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.3.0.tgz#5c45e8e869952626331d7aab326d01daf65d589d" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^5.0.2, domhandler@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-5.0.3.tgz#cc385f7f751f1d1fc650c21374804254538c7d31" - integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== - dependencies: - domelementtype "^2.3.0" - -domutils@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" - integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== - dependencies: - dom-serializer "^2.0.0" - domelementtype "^2.3.0" - domhandler "^5.0.3" - -dot-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" - integrity sha512-HnM6ZlFqcajLsyudHq7LeeLDr2rFAVYtDv/hV5qchQEidSck8j9OPUsXY9KwJv/lHMtYlX4DjRQqwFYa+0r8Ug== - dependencies: - no-case "^2.2.0" - dotenv@^16.3.1: version "16.3.1" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" @@ -2894,19 +2231,6 @@ eastasianwidth@^0.2.0: resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - electron-fetch@^1.7.2: version "1.9.1" resolved "https://registry.yarnpkg.com/electron-fetch/-/electron-fetch-1.9.1.tgz#e28bfe78d467de3f2dec884b1d72b8b05322f30f" @@ -2914,7 +2238,7 @@ electron-fetch@^1.7.2: dependencies: encoding "^0.1.13" -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.4: +elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -2942,11 +2266,6 @@ encode-utf8@^1.0.2: resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" @@ -2954,13 +2273,6 @@ encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - enquirer@^2.3.0, enquirer@^2.3.6: version "2.4.1" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" @@ -2969,11 +2281,6 @@ enquirer@^2.3.0, enquirer@^2.3.6: ansi-colors "^4.1.1" strip-ansi "^6.0.1" -entities@^4.2.0, entities@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" - integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== - env-paths@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" @@ -2984,13 +2291,6 @@ err-code@^3.0.1: resolved "https://registry.yarnpkg.com/err-code/-/err-code-3.0.1.tgz#a444c7b992705f2b120ee320b09972eef331c920" integrity sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA== -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - es-abstract@^1.22.1: version "1.22.3" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32" @@ -3061,47 +2361,11 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.62" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.62.tgz#5e6adc19a6da524bf3d1e02bbc8960e5eb49a9a5" - integrity sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA== - dependencies: - es6-iterator "^2.0.3" - es6-symbol "^3.1.3" - next-tick "^1.1.0" - -es6-iterator@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-promise@^4.2.8: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - -es6-symbol@^3.1.1, es6-symbol@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - escape-string-regexp@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" @@ -3144,19 +2408,6 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.0, eth-ens-namehash@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" - integrity sha512-VWEI1+KJfz4Km//dadyvBBoBeSQ0MHTXPvr8UIXiLW6IanxvAV+DmlZAijZwAyggqGUfwQBeHf7tc9wzc1piSw== - dependencies: - idna-uts46-hx "^2.3.1" - js-sha3 "^0.5.7" - eth-gas-reporter@^0.2.25: version "0.2.27" resolved "https://registry.yarnpkg.com/eth-gas-reporter/-/eth-gas-reporter-0.2.27.tgz#928de8548a674ed64c7ba0bf5795e63079150d4e" @@ -3176,27 +2427,6 @@ eth-gas-reporter@^0.2.25: sha1 "^1.1.1" sync-request "^6.0.0" -eth-lib@0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" - integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@^0.1.26: - version "0.1.29" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" - integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - nano-json-stream-parser "^0.1.2" - servify "^0.1.12" - ws "^3.0.0" - xhr-request-promise "^0.1.2" - ethereum-bloom-filters@^1.0.6: version "1.0.10" resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" @@ -3245,18 +2475,6 @@ ethereum-cryptography@^2.0.0, ethereum-cryptography@^2.1.2: "@scure/bip32" "1.3.1" "@scure/bip39" "1.2.1" -ethereum-ens@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/ethereum-ens/-/ethereum-ens-0.8.0.tgz#6d0f79acaa61fdbc87d2821779c4e550243d4c57" - integrity sha512-a8cBTF4AWw1Q1Y37V1LSCS9pRY4Mh3f8vCg5cbXCCEJ3eno1hbI/+Ccv9SZLISYpqQhaglP3Bxb/34lS4Qf7Bg== - dependencies: - bluebird "^3.4.7" - eth-ens-namehash "^2.0.0" - js-sha3 "^0.5.7" - pako "^1.0.4" - underscore "^1.8.3" - web3 "^1.0.0-beta.34" - ethereumjs-abi@^0.6.8: version "0.6.8" resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" @@ -3278,7 +2496,7 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1: ethjs-util "0.1.6" rlp "^2.2.3" -ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.4, ethereumjs-util@^7.1.5: +ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.4: version "7.1.5" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== @@ -3289,22 +2507,7 @@ ethereumjs-util@^7.0.3, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.1, ethereum ethereum-cryptography "^0.1.3" rlp "^2.2.4" -ethers@^4.0.0-beta.1, ethers@^4.0.32: - version "4.0.49" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.49.tgz#0eb0e9161a0c8b4761be547396bbe2fb121a8894" - integrity sha512-kPltTvWiyu+OktYy1IStSO16i2e7cS9D9OxZ81q2UUaiNPVrm/RTcbxamCXF9VUSKzJIdJV68EAIhTEVBalRWg== - dependencies: - aes-js "3.0.0" - bn.js "^4.11.9" - elliptic "6.5.4" - hash.js "1.1.3" - js-sha3 "0.5.7" - scrypt-js "2.0.4" - setimmediate "1.0.4" - uuid "2.0.1" - xmlhttprequest "1.8.0" - -ethers@^5.0.13, ethers@^5.6.2, ethers@^5.7.0, ethers@^5.7.1, ethers@^5.7.2: +ethers@^5.6.2, ethers@^5.7.0, ethers@^5.7.1, ethers@^5.7.2: version "5.7.2" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== @@ -3361,11 +2564,6 @@ event-target-shim@^5.0.0: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -eventemitter3@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -3374,77 +2572,16 @@ evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -express@^4.14.0: - version "4.18.2" - resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" - integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.1" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.5.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.11.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext@^1.1.2: - version "1.7.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" - integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== - dependencies: - type "^2.7.2" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== - -extsprintf@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" - integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== +extract-files@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" + integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== fast-base64-decode@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fast-base64-decode/-/fast-base64-decode-1.0.0.tgz#b434a0dd7d92b12b43f26819300d2dafb83ee418" integrity sha512-qwaScUgUGBYeDNRnbc/KyllVU88Jk1pRHPStuF/lO7B0/RTRLj7U0lkdTAutlBblY08rwZDff6tNU9cjv6j//Q== -fast-check@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/fast-check/-/fast-check-3.1.1.tgz#72c5ae7022a4e86504762e773adfb8a5b0b01252" - integrity sha512-3vtXinVyuUKCKFKYcwXhGE6NtGWkqF8Yh3rvMZNzmwz8EPrgoc/v4pDdLHyLnCyCI5MZpZZkDEwFyXyEONOxpA== - dependencies: - pure-rand "^5.0.1" - fast-deep-equal@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -3466,11 +2603,6 @@ fast-glob@^3.0.3: merge2 "^1.3.0" micromatch "^4.0.4" -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -3490,19 +2622,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - find-replace@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" @@ -3518,14 +2637,6 @@ find-up@5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA== - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -3565,16 +2676,6 @@ foreground-child@^3.1.0: cross-spawn "^7.0.0" signal-exit "^4.0.1" -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== - -form-data-encoder@1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-1.7.1.tgz#ac80660e4f87ee0d3d3c3638b7da8278ddb8ec96" - integrity sha512-EFRDrsMm/kyqbTQocNvRXMLjc7Es2Vk+IQFx/YW7hkUH1eBl4J1fqiP34l74Yt0pFLCNpc06fkbVk00008mzjg== - form-data@^2.2.0: version "2.5.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" @@ -3584,29 +2685,24 @@ form-data@^2.2.0: combined-stream "^1.0.6" mime-types "^2.1.12" -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== dependencies: asynckit "^0.4.0" combined-stream "^1.0.8" mime-types "^2.1.12" -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== dependencies: asynckit "^0.4.0" - combined-stream "^1.0.6" + combined-stream "^1.0.8" mime-types "^2.1.12" -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - fp-ts@1.19.3: version "1.19.3" resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" @@ -3617,11 +2713,6 @@ fp-ts@^1.0.0: resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - fs-extra@^0.30.0: version "0.30.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" @@ -3642,15 +2733,6 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^7.0.0, fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -3679,13 +2761,6 @@ fs-extra@^9.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-minipass@^1.2.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - fs-readdir-recursive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" @@ -3726,11 +2801,6 @@ functions-have-names@^1.2.3: resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -3761,18 +2831,6 @@ get-port@^3.1.0: resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -get-stream@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - get-symbol-description@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" @@ -3781,13 +2839,6 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== - dependencies: - assert-plus "^1.0.0" - ghost-testrpc@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/ghost-testrpc/-/ghost-testrpc-0.0.2.tgz#c4de9557b1d1ae7b2d20bbe474a91378ca90ce92" @@ -3877,14 +2928,6 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -global@~4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" - integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== - dependencies: - min-document "^2.19.0" - process "^0.11.10" - globalthis@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" @@ -3913,47 +2956,25 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -got@12.1.0: - version "12.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-12.1.0.tgz#099f3815305c682be4fd6b0ee0726d8e4c6b0af4" - integrity sha512-hBv2ty9QN2RdbJJMK3hesmSkFTjVIHyIDDbssCKnSmq62edGgImJWD10Eb1k77TiV1bxloxqcFAVK8+9pkhOig== - dependencies: - "@sindresorhus/is" "^4.6.0" - "@szmarczak/http-timer" "^5.0.1" - "@types/cacheable-request" "^6.0.2" - "@types/responselike" "^1.0.0" - cacheable-lookup "^6.0.4" - cacheable-request "^7.0.2" - decompress-response "^6.0.0" - form-data-encoder "1.7.1" - get-stream "^6.0.1" - http2-wrapper "^2.1.10" - lowercase-keys "^3.0.0" - p-cancelable "^3.0.0" - responselike "^2.0.0" - -got@^11.8.5: - version "11.8.6" - resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" - integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== - dependencies: - "@sindresorhus/is" "^4.0.0" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.2" - decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.2" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +graphql-request@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-4.3.0.tgz#b934e08fcae764aa2cdc697d3c821f046cb5dbf2" + integrity sha512-2v6hQViJvSsifK606AliqiNiijb1uwWp6Re7o0RTyH+uRTv/u7Uqm2g4Fjq/LgZIzARB38RZEvVBFOQOVdlBow== + dependencies: + cross-fetch "^3.1.5" + extract-files "^9.0.0" + form-data "^3.0.0" + +graphql@^16.5.0: + version "16.8.1" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" + integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== + handlebars@^4.0.1: version "4.7.8" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" @@ -3966,19 +2987,6 @@ handlebars@^4.0.1: optionalDependencies: uglify-js "^3.1.4" -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q== - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - hardhat-deploy@^0.11.26: version "0.11.44" resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.44.tgz#a7a771a675a3837ce4c321f2c18d4b6fa1ed03a0" @@ -4125,19 +3133,6 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash-test-vectors@^1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/hash-test-vectors/-/hash-test-vectors-1.3.2.tgz#f050fde1aff46ec28dcf4f70e4e3238cd5000f4c" - integrity sha512-PKd/fitmsrlWGh3OpKbgNLE04ZQZsvs1ZkuLoQpeIKuwx+6CYVNdW6LaPIS1QAdZvV40+skk0w4YomKnViUnvQ== - -hash.js@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" - integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.0" - hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" @@ -4158,29 +3153,11 @@ he@1.2.0: resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -header-case@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" - integrity sha512-i0q9mkOeSuhXw6bGgiQCCBgY/jlZuV/7dZXyZ9c6LcBrqwvT8eT719E9uxE5LiZftdl+z81Ugbg/VvXV4OJOeQ== - dependencies: - no-case "^2.2.0" - upper-case "^1.1.3" - "heap@>= 0.2.0": version "0.2.7" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.7.tgz#1e6adf711d3f27ce35a81fe3b7bd576c2260a8fc" integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== -highlight.js@^10.4.1: - version "10.7.3" - resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" - integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== - -highlightjs-solidity@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-2.0.6.tgz#e7a702a2b05e0a97f185e6ba39fd4846ad23a990" - integrity sha512-DySXWfQghjm2l6a/flF+cteroJqD4gI8GSdL4PtvxZSsAHie8m3yVe2JFoRg03ROKT6hp2Lc/BxXkqerNmtQYg== - hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -4190,21 +3167,6 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hosted-git-info@^2.1.4: - version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - -htmlparser2@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-8.0.2.tgz#f002151705b383e62433b5cf466f5b716edaec21" - integrity sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA== - dependencies: - domelementtype "^2.3.0" - domhandler "^5.0.3" - domutils "^3.0.1" - entities "^4.4.0" - http-basic@^8.1.1: version "8.1.3" resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" @@ -4215,11 +3177,6 @@ http-basic@^8.1.1: http-response-object "^3.0.1" parse-cache-control "^1.0.1" -http-cache-semantics@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" - integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== - http-errors@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" @@ -4231,11 +3188,6 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" -http-https@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" - integrity sha512-o0PWwVCSp3O0wS6FvNr6xfBCHgt0m1tvPLFOCc2iFDKTRAXhB7m8klDf7ErowFH8POa6dVdGatKU5I1YYwzUyg== - http-response-object@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" @@ -4243,31 +3195,6 @@ http-response-object@^3.0.1: dependencies: "@types/node" "^10.0.3" -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ== - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -http2-wrapper@^1.0.0-beta.5.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" - integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.0.0" - -http2-wrapper@^2.1.10: - version "2.2.1" - resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.2.1.tgz#310968153dcdedb160d8b72114363ef5fce1f64a" - integrity sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ== - dependencies: - quick-lru "^5.1.1" - resolve-alpn "^1.2.0" - https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -4290,14 +3217,7 @@ iconv-lite@^0.6.2: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" -idna-uts46-hx@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" - integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== - dependencies: - punycode "2.1.0" - -ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: +ieee754@^1.1.4, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== @@ -4374,11 +3294,6 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ== - io-ts@1.10.4: version "1.10.4" resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" @@ -4391,11 +3306,6 @@ ip-regex@^4.0.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - ipfs-core-types@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/ipfs-core-types/-/ipfs-core-types-0.6.1.tgz#d28318e38578d1f95ef1d97e0e456c235bf2c283" @@ -4503,11 +3413,6 @@ is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: get-intrinsic "^1.2.0" is-typed-array "^1.1.10" -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - is-bigint@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" @@ -4564,13 +3469,6 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== - dependencies: - number-is-nan "^1.0.0" - is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" @@ -4581,11 +3479,6 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-function@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" - integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== - is-generator-function@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" @@ -4612,13 +3505,6 @@ is-ip@^3.1.0: dependencies: ip-regex "^4.0.0" -is-lower-case@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" - integrity sha512-+5A1e/WJpLLXZEDlgz4G//WYSHyQBD32qa4Jd3Lw06qQlv3fJHnp3YIHjTQSGzHMgzmVKz2ZP3rBxTHkPw/lxA== - dependencies: - lower-case "^1.1.0" - is-negative-zero@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" @@ -4677,28 +3563,11 @@ is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.3, is-typed- dependencies: which-typed-array "^1.1.11" -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== - is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== -is-upper-case@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" - integrity sha512-GQYSJMgfeAmVwh9ixyk888l7OIhNAGKtY6QA+IrWlu9MDTCaXmeozOZ2S9Knj7bQwBO/H6J2kb+pbyTUiMNbsw== - dependencies: - upper-case "^1.1.0" - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q== - is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" @@ -4731,7 +3600,7 @@ iso-url@^1.1.5: resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" integrity sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng== -isomorphic-unfetch@^3.0.0: +isomorphic-unfetch@^3.0.0, isomorphic-unfetch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== @@ -4739,11 +3608,6 @@ isomorphic-unfetch@^3.0.0: node-fetch "^2.6.1" unfetch "^4.2.0" -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== - it-all@^1.0.2, it-all@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/it-all/-/it-all-1.0.6.tgz#852557355367606295c4c3b7eff0136f07749335" @@ -4849,11 +3713,6 @@ js-sdsl@^4.1.4: resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.2.tgz#2e3c031b1f47d3aca8b775532e3ebb0818e7f847" integrity sha512-dwXFwByc/ajSV6m5bcKAPwe4yDDF6D614pxmIi5odytzxRlwqF6nwoiCek80Ixc7Cvma5awClxrzFtxCQvcM8w== -js-sha3@0.5.7, js-sha3@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" - integrity sha512-GII20kjaPX0zJ8wzkTbNDYMY7msuZcTWk8S5UOh6806Jq/wz1J8/bnr8uGU0DAUmYDjj2Mr4X1cW8v/GLYnR+g== - js-sha3@0.8.0, js-sha3@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" @@ -4874,36 +3733,11 @@ js-yaml@4.1.0: dependencies: argparse "^2.0.1" -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== - -json-buffer@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" - integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - json-schema-traverse@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== -json-schema@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" - integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== - jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -4932,16 +3766,6 @@ jsonschema@^1.2.4: resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.4.1.tgz#cc4c3f0077fb4542982973d8a083b6b34f482dab" integrity sha512-S6cATIPVv1z0IlxdN+zUk5EPjkGCdnhN4wVSBlvoUO1tOLJootbo9CquNJmbIh4yikWHiUedhRYrNPn1arpEmQ== -jsprim@^1.2.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" - integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.4.0" - verror "1.10.0" - keccak@^3.0.0, keccak@^3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.4.tgz#edc09b89e633c0549da444432ecf062ffadee86d" @@ -4951,13 +3775,6 @@ keccak@^3.0.0, keccak@^3.0.2: node-gyp-build "^4.2.0" readable-stream "^3.6.0" -keyv@^4.0.0: - version "4.5.4" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" - integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== - dependencies: - json-buffer "3.0.1" - kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -4970,13 +3787,6 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw== - dependencies: - invert-kv "^1.0.0" - level-supports@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a" @@ -5006,17 +3816,6 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A== - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -5032,21 +3831,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash.assign@^4.0.3, lodash.assign@^4.0.6: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - integrity sha512-hFuH8TY+Yji7Eja3mGiuAxBqLagejScbG8GbG0j6o9vzn0YL14My+ktnqtZgFTosKymC9/44wP6s7xyuLfnClw== - lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" @@ -5077,28 +3866,6 @@ loupe@^2.3.6: dependencies: get-func-name "^2.0.1" -lower-case-first@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" - integrity sha512-UuxaYakO7XeONbKrZf5FEgkantPf5DUqDayzP5VXZrtRPdH86s4kN47I8B3TW10S4QKiE3ziHNf3kRN//okHjA== - dependencies: - lower-case "^1.1.2" - -lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" - integrity sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -lowercase-keys@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" - integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ== - lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -5152,11 +3919,6 @@ md5.js@^1.3.4: inherits "^2.0.1" safe-buffer "^5.1.2" -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - memory-level@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/memory-level/-/memory-level-1.0.0.tgz#7323c3fd368f9af2f71c3cd76ba403a17ac41692" @@ -5171,11 +3933,6 @@ memorystream@^0.3.1: resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" integrity sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw== -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== - merge-options@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/merge-options/-/merge-options-3.0.4.tgz#84709c2aa2a4b24c1981f66c179fe5565cc6dbb7" @@ -5188,11 +3945,6 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - micro-ftch@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f" @@ -5211,35 +3963,13 @@ mime-db@1.52.0: resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34: +mime-types@^2.1.12: version "2.1.35" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-response@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -mimic-response@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" - integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ== - dependencies: - dom-walk "^0.1.0" - minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -5276,39 +4006,12 @@ minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.7: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minipass@^2.6.0, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - "minipass@^5.0.0 || ^6.0.2 || ^7.0.0": version "7.0.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== -minizlib@^1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha512-Hepn5kb1lJPtVW84RFT40YG1OddBNTOVUZR2bzQUHc+Z03en8/3uX0+060JDhcEzyO08HmipsN9DcnFMxhIL9w== - dependencies: - mkdirp "*" - -mkdirp@*: - version "3.0.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.1.tgz#e44e4c5607fb279c168241713cc6e0fea9adcb50" - integrity sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg== - -mkdirp@0.5.x, mkdirp@^0.5.5: +mkdirp@0.5.x: version "0.5.6" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== @@ -5354,20 +4057,15 @@ mocha@10.2.0, mocha@^10.0.0, mocha@^10.1.0, mocha@^10.2.0: yargs-parser "20.2.4" yargs-unparser "2.0.0" -mock-fs@^4.1.0: - version "4.14.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" - integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== - module-error@^1.0.1, module-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86" integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA== -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== +mrmime@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" + integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== ms@2.1.2: version "2.1.2" @@ -5398,50 +4096,10 @@ multiaddr@^10.0.0: uint8arrays "^3.0.0" varint "^6.0.0" -multibase@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" - integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multibase@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" - integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multicodec@^0.5.5: - version "0.5.7" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" - integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== - dependencies: - varint "^5.0.0" - -multicodec@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" - integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== - dependencies: - buffer "^5.6.0" - varint "^5.0.0" - -multiformats@^9.4.1, multiformats@^9.4.2, multiformats@^9.4.5, multiformats@^9.5.4: - version "9.9.0" - resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" - integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== - -multihashes@^0.4.15, multihashes@~0.4.15: - version "0.4.21" - resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" - integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== - dependencies: - buffer "^5.5.0" - multibase "^0.7.0" - varint "^5.0.0" +multiformats@^9.4.1, multiformats@^9.4.2, multiformats@^9.4.5, multiformats@^9.5.4: + version "9.9.0" + resolved "https://registry.yarnpkg.com/multiformats/-/multiformats-9.9.0.tgz#c68354e7d21037a8f1f8833c8ccd68618e8f1d37" + integrity sha512-HoMUjhH9T8DDBNT+6xzkrd9ga/XiBI4xLr58LJACwK6G3HTOPeMz4nB4KJs33L2BelrIJa7P0VuNaVF3hMYfjg== murmur-128@^0.2.1: version "0.2.1" @@ -5452,16 +4110,6 @@ murmur-128@^0.2.1: fmix "^0.1.0" imul "^1.0.0" -nano-base32@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/nano-base32/-/nano-base32-1.0.1.tgz#ba548c879efcfb90da1c4d9e097db4a46c9255ef" - integrity sha512-sxEtoTqAPdjWVGv71Q17koMFGsOMSiHsIFEvzOM7cNp8BXB4AnEwmDabm5dorusJf/v1z7QxaZYxUorU9RKaAw== - -nano-json-stream-parser@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" - integrity sha512-9MqxMH/BSJC7dnLsEMPyfN5Dvoo49IsPFYMcHw3Bcfc2kN0lpHRBSzlMSVx4HGyJ7s9B31CyBTVehWJoQ8Ctew== - nanoid@3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" @@ -5487,28 +4135,11 @@ native-fetch@^3.0.0: resolved "https://registry.yarnpkg.com/native-fetch/-/native-fetch-3.0.0.tgz#06ccdd70e79e171c365c75117959cf4fe14a09bb" integrity sha512-G3Z7vx0IFb/FQ4JxvtqGABsOTIqRWvgQz6e+erkB+JJD6LrszQtMozEHI4EkmgZQvnGHrpLVzUWk7t4sJCIkVw== -negotiator@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== -next-tick@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" - integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== - -no-case@^2.2.0, no-case@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" - integrity sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ== - dependencies: - lower-case "^1.1.1" - node-addon-api@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" @@ -5537,11 +4168,6 @@ node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.7.1.tgz#cd7d2eb48e594874053150a9418ac85af83ca8f7" integrity sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg== -nofilter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" - integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== - nofilter@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-3.1.0.tgz#c757ba68801d41ff930ba2ec55bab52ca184aa66" @@ -5554,38 +4180,11 @@ nopt@3.x: dependencies: abbrev "1" -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -normalize-url@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" - integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== - number-to-bn@1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" @@ -5594,12 +4193,7 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== @@ -5629,21 +4223,7 @@ obliterator@^2.0.0: resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" integrity sha512-lgHwxlxV1qIg1Eap7LgIeoBWIMFibOjbrYPIPJZcI1mmGAI2m3lNYpK12Y+GBdPQ0U1hRwSord7GIaawz962qQ== -oboe@2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" - integrity sha512-zRFWiF+FoicxEs3jNI/WYUrVEgA7DeET/InK0XQuudGHRg8iIob3cNPrJTKaz4004uaA9Pbe+Dwa8iluhjLZWA== - dependencies: - http-https "^1.0.0" - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@1.x, once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== @@ -5667,28 +4247,11 @@ ordinal@^1.0.3: resolved "https://registry.yarnpkg.com/ordinal/-/ordinal-1.0.3.tgz#1a3c7726a61728112f50944ad7c35c06ae3a0d4d" integrity sha512-cMddMgb2QElm8G7vdaa02jhUNbTSrhsgAGUz1OokD83uJTwSUn+nKoNoKVVaRa08yF6sgfO7Maou1+bgLd9rdQ== -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g== - dependencies: - lcid "^1.0.0" - os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== -p-cancelable@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" - integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== - -p-cancelable@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" - integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== - p-defer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-3.0.0.tgz#d1dceb4ee9b2b604b1d94ffec83760175d4e6f83" @@ -5742,18 +4305,6 @@ p-try@^1.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== -pako@^1.0.4: - version "1.0.11" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -param-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" - integrity sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w== - dependencies: - no-case "^2.2.0" - parse-cache-control@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" @@ -5764,60 +4315,6 @@ parse-duration@^1.0.0: resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-1.1.0.tgz#5192084c5d8f2a3fd676d04a451dbd2e05a1819c" integrity sha512-z6t9dvSJYaPoQq7quMzdEagSFtpGu+utzHqqxmpVWNNZRIXnvqyCvn9XsTdh7c/w0Bqmdz3RB3YnRaKtpRtEXQ== -parse-headers@^2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.5.tgz#069793f9356a54008571eb7f9761153e6c770da9" - integrity sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA== - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ== - dependencies: - error-ex "^1.2.0" - -parse5-htmlparser2-tree-adapter@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1" - integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== - dependencies: - domhandler "^5.0.2" - parse5 "^7.0.0" - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascal-case@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" - integrity sha512-qjS4s8rBOJa2Xm0jmxXiyh1+OFf6ekCWOvUaRgAQSktzlTbMotS0nmG9gyYAybCWBcuP4fsBeRCKNwGBnMe2OQ== - dependencies: - camel-case "^3.0.0" - upper-case-first "^1.1.0" - -path-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" - integrity sha512-Ou0N05MioItesaLr9q8TtHVWmJ6fxWdqKB2RohFmNWVyJ+2zeKIeDNWAN6B/Pe7wpzWChhZX6nONYmOnMeJQ/Q== - dependencies: - no-case "^2.2.0" - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ== - dependencies: - pinkie-promise "^2.0.0" - path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" @@ -5851,20 +4348,6 @@ path-scurry@^1.10.1: lru-cache "^9.1.1 || ^10.0.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg== - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" @@ -5886,38 +4369,16 @@ pbkdf2@^3.0.17: safe-buffer "^5.0.1" sha.js "^2.4.8" -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== - picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog== - pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw== - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg== - prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -5933,11 +4394,6 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== - promise@^8.0.0: version "8.3.0" resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" @@ -5954,6 +4410,11 @@ proper-lockfile@^4.1.1: retry "^0.12.0" signal-exit "^3.0.2" +property-expr@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/property-expr/-/property-expr-2.0.6.tgz#f77bc00d5928a6c748414ad12882e83f24aec1e8" + integrity sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA== + protobufjs@^6.10.2: version "6.11.4" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.4.tgz#29a412c38bf70d89e537b6d02d904a6f448173aa" @@ -5973,54 +4434,16 @@ protobufjs@^6.10.2: "@types/node" ">=13.7.0" long "^4.0.0" -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - proxy-from-env@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== -psl@^1.1.28: - version "1.9.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" - integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - integrity sha512-Yxz2kRwT90aPiWEMHVYnEf4+rhwF1tBmmZ4KepCP+Wkium9JxtWnUm1nqGwpiAHr/tnTSeHqr3wb++jgSkXjhA== - -punycode@^2.1.0, punycode@^2.1.1: +punycode@^2.1.0: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -pure-rand@^5.0.1: - version "5.0.5" - resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-5.0.5.tgz#bda2a7f6a1fc0f284d78d78ca5902f26f2ad35cf" - integrity sha512-BwQpbqxSCBJVpamI6ydzcKqyFmnd5msMWUGvzXLm1aXvusbbgkbOto/EUPM00hjveJEaJtdbhUjKSzWRhQVkaw== - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - qs@^6.4.0, qs@^6.9.4: version "6.11.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9" @@ -6028,30 +4451,11 @@ qs@^6.4.0, qs@^6.9.4: dependencies: side-channel "^1.0.4" -qs@~6.5.2: - version "6.5.3" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad" - integrity sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - queue-microtask@^1.2.2, queue-microtask@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -quick-lru@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" - integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== - randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -6059,22 +4463,7 @@ randombytes@^2.1.0: dependencies: safe-buffer "^5.1.0" -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.1.tgz#fe1b1628b181b700215e5fd42389f98b71392857" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -raw-body@2.5.2, raw-body@^2.4.1: +raw-body@^2.4.1: version "2.5.2" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a" integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA== @@ -6091,23 +4480,6 @@ react-native-fetch-api@^2.0.0: dependencies: p-defer "^3.0.0" -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A== - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ== - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - readable-stream@^2.2.2: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" @@ -6163,11 +4535,6 @@ reduce-flatten@^2.0.0: resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== -regenerator-runtime@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" - integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== - regexp.prototype.flags@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" @@ -6191,57 +4558,16 @@ req-from@^2.0.0: dependencies: resolve-from "^3.0.0" -request@^2.79.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -require-from-string@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" - integrity sha512-H7AkJWMobeskkttHyhTVtS0fxpFLjxhbfMa6Bk3wimP7sdPRGL3EyCg3sAQenFfAe+xQ+oAc85Nmtvq0ROM83Q== - require-from-string@^2.0.0, require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== - -resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" - integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== - resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -6259,7 +4585,7 @@ resolve@1.17.0: dependencies: path-parse "^1.0.6" -resolve@^1.1.6, resolve@^1.10.0: +resolve@^1.1.6: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -6268,13 +4594,6 @@ resolve@^1.1.6, resolve@^1.10.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -responselike@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" - integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== - dependencies: - lowercase-keys "^2.0.0" - retimer@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/retimer/-/retimer-2.0.0.tgz#e8bd68c5e5a8ec2f49ccb5c636db84c04063bbca" @@ -6316,12 +4635,7 @@ rimraf@^5.0.5: dependencies: glob "^10.3.7" -ripemd160-min@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62" - integrity sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A== - -ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: +ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== @@ -6365,7 +4679,7 @@ safe-array-concat@^1.0.1: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -6384,7 +4698,7 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -6409,12 +4723,7 @@ sc-istanbul@^0.4.5: which "^1.1.1" wordwrap "^1.0.0" -scrypt-js@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" - integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== - -scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: +scrypt-js@3.0.1, scrypt-js@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== @@ -6428,7 +4737,7 @@ secp256k1@^4.0.1: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: +semver@^5.5.0: version "5.7.2" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -6438,40 +4747,13 @@ semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.4, semver@^7.5.4: +semver@^7.3.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" -send@0.18.0: - version "0.18.0" - resolved "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -sentence-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" - integrity sha512-ENl7cYHaK/Ktwk5OTD+aDbQ3uC8IByu/6Bkg+HDv8Mm+XnBnppVNalcfJTNsp1ibstKh030/JKQQWglDvtKwEQ== - dependencies: - no-case "^2.2.0" - upper-case-first "^1.1.2" - serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -6479,32 +4761,6 @@ serialize-javascript@6.0.0: dependencies: randombytes "^2.1.0" -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -servify@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" - integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== - dependencies: - body-parser "^1.16.0" - cors "^2.8.1" - express "^4.14.0" - request "^2.79.0" - xhr "^2.3.3" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - set-function-length@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.1.1.tgz#4bc39fafb0307224a33e106a7d35ca1218d659ed" @@ -6524,11 +4780,6 @@ set-function-name@^2.0.0: functions-have-names "^1.2.3" has-property-descriptors "^1.0.0" -setimmediate@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" - integrity sha512-/TjEmXQVEzdod/FFskf3o7oOAsGhHf2j1dZqRFbDzq4F3mvvxflIIi4Hd3bLQE9y/CpwqfSQam5JakI/mi3Pog== - setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -6555,13 +4806,6 @@ sha1@^1.1.1: charenc ">= 0.0.1" crypt ">= 0.0.1" -sha3@^2.1.1: - version "2.1.4" - resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.4.tgz#000fac0fe7c2feac1f48a25e7a31b52a6492cc8f" - integrity sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg== - dependencies: - buffer "6.0.3" - shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -6602,20 +4846,6 @@ signal-exit@^4.0.1: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^2.7.0: - version "2.8.2" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.2.tgz#5708fb0919d440657326cd5fe7d2599d07705019" - integrity sha512-Ijd/rV5o+mSBBs4F/x9oDPtTx9Zb6X9brmnXvMW4J7IR15ngi9q5xxqWBKU744jTZiaXtxaPL7uHG6vtN8kUkw== - dependencies: - decompress-response "^3.3.0" - once "^1.3.1" - simple-concat "^1.0.0" - slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -6630,13 +4860,6 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -snake-case@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" - integrity sha512-FMR5YoPFwOLuh4rRz92dywJjyKYZNLpMn1R5ujVpIYkbA9p01fq8RMg0FkO4M+Yobt4MjHeLTJVm5xFFBHSV2Q== - dependencies: - no-case "^2.2.0" - solc@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" @@ -6652,17 +4875,6 @@ solc@0.7.3: semver "^5.5.0" tmp "0.0.33" -solc@^0.4.20: - version "0.4.26" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" - integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== - dependencies: - fs-extra "^0.30.0" - memorystream "^0.3.1" - require-from-string "^1.1.0" - semver "^5.3.0" - yargs "^4.7.1" - solidity-ast@^0.4.51: version "0.4.55" resolved "https://registry.yarnpkg.com/solidity-ast/-/solidity-ast-0.4.55.tgz#00b685e6eefb2e8dfb67df1fe0afbe3b3bfb4b28" @@ -6696,7 +4908,7 @@ solidity-coverage@^0.8.2: shelljs "^0.8.3" web3-utils "^1.3.6" -source-map-support@^0.5.13, source-map-support@^0.5.19: +source-map-support@^0.5.13: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -6716,52 +4928,11 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" -spdx-correct@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" - integrity sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.16" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz#a14f64e0954f6e25cc6587bd4f392522db0d998f" - integrity sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw== - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -sshpk@^1.7.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.18.0.tgz#1663e55cddf4d688b86a46b77f0d5fe363aba028" - integrity sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - stacktrace-parser@^0.1.10: version "0.1.10" resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" @@ -6781,11 +4952,6 @@ stream-to-it@^0.2.2: dependencies: get-iterator "^1.0.2" -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha512-R3f198pcvnB+5IpnBlRkphuE9n46WyVl8I39W/ZUTZLz4nqSP/oLYUrcnJrw462Ds8he4YKMov2efsTIw1BDGQ== - string-format@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-format/-/string-format-2.0.0.tgz#f2df2e7097440d3b65de31b6d40d54c96eaffb9b" @@ -6800,15 +4966,6 @@ string-format@^2.0.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" @@ -6874,13 +5031,6 @@ string_decoder@~1.1.1: dependencies: ansi-regex "^5.0.1" -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== - dependencies: - ansi-regex "^2.0.0" - strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" @@ -6895,13 +5045,6 @@ strip-ansi@^7.0.1: dependencies: ansi-regex "^6.0.1" -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g== - dependencies: - is-utf8 "^0.2.0" - strip-hex-prefix@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" @@ -6909,11 +5052,6 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" -strip-indent@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" - integrity sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA== - strip-json-comments@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -6952,31 +5090,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -swap-case@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" - integrity sha512-BAmWG6/bx8syfc6qXPprof3Mn5vQgf5dwdUNJhsNqU9WdPt5P+ES/wQ5bxfijy8zwZgZZHslC3iAsxsuQMCzJQ== - dependencies: - lower-case "^1.1.1" - upper-case "^1.1.1" - -swarm-js@^0.1.40: - version "0.1.42" - resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.42.tgz#497995c62df6696f6e22372f457120e43e727979" - integrity sha512-BV7c/dVlA3R6ya1lMlSSNPLYrntt0LUq4YMgy3iwpCIc6rZnS5W2wUoctarZ5pXlpKtxDDf9hNziEkcfrxdhqQ== - dependencies: - bluebird "^3.5.0" - buffer "^5.0.5" - eth-lib "^0.1.26" - fs-extra "^4.0.2" - got "^11.8.5" - mime-types "^2.1.16" - mkdirp-promise "^5.0.1" - mock-fs "^4.1.0" - setimmediate "^1.0.5" - tar "^4.0.2" - xhr-request "^1.0.1" - sync-request@^6.0.0: version "6.1.0" resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" @@ -7014,24 +5127,6 @@ table@^6.8.0: string-width "^4.2.3" strip-ansi "^6.0.1" -tar@^4.0.2: - version "4.4.19" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.19.tgz#2e4d7263df26f2b914dee10c825ab132123742f3" - integrity sha512-a20gEsvHnWe0ygBY8JbxoM4w3SJdhc7ZAuxkLqh+nvNQN2IOt0B5lLgM490X5Hl8FF0dl0tOf2ewFYAlIFgzVA== - dependencies: - chownr "^1.1.4" - fs-minipass "^1.2.7" - minipass "^2.9.0" - minizlib "^1.3.3" - mkdirp "^0.5.5" - safe-buffer "^5.2.1" - yallist "^3.1.1" - -testrpc@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" - integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== - then-request@^6.0.0: version "6.0.2" resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" @@ -7049,11 +5144,6 @@ then-request@^6.0.0: promise "^8.0.0" qs "^6.4.0" -timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== - timeout-abort-controller@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/timeout-abort-controller/-/timeout-abort-controller-1.1.1.tgz#2c3c3c66f13c783237987673c276cbd7a9762f29" @@ -7062,13 +5152,10 @@ timeout-abort-controller@^1.1.1: abort-controller "^3.0.0" retimer "^2.0.0" -title-case@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" - integrity sha512-EkJoZ2O3zdCz3zJsYCsxyq2OC5hrxR9mfdd5I+w8h/tmFfeOxJ+vvkxsKxdmN0WtS9zLdHEgfgVOiMVgv+Po4Q== - dependencies: - no-case "^2.2.0" - upper-case "^1.0.3" +tiny-case@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tiny-case/-/tiny-case-1.0.3.tgz#d980d66bc72b5d5a9ca86fb7c9ffdb9c898ddd03" + integrity sha512-Eet/eeMhkO6TX8mnUteS9zgPbUMQa4I6Kkp5ORiBD5476/m+PIRiumP5tmh5ioJpH7k51Kehawy2UDfsnxxY8Q== tmp-promise@^3.0.3: version "3.0.3" @@ -7103,13 +5190,10 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" +toposort@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330" + integrity sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg== tr46@~0.0.3: version "0.0.3" @@ -7155,7 +5239,7 @@ tslib@^1.11.1, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.3.1, tslib@^2.5.0: +tslib@^2.3.1, tslib@^2.5.0, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -7165,23 +5249,11 @@ tsort@0.0.1: resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" integrity sha512-Tyrf5mxF8Ofs1tNoxA13lFeZ2Zrbd6cKbuH3V+MQ5sb6DtBj5FjrXVsRWT8YvNAQTqNoz66dz1WsbigI22aEnw== -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== - dependencies: - safe-buffer "^5.0.1" - tweetnacl-util@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== - tweetnacl@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" @@ -7209,23 +5281,10 @@ type-fest@^0.7.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -type@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" - integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== +type-fest@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" + integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== typechain@^8.3.2: version "8.3.2" @@ -7282,13 +5341,6 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -7328,11 +5380,6 @@ uint8arrays@^3.0.0: dependencies: multiformats "^9.4.2" -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - unbox-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" @@ -7343,11 +5390,6 @@ unbox-primitive@^1.0.2: has-symbols "^1.0.3" which-boxed-primitive "^1.0.2" -underscore@^1.8.3: - version "1.13.6" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441" - integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A== - undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" @@ -7375,23 +5417,11 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== -unpipe@1.0.0, unpipe@~1.0.0: +unpipe@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -upper-case-first@^1.1.0, upper-case-first@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" - integrity sha512-wINKYvI3Db8dtjikdAqoBbZoP6Q+PZUyfMR7pmwHzjC2quzSkUq5DmPrTtPEqHaz8AGtmsB4TqwapMTM1QAQOQ== - dependencies: - upper-case "^1.1.1" - -upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" - integrity sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA== - uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -7399,19 +5429,7 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" -url-set-query@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" - integrity sha512-3AChu4NiXquPfeckE5R5cGdiHCMWJx1dwCWOmWIL4KHAziJNOFIYJlpGFeKDvwLPHovZRCxK3cYlwzqI9Vp+Gg== - -utf-8-validate@^5.0.2: - version "5.0.10" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.10.tgz#d7d10ea39318171ca982718b6b96a8d2442571a2" - integrity sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ== - dependencies: - node-gyp-build "^4.3.0" - -utf8@3.0.0, utf8@^3.0.0: +utf8@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== @@ -7421,7 +5439,7 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== -util@^0.12.5: +util@^0.12.3: version "0.12.5" resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== @@ -7432,488 +5450,36 @@ util@^0.12.5: is-typed-array "^1.1.3" which-typed-array "^1.1.2" -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" - integrity sha512-nWg9+Oa3qD2CQzHIP4qKUqwNfzKn8P0LtFhotaCTFchsV7ZfDhAybeip/HZVeMIpZi9JgY1E3nUlwaCmZT1sEg== - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" - integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== - v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -varint@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" - integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== - varint@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/varint/-/varint-6.0.0.tgz#9881eb0ce8feaea6512439d19ddf84bf551661d0" integrity sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg== -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -web3-bzz@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.10.0.tgz#ac74bc71cdf294c7080a79091079192f05c5baed" - integrity sha512-o9IR59io3pDUsXTsps5pO5hW1D5zBmg46iNc2t4j2DkaYHNdDLwk2IP9ukoM2wg47QILfPEJYzhTfkS/CcX0KA== - dependencies: - "@types/node" "^12.12.6" - got "12.1.0" - swarm-js "^0.1.40" - -web3-bzz@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.10.3.tgz#13942b37757eb850f3500a8e08bf605448b67566" - integrity sha512-XDIRsTwekdBXtFytMpHBuun4cK4x0ZMIDXSoo1UVYp+oMyZj07c7gf7tNQY5qZ/sN+CJIas4ilhN25VJcjSijQ== - dependencies: - "@types/node" "^12.12.6" - got "12.1.0" - swarm-js "^0.1.40" - -web3-core-helpers@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.10.0.tgz#1016534c51a5df77ed4f94d1fcce31de4af37fad" - integrity sha512-pIxAzFDS5vnbXvfvLSpaA1tfRykAe9adw43YCKsEYQwH0gCLL0kMLkaCX3q+Q8EVmAh+e1jWL/nl9U0de1+++g== - dependencies: - web3-eth-iban "1.10.0" - web3-utils "1.10.0" - -web3-core-helpers@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.10.3.tgz#f2db40ea57e888795e46f229b06113b60bcd671c" - integrity sha512-Yv7dQC3B9ipOc5sWm3VAz1ys70Izfzb8n9rSiQYIPjpqtJM+3V4EeK6ghzNR6CO2es0+Yu9CtCkw0h8gQhrTxA== - dependencies: - web3-eth-iban "1.10.3" - web3-utils "1.10.3" - -web3-core-method@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.10.0.tgz#82668197fa086e8cc8066742e35a9d72535e3412" - integrity sha512-4R700jTLAMKDMhQ+nsVfIXvH6IGJlJzGisIfMKWAIswH31h5AZz7uDUW2YctI+HrYd+5uOAlS4OJeeT9bIpvkA== - dependencies: - "@ethersproject/transactions" "^5.6.2" - web3-core-helpers "1.10.0" - web3-core-promievent "1.10.0" - web3-core-subscriptions "1.10.0" - web3-utils "1.10.0" - -web3-core-method@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.10.3.tgz#63f16310ccab4eec8eca0a337d534565c2ba8d33" - integrity sha512-VZ/Dmml4NBmb0ep5PTSg9oqKoBtG0/YoMPei/bq/tUdlhB2dMB79sbeJPwx592uaV0Vpk7VltrrrBv5hTM1y4Q== - dependencies: - "@ethersproject/transactions" "^5.6.2" - web3-core-helpers "1.10.3" - web3-core-promievent "1.10.3" - web3-core-subscriptions "1.10.3" - web3-utils "1.10.3" - -web3-core-promievent@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.10.0.tgz#cbb5b3a76b888df45ed3a8d4d8d4f54ccb66a37b" - integrity sha512-68N7k5LWL5R38xRaKFrTFT2pm2jBNFaM4GioS00YjAKXRQ3KjmhijOMG3TICz6Aa5+6GDWYelDNx21YAeZ4YTg== - dependencies: - eventemitter3 "4.0.4" - -web3-core-promievent@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.10.3.tgz#9765dd42ce6cf2dc0a08eaffee607b855644f290" - integrity sha512-HgjY+TkuLm5uTwUtaAfkTgRx/NzMxvVradCi02gy17NxDVdg/p6svBHcp037vcNpkuGeFznFJgULP+s2hdVgUQ== - dependencies: - eventemitter3 "4.0.4" - -web3-core-requestmanager@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.10.0.tgz#4b34f6e05837e67c70ff6f6993652afc0d54c340" - integrity sha512-3z/JKE++Os62APml4dvBM+GAuId4h3L9ckUrj7ebEtS2AR0ixyQPbrBodgL91Sv7j7cQ3Y+hllaluqjguxvSaQ== - dependencies: - util "^0.12.5" - web3-core-helpers "1.10.0" - web3-providers-http "1.10.0" - web3-providers-ipc "1.10.0" - web3-providers-ws "1.10.0" - -web3-core-requestmanager@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.10.3.tgz#c34ca8e998a18d6ca3fa7f7a11d4391da401c987" - integrity sha512-VT9sKJfgM2yBOIxOXeXiDuFMP4pxzF6FT+y8KTLqhDFHkbG3XRe42Vm97mB/IvLQCJOmokEjl3ps8yP1kbggyw== - dependencies: - util "^0.12.5" - web3-core-helpers "1.10.3" - web3-providers-http "1.10.3" - web3-providers-ipc "1.10.3" - web3-providers-ws "1.10.3" - -web3-core-subscriptions@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.10.0.tgz#b534592ee1611788fc0cb0b95963b9b9b6eacb7c" - integrity sha512-HGm1PbDqsxejI075gxBc5OSkwymilRWZufIy9zEpnWKNmfbuv5FfHgW1/chtJP6aP3Uq2vHkvTDl3smQBb8l+g== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.10.0" - -web3-core-subscriptions@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.10.3.tgz#58768cd72a9313252ef05dc52c09536f009a9479" - integrity sha512-KW0Mc8sgn70WadZu7RjQ4H5sNDJ5Lx8JMI3BWos+f2rW0foegOCyWhRu33W1s6ntXnqeBUw5rRCXZRlA3z+HNA== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.10.3" - -web3-core@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.10.0.tgz#9aa07c5deb478cf356c5d3b5b35afafa5fa8e633" - integrity sha512-fWySwqy2hn3TL89w5TM8wXF1Z2Q6frQTKHWmP0ppRQorEK8NcHJRfeMiv/mQlSKoTS1F6n/nv2uyZsixFycjYQ== - dependencies: - "@types/bn.js" "^5.1.1" - "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.10.0" - web3-core-method "1.10.0" - web3-core-requestmanager "1.10.0" - web3-utils "1.10.0" - -web3-core@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.10.3.tgz#4aeb8f4b0cb5775d9fa4edf1127864743f1c3ae3" - integrity sha512-Vbk0/vUNZxJlz3RFjAhNNt7qTpX8yE3dn3uFxfX5OHbuon5u65YEOd3civ/aQNW745N0vGUlHFNxxmn+sG9DIw== - dependencies: - "@types/bn.js" "^5.1.1" - "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.10.3" - web3-core-method "1.10.3" - web3-core-requestmanager "1.10.3" - web3-utils "1.10.3" - -web3-eth-abi@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.10.0.tgz#53a7a2c95a571e205e27fd9e664df4919483cce1" - integrity sha512-cwS+qRBWpJ43aI9L3JS88QYPfFcSJJ3XapxOQ4j40v6mk7ATpA8CVK1vGTzpihNlOfMVRBkR95oAj7oL6aiDOg== - dependencies: - "@ethersproject/abi" "^5.6.3" - web3-utils "1.10.0" - -web3-eth-abi@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.10.3.tgz#7decfffa8fed26410f32cfefdc32d3e76f717ca2" - integrity sha512-O8EvV67uhq0OiCMekqYsDtb6FzfYzMXT7VMHowF8HV6qLZXCGTdB/NH4nJrEh2mFtEwVdS6AmLFJAQd2kVyoMQ== - dependencies: - "@ethersproject/abi" "^5.6.3" - web3-utils "1.10.3" - -web3-eth-accounts@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.10.0.tgz#2942beca0a4291455f32cf09de10457a19a48117" - integrity sha512-wiq39Uc3mOI8rw24wE2n15hboLE0E9BsQLdlmsL4Zua9diDS6B5abXG0XhFcoNsXIGMWXVZz4TOq3u4EdpXF/Q== - dependencies: - "@ethereumjs/common" "2.5.0" - "@ethereumjs/tx" "3.3.2" - eth-lib "0.2.8" - ethereumjs-util "^7.1.5" - scrypt-js "^3.0.1" - uuid "^9.0.0" - web3-core "1.10.0" - web3-core-helpers "1.10.0" - web3-core-method "1.10.0" - web3-utils "1.10.0" - -web3-eth-accounts@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.10.3.tgz#9ecb816b81cd97333988bfcd0afaee5d13bbb198" - integrity sha512-8MipGgwusDVgn7NwKOmpeo3gxzzd+SmwcWeBdpXknuyDiZSQy9tXe+E9LeFGrmys/8mLLYP79n3jSbiTyv+6pQ== - dependencies: - "@ethereumjs/common" "2.6.5" - "@ethereumjs/tx" "3.5.2" - "@ethereumjs/util" "^8.1.0" - eth-lib "0.2.8" - scrypt-js "^3.0.1" - uuid "^9.0.0" - web3-core "1.10.3" - web3-core-helpers "1.10.3" - web3-core-method "1.10.3" - web3-utils "1.10.3" - -web3-eth-contract@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.10.0.tgz#8e68c7654576773ec3c91903f08e49d0242c503a" - integrity sha512-MIC5FOzP/+2evDksQQ/dpcXhSqa/2hFNytdl/x61IeWxhh6vlFeSjq0YVTAyIzdjwnL7nEmZpjfI6y6/Ufhy7w== - dependencies: - "@types/bn.js" "^5.1.1" - web3-core "1.10.0" - web3-core-helpers "1.10.0" - web3-core-method "1.10.0" - web3-core-promievent "1.10.0" - web3-core-subscriptions "1.10.0" - web3-eth-abi "1.10.0" - web3-utils "1.10.0" - -web3-eth-contract@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.10.3.tgz#8880468e2ba7d8a4791cf714f67d5e1ec1591275" - integrity sha512-Y2CW61dCCyY4IoUMD4JsEQWrILX4FJWDWC/Txx/pr3K/+fGsBGvS9kWQN5EsVXOp4g7HoFOfVh9Lf7BmVVSRmg== - dependencies: - "@types/bn.js" "^5.1.1" - web3-core "1.10.3" - web3-core-helpers "1.10.3" - web3-core-method "1.10.3" - web3-core-promievent "1.10.3" - web3-core-subscriptions "1.10.3" - web3-eth-abi "1.10.3" - web3-utils "1.10.3" - -web3-eth-ens@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.10.0.tgz#96a676524e0b580c87913f557a13ed810cf91cd9" - integrity sha512-3hpGgzX3qjgxNAmqdrC2YUQMTfnZbs4GeLEmy8aCWziVwogbuqQZ+Gzdfrym45eOZodk+lmXyLuAdqkNlvkc1g== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - web3-core "1.10.0" - web3-core-helpers "1.10.0" - web3-core-promievent "1.10.0" - web3-eth-abi "1.10.0" - web3-eth-contract "1.10.0" - web3-utils "1.10.0" - -web3-eth-ens@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.10.3.tgz#ae5b49bcb9823027e0b28aa6b1de58d726cbaafa" - integrity sha512-hR+odRDXGqKemw1GFniKBEXpjYwLgttTES+bc7BfTeoUyUZXbyDHe5ifC+h+vpzxh4oS0TnfcIoarK0Z9tFSiQ== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - web3-core "1.10.3" - web3-core-helpers "1.10.3" - web3-core-promievent "1.10.3" - web3-eth-abi "1.10.3" - web3-eth-contract "1.10.3" - web3-utils "1.10.3" - -web3-eth-iban@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.10.0.tgz#5a46646401965b0f09a4f58e7248c8a8cd22538a" - integrity sha512-0l+SP3IGhInw7Q20LY3IVafYEuufo4Dn75jAHT7c2aDJsIolvf2Lc6ugHkBajlwUneGfbRQs/ccYPQ9JeMUbrg== - dependencies: - bn.js "^5.2.1" - web3-utils "1.10.0" - -web3-eth-iban@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.10.3.tgz#91d458e5400195edc883a0d4383bf1cecd17240d" - integrity sha512-ZCfOjYKAjaX2TGI8uif5ah+J3BYFuo+47JOIV1RIz2l7kD9VfnxvRH5UiQDRyMALQC7KFd2hUqIEtHklapNyKA== - dependencies: - bn.js "^5.2.1" - web3-utils "1.10.3" - -web3-eth-personal@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.10.0.tgz#94d525f7a29050a0c2a12032df150ac5ea633071" - integrity sha512-anseKn98w/d703eWq52uNuZi7GhQeVjTC5/svrBWEKob0WZ5kPdo+EZoFN0sp5a5ubbrk/E0xSl1/M5yORMtpg== - dependencies: - "@types/node" "^12.12.6" - web3-core "1.10.0" - web3-core-helpers "1.10.0" - web3-core-method "1.10.0" - web3-net "1.10.0" - web3-utils "1.10.0" - -web3-eth-personal@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.10.3.tgz#4e72008aa211327ccc3bfa7671c510e623368457" - integrity sha512-avrQ6yWdADIvuNQcFZXmGLCEzulQa76hUOuVywN7O3cklB4nFc/Gp3yTvD3bOAaE7DhjLQfhUTCzXL7WMxVTsw== - dependencies: - "@types/node" "^12.12.6" - web3-core "1.10.3" - web3-core-helpers "1.10.3" - web3-core-method "1.10.3" - web3-net "1.10.3" - web3-utils "1.10.3" - -web3-eth@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.10.0.tgz#38b905e2759697c9624ab080cfcf4e6c60b3a6cf" - integrity sha512-Z5vT6slNMLPKuwRyKGbqeGYC87OAy8bOblaqRTgg94CXcn/mmqU7iPIlG4506YdcdK3x6cfEDG7B6w+jRxypKA== - dependencies: - web3-core "1.10.0" - web3-core-helpers "1.10.0" - web3-core-method "1.10.0" - web3-core-subscriptions "1.10.0" - web3-eth-abi "1.10.0" - web3-eth-accounts "1.10.0" - web3-eth-contract "1.10.0" - web3-eth-ens "1.10.0" - web3-eth-iban "1.10.0" - web3-eth-personal "1.10.0" - web3-net "1.10.0" - web3-utils "1.10.0" - -web3-eth@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.10.3.tgz#b8c6f37f1aac52422583a5a9c29130983a3fb3b1" - integrity sha512-Uk1U2qGiif2mIG8iKu23/EQJ2ksB1BQXy3wF3RvFuyxt8Ft9OEpmGlO7wOtAyJdoKzD5vcul19bJpPcWSAYZhA== - dependencies: - web3-core "1.10.3" - web3-core-helpers "1.10.3" - web3-core-method "1.10.3" - web3-core-subscriptions "1.10.3" - web3-eth-abi "1.10.3" - web3-eth-accounts "1.10.3" - web3-eth-contract "1.10.3" - web3-eth-ens "1.10.3" - web3-eth-iban "1.10.3" - web3-eth-personal "1.10.3" - web3-net "1.10.3" - web3-utils "1.10.3" - -web3-net@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.10.0.tgz#be53e7f5dafd55e7c9013d49c505448b92c9c97b" - integrity sha512-NLH/N3IshYWASpxk4/18Ge6n60GEvWBVeM8inx2dmZJVmRI6SJIlUxbL8jySgiTn3MMZlhbdvrGo8fpUW7a1GA== - dependencies: - web3-core "1.10.0" - web3-core-method "1.10.0" - web3-utils "1.10.0" - -web3-net@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.10.3.tgz#9486c2fe51452cb958e11915db6f90bd6caa5482" - integrity sha512-IoSr33235qVoI1vtKssPUigJU9Fc/Ph0T9CgRi15sx+itysmvtlmXMNoyd6Xrgm9LuM4CIhxz7yDzH93B79IFg== - dependencies: - web3-core "1.10.3" - web3-core-method "1.10.3" - web3-utils "1.10.3" - -web3-providers-http@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.10.0.tgz#864fa48675e7918c9a4374e5f664b32c09d0151b" - integrity sha512-eNr965YB8a9mLiNrkjAWNAPXgmQWfpBfkkn7tpEFlghfww0u3I0tktMZiaToJVcL2+Xq+81cxbkpeWJ5XQDwOA== - dependencies: - abortcontroller-polyfill "^1.7.3" - cross-fetch "^3.1.4" - es6-promise "^4.2.8" - web3-core-helpers "1.10.0" - -web3-providers-http@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.10.3.tgz#d8166ee89db82d37281ea9e15c5882a2d7928755" - integrity sha512-6dAgsHR3MxJ0Qyu3QLFlQEelTapVfWNTu5F45FYh8t7Y03T1/o+YAkVxsbY5AdmD+y5bXG/XPJ4q8tjL6MgZHw== - dependencies: - abortcontroller-polyfill "^1.7.5" - cross-fetch "^4.0.0" - es6-promise "^4.2.8" - web3-core-helpers "1.10.3" - -web3-providers-ipc@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.10.0.tgz#9747c7a6aee96a51488e32fa7c636c3460b39889" - integrity sha512-OfXG1aWN8L1OUqppshzq8YISkWrYHaATW9H8eh0p89TlWMc1KZOL9vttBuaBEi96D/n0eYDn2trzt22bqHWfXA== - dependencies: - oboe "2.1.5" - web3-core-helpers "1.10.0" - -web3-providers-ipc@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.10.3.tgz#a7e015957fc037d8a87bd4b6ae3561c1b1ad1f46" - integrity sha512-vP5WIGT8FLnGRfswTxNs9rMfS1vCbMezj/zHbBe/zB9GauBRTYVrUo2H/hVrhLg8Ut7AbsKZ+tCJ4mAwpKi2hA== - dependencies: - oboe "2.1.5" - web3-core-helpers "1.10.3" - -web3-providers-ws@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.10.0.tgz#cb0b87b94c4df965cdf486af3a8cd26daf3975e5" - integrity sha512-sK0fNcglW36yD5xjnjtSGBnEtf59cbw4vZzJ+CmOWIKGIR96mP5l684g0WD0Eo+f4NQc2anWWXG74lRc9OVMCQ== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.10.0" - websocket "^1.0.32" - -web3-providers-ws@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.10.3.tgz#03c84958f9da251349cd26fd7a4ae567e3af6caa" - integrity sha512-/filBXRl48INxsh6AuCcsy4v5ndnTZ/p6bl67kmO9aK1wffv7CT++DrtclDtVMeDGCgB3van+hEf9xTAVXur7Q== - dependencies: - eventemitter3 "4.0.4" - web3-core-helpers "1.10.3" - websocket "^1.0.32" - -web3-shh@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.10.0.tgz#c2979b87e0f67a7fef2ce9ee853bd7bfbe9b79a8" - integrity sha512-uNUUuNsO2AjX41GJARV9zJibs11eq6HtOe6Wr0FtRUcj8SN6nHeYIzwstAvJ4fXA53gRqFMTxdntHEt9aXVjpg== - dependencies: - web3-core "1.10.0" - web3-core-method "1.10.0" - web3-core-subscriptions "1.10.0" - web3-net "1.10.0" - -web3-shh@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.10.3.tgz#ee44f760598a65a290d611c443838aac854ee858" - integrity sha512-cAZ60CPvs9azdwMSQ/PSUdyV4PEtaW5edAZhu3rCXf6XxQRliBboic+AvwUvB6j3eswY50VGa5FygfVmJ1JVng== +web-encoding@1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/web-encoding/-/web-encoding-1.1.5.tgz#fc810cf7667364a6335c939913f5051d3e0c4864" + integrity sha512-HYLeVCdJ0+lBYV2FvNZmv3HJ2Nt0QYXqZojk3d9FJOLkwnuhzM9tmamh8d7HPM8QqjKH8DeHkFTx+CFlWpZZDA== dependencies: - web3-core "1.10.3" - web3-core-method "1.10.3" - web3-core-subscriptions "1.10.3" - web3-net "1.10.3" + util "^0.12.3" + optionalDependencies: + "@zxing/text-encoding" "0.9.0" -web3-utils@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.0.tgz#ca4c1b431a765c14ac7f773e92e0fd9377ccf578" - integrity sha512-kSaCM0uMcZTNUSmn5vMEhlo02RObGNRRCkdX0V9UTAU0+lrvn0HSaudyCo6CQzuXUsnuY2ERJGCGPfeWmv19Rg== - dependencies: - bn.js "^5.2.1" - ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - utf8 "3.0.0" +web-streams-polyfill@^3.1.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz#32e26522e05128203a7de59519be3c648004343b" + integrity sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ== -web3-utils@1.10.3, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.6: +web3-utils@^1.3.6: version "1.10.3" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.3.tgz#f1db99c82549c7d9f8348f04ffe4e0188b449714" integrity sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ== @@ -7927,49 +5493,11 @@ web3-utils@1.10.3, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.6: randombytes "^2.1.0" utf8 "3.0.0" -web3@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.10.0.tgz#2fde0009f59aa756c93e07ea2a7f3ab971091274" - integrity sha512-YfKY9wSkGcM8seO+daR89oVTcbu18NsVfvOngzqMYGUU0pPSQmE57qQDvQzUeoIOHAnXEBNzrhjQJmm8ER0rng== - dependencies: - web3-bzz "1.10.0" - web3-core "1.10.0" - web3-eth "1.10.0" - web3-eth-personal "1.10.0" - web3-net "1.10.0" - web3-shh "1.10.0" - web3-utils "1.10.0" - -web3@^1.0.0-beta.34: - version "1.10.3" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.10.3.tgz#5e80ac532dc432b09fde668d570b0ad4e6710897" - integrity sha512-DgUdOOqC/gTqW+VQl1EdPxrVRPB66xVNtuZ5KD4adVBtko87hkgM8BTZ0lZ8IbUfnQk6DyjcDujMiH3oszllAw== - dependencies: - web3-bzz "1.10.3" - web3-core "1.10.3" - web3-eth "1.10.3" - web3-eth-personal "1.10.3" - web3-net "1.10.3" - web3-shh "1.10.3" - web3-utils "1.10.3" - webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== -websocket@^1.0.32: - version "1.0.34" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" - integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== - dependencies: - bufferutil "^4.0.1" - debug "^2.2.0" - es5-ext "^0.10.50" - typedarray-to-buffer "^3.1.5" - utf-8-validate "^5.0.2" - yaeti "^0.0.6" - whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" @@ -7989,11 +5517,6 @@ which-boxed-primitive@^1.0.2: is-string "^1.0.5" is-symbol "^1.0.3" -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ== - which-typed-array@^1.1.11, which-typed-array@^1.1.13, which-typed-array@^1.1.2: version "1.1.13" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" @@ -8019,11 +5542,6 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - integrity sha512-UD7d8HFA2+PZsbKyaOCEy8gMh1oDtHgJh1LfgjQ4zVXmYjAT/kvz3PueITKuqDiIXQe7yzpPnxX3lNc+AhQMyw== - word-wrap@~1.2.3: version "1.2.5" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" @@ -8056,14 +5574,6 @@ workerpool@6.2.1: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" @@ -8083,76 +5593,17 @@ ws@7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== -ws@^3.0.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - ws@^7.4.6: version "7.5.9" resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -xhr-request-promise@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" - integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== - dependencies: - xhr-request "^1.1.0" - -xhr-request@^1.0.1, xhr-request@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" - integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== - dependencies: - buffer-to-arraybuffer "^0.0.5" - object-assign "^4.1.1" - query-string "^5.0.1" - simple-get "^2.7.0" - timed-out "^4.0.1" - url-set-query "^1.0.0" - xhr "^2.0.4" - -xhr@^2.0.4, xhr@^2.3.3: - version "2.6.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" - integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== - dependencies: - global "~4.4.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - -xmlhttprequest@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" - integrity sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA== - -xtend@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -y18n@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" - integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== - y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yaeti@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" - integrity sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug== - -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1: +yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== @@ -8167,14 +5618,6 @@ yargs-parser@20.2.4: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== -yargs-parser@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" - integrity sha512-9pIKIJhnI5tonzG6OnCFlz/yln8xHYcGl+pn3xR0Vzff0vzN1PbNRaelgfgRUwZ3s4i3jvxT9WhmUGL4whnasA== - dependencies: - camelcase "^3.0.0" - lodash.assign "^4.0.6" - yargs-parser@^20.2.2: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" @@ -8203,26 +5646,6 @@ yargs@16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^4.7.1: - version "4.8.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" - integrity sha512-LqodLrnIDM3IFT+Hf/5sxBnEGECrfdC1uIbgZeJmESCSo4HoCAaKEus8MylXHAkdacGc0ye+Qa+dpkuom8uVYA== - dependencies: - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - lodash.assign "^4.0.3" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.1" - which-module "^1.0.0" - window-size "^0.2.0" - y18n "^3.2.1" - yargs-parser "^2.4.1" - yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" @@ -8233,6 +5656,16 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== +yup@^1.2.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/yup/-/yup-1.3.3.tgz#d2f6020ad1679754c5f8178a29243d5447dead04" + integrity sha512-v8QwZSsHH2K3/G9WSkp6mZKO+hugKT1EmnMqLNUcfu51HU9MDyhlETT/JgtzprnrnQHPWsjc6MUDMBp/l9fNnw== + dependencies: + property-expr "^2.0.5" + tiny-case "^1.0.3" + toposort "^2.0.2" + type-fest "^2.19.0" + zksync-web3@^0.14.3: version "0.14.4" resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.4.tgz#0b70a7e1a9d45cc57c0971736079185746d46b1f" diff --git a/packages/js-client/package.json b/packages/js-client/package.json index 10295c9b..876db91f 100644 --- a/packages/js-client/package.json +++ b/packages/js-client/package.json @@ -69,7 +69,7 @@ "ts-node": "^10.9.1", "tslib": "^2.3.1", "typechain": "^8.3.2", - "typescript": "^5.1", + "typescript": "^5.2.2", "web3": "^1.0.0-beta.36", "web3-core-helpers": "^1.2.1", "web3-core-promievent": "^1.2.1", @@ -77,7 +77,7 @@ "web3-utils": "^1.2.1" }, "dependencies": { - "@aragon/osx-ethers": "1.3.0-rc0.3", + "@aragon/osx-ethers": "1.3.1", "@aragon/sdk-client-common": "1.2.0-rc0", "@aragon/sdk-common": "1.5.0", "@ethersproject/abstract-signer": "^5.7.0", diff --git a/packages/js-client/yarn.lock b/packages/js-client/yarn.lock index f72ea50d..1d9be95e 100644 --- a/packages/js-client/yarn.lock +++ b/packages/js-client/yarn.lock @@ -10446,16 +10446,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^5.0.2: +typescript@5.2.2, typescript@^5.0.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== -typescript@^5.1: - version "5.3.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43" - integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== - typical@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index f04aff6d..85e2936c 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -21,7 +21,8 @@ "cross-env": "^7.0.3", "matchstick-as": "^0.5.2", "mustache": "^4.2.0", - "@aragon/osx-ethers": "1.3.0", + "@aragon/osx-ethers": "1.4.0-alpha.0", + "@aragon/osx-commons-configs": "0.2.0", "ts-morph": "^17.0.1", "ts-node": "^10.9.1", "typescript": "^5.2.2", diff --git a/packages/subgraph/scripts/import-plugin-repo.ts b/packages/subgraph/scripts/import-plugin-repo.ts index e01d393b..8f9d655c 100644 --- a/packages/subgraph/scripts/import-plugin-repo.ts +++ b/packages/subgraph/scripts/import-plugin-repo.ts @@ -6,22 +6,24 @@ import path from 'path'; const rootDir = path.join(__dirname, '../../../'); // Adjust the path as necessary dotenv.config({path: path.join(rootDir, '.env')}); -// Extract Repo address from the plugin-info.json +// Extract Repo address from the production-network-deployments.json function extractAndWriteAddressToTS(jsonPath: string): void { - // Read the plugin-info.json file - const pluginInfo = JSON.parse(fs.readFileSync(jsonPath, 'utf8')); + // Read the production-network-deployments.json file + const aragonDeploymentsInfo = JSON.parse(fs.readFileSync(jsonPath, 'utf8')); // Get the network from environment variables const network = process.env.SUBGRAPH_NETWORK_NAME; - // Check if the network is defined in pluginInfo - if (!network || !pluginInfo[network]) { - throw new Error(`Network '${network}' not found in plugin-info.json`); + // Check if the network is defined in aragonDeploymentsInfo + if (!network || !aragonDeploymentsInfo[network]) { + throw new Error( + `Network '${network}' not found in production-network-deployments.json` + ); } // Start the Map creation code with the specific network address const tsContent: string[] = [ - `export const PLUGIN_REPO_ADDRESS = '${pluginInfo[network].address}';`, + `export const PLUGIN_REPO_ADDRESS = '${aragonDeploymentsInfo[network].address}';`, ]; const outputDir = path.join(__dirname, '../imported'); @@ -40,5 +42,8 @@ function extractAndWriteAddressToTS(jsonPath: string): void { ); } -const pluginInfoPath = path.join(rootDir, 'plugin-info.json'); -extractAndWriteAddressToTS(pluginInfoPath); +const aragonDeploymentsInfoPath = path.join( + rootDir, + 'production-network-deployments.json' +); +extractAndWriteAddressToTS(aragonDeploymentsInfoPath); diff --git a/packages/subgraph/tsconfig.json b/packages/subgraph/tsconfig.json index 20dcb72e..192bbfb5 100644 --- a/packages/subgraph/tsconfig.json +++ b/packages/subgraph/tsconfig.json @@ -17,7 +17,6 @@ "target": "es6" }, "exclude": ["node_modules"], - "files": ["./hardhat.config.ts"], "include": [ "manifest/**/*", "src/**/*", diff --git a/packages/subgraph/yarn.lock b/packages/subgraph/yarn.lock index a866e347..2b2a9be4 100644 --- a/packages/subgraph/yarn.lock +++ b/packages/subgraph/yarn.lock @@ -2,10 +2,17 @@ # yarn lockfile v1 -"@aragon/osx-ethers@1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@aragon/osx-ethers/-/osx-ethers-1.3.0.tgz#85ddd93f4448789e94154b313f9ddd8069dff568" - integrity sha512-zfLAYdgZ3SSifHiyJLkBKmoDw/IEX/yzvw6liUAa/gz7HZOsrwp3JsBJaIwB2epOnGa6vhXyWTKKZ15aJvoMaA== +"@aragon/osx-commons-configs@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@aragon/osx-commons-configs/-/osx-commons-configs-0.2.0.tgz#32f83596f4a2e9e48aef61cf560c1c5b4d32a049" + integrity sha512-wCFtgmuGCzs8L5mCxVCYQ6uEu69IrofS7q2w7E1Fjk7/nWuSmRUpgmif3ki9BQq1qpOvDu2P+u3UNLnIz8J82g== + dependencies: + tslib "^2.6.2" + +"@aragon/osx-ethers@1.4.0-alpha.0": + version "1.4.0-alpha.0" + resolved "https://registry.yarnpkg.com/@aragon/osx-ethers/-/osx-ethers-1.4.0-alpha.0.tgz#329f1ac27660b486fa0b296dddeb004ce352001c" + integrity sha512-fFsrG/XMIjZe3MxVQdf87gqAC4q0Z/eBp72QUuzXJQ0gMSTSj/4TvveFn1N8toLN6KsJolMEkaTamyCGYR+5iA== dependencies: ethers "^5.6.2" @@ -3712,9 +3719,9 @@ typedarray@^0.0.6: integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== typescript@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" - integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== + version "5.3.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" + integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== uint8arrays@^3.0.0: version "3.1.1" diff --git a/plugin-info.json b/plugin-info.json deleted file mode 100644 index 80e512fa..00000000 --- a/plugin-info.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "goerli": { - "repo": "test-2", - "address": "0xE56a8AfAE1F31013E41B08ce71d43f3008E50fd2", - "args": [], - "blockNumberOfDeployment": 9418499, - "releases": { - "1": { - "builds": { - "1": { - "setup": { - "name": "MyPluginSetup", - "address": "0x5F186fDFc79f890A3C01acFc1EE5c8e8c2977881", - "args": [], - "blockNumberOfDeployment": 9418501 - }, - "implementation": { - "name": "MyPlugin", - "address": "0x5BF9D9CB63741C76d58765659a9Ce9405e5322cB", - "args": [], - "blockNumberOfDeployment": 9418501 - }, - "helpers": [], - "buildMetadataURI": "ipfs://QmY919VZ9gkeF6L169qQo89ucsUB9ScTaJVbGn8vMGGHxr", - "blockNumberOfPublication": 9418503 - } - }, - "releaseMetadataURI": "ipfs://QmVD1gtE5PdjhLuuRcjhiUqmnFXScVZbZ2oXEvXcKnd3b4" - } - } - }, - "baseGoerli": { - "repo": "test-2", - "address": "0xE3Bb449856e0A2A60f16e6bB7E59cEfB073DdAa1", - "args": [], - "blockNumberOfDeployment": 7850354, - "releases": { - "1": { - "builds": { - "1": { - "setup": { - "name": "MyPluginSetup", - "address": "0x604570fA0f83785ea925575d165725170eC316Cc", - "args": [], - "blockNumberOfDeployment": 7850358 - }, - "implementation": { - "name": "MyPlugin", - "address": "0x634a771777b306ba1B5F4ec85853b997d2Bf6827", - "args": [], - "blockNumberOfDeployment": 7850358 - }, - "helpers": [], - "buildMetadataURI": "ipfs://QmY919VZ9gkeF6L169qQo89ucsUB9ScTaJVbGn8vMGGHxr", - "blockNumberOfPublication": 7850362 - } - }, - "releaseMetadataURI": "ipfs://QmVD1gtE5PdjhLuuRcjhiUqmnFXScVZbZ2oXEvXcKnd3b4" - } - } - } -} diff --git a/yarn.lock b/yarn.lock index 769da68c..02f10d26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1330,10 +1330,10 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typescript@^5.2.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.2.tgz#00d1c7c1c46928c5845c1ee8d0cc2791031d4c43" - integrity sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ== +typescript@5.2.2: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== uri-js@^4.2.2: version "4.4.1"