diff --git a/client/src/config.js b/client/src/config.js index bff2fca..a46c6b2 100644 --- a/client/src/config.js +++ b/client/src/config.js @@ -1,3 +1,38 @@ +// require('dotenv-webpack').config() + +const NFTS = [{ + contractAddress: '0x426dD435EE83dEdb5af8eDa2729a9064C415777B', + tokenId: '1', + tokenType: 'ERC721', +}, { + contractAddress: '0x426dD435EE83dEdb5af8eDa2729a9064C415777B', + tokenId: '2', + tokenType: 'ERC721', +}, { + contractAddress: '0x6b2d0691dfF5eb5Baa039b9aD9597B9169cA44d0', + tokenId: '1', + tokenType: 'ERC1155', +}, { + contractAddress: '0x6b2d0691dfF5eb5Baa039b9aD9597B9169cA44d0', + tokenId: '2', + tokenType: 'ERC1155', +}] + +const TEST_NFTS = [] +// const TEST_NFTS = [{ +// contractAddress: '0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9', +// tokenId: '1', +// tokenType: 'ERC721' +// }, { +// contractAddress: '0xa513E6E4b8f2a923D98304ec87F64353C4D5C853', +// tokenId: '1', +// tokenType: 'ERC721' +// }, { +// contractAddress: '0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e', +// tokenId: '1', +// tokenType: 'ERC1155' +// }] + const config = { priceRefreshInterval: 60 * 1000, appId: 'sms-wallet', @@ -46,6 +81,12 @@ const config = { }, scanDelay: 250, defaultSignatureValidDuration: 1000 * 60 * 15, + mainnet: { + nfts: JSON.parse(process.env.NFTS || JSON.stringify(NFTS)) + }, + test: { + nfts: JSON.parse(process.env.TEST_NFTS || JSON.stringify(TEST_NFTS)) + } } export default config diff --git a/client/src/pages/NFT.jsx b/client/src/pages/NFT.jsx index 01d5bd3..c2652b4 100644 --- a/client/src/pages/NFT.jsx +++ b/client/src/pages/NFT.jsx @@ -13,6 +13,8 @@ import { TailSpin } from 'react-loading-icons' import PhoneInput from 'react-phone-number-input' import { walletActions } from '../state/modules/wallet' import { balanceActions } from '../state/modules/balance' +import { TokenType } from '../../../shared/constants' +import config from '../config' export const MetadataURITransformer = (url) => { const IPFSIO = /https:\/\/ipfs\.io\/ipfs\/(.+)/ @@ -57,6 +59,17 @@ export const useMetadata = ({ setResolvedAnimationUrl(animationUrl) setAnimationUrlContentType(animationUrlContentType) } + } else { + const resolvedImageUrl = metadata.image + const { headers: { 'content-type': contentType } } = await axios.head(resolvedImageUrl) + setResolvedImageUrl(resolvedImageUrl) + setContentType(contentType) + if (metadata.animation_url) { + const animationUrl = NFTUtils.replaceIPFSLink(metadata?.animation_url || metadata?.properties?.animation_url, ipfsGateway) + const { headers: { 'content-type': animationUrlContentType } } = await axios.head(animationUrl) + setResolvedAnimationUrl(animationUrl) + setAnimationUrlContentType(animationUrlContentType) + } } } catch (ex) { console.error(ex) @@ -278,6 +291,7 @@ export const NFTItem = ({ address, contractAddress, tokenId, tokenType, onSelect onSelect && onSelect({ resolvedImageUrl, contractAddress, isImage, isVideo, metadata, contractName, tokenId, tokenType })}> {!contentType && } {isImage && } + {/* */} {isVideo && } @@ -292,23 +306,12 @@ export const NFTItem = ({ address, contractAddress, tokenId, tokenType, onSelect } // eslint-disable-next-line no-unused-vars -const DUMMY_NFTS = [{ - contractAddress: '0x426dD435EE83dEdb5af8eDa2729a9064C415777B', - tokenId: '1', - tokenType: 'ERC721', -}, { - contractAddress: '0x426dD435EE83dEdb5af8eDa2729a9064C415777B', - tokenId: '2', - tokenType: 'ERC721', -}, { - contractAddress: '0x6b2d0691dfF5eb5Baa039b9aD9597B9169cA44d0', - tokenId: '1', - tokenType: 'ERC1155', -}, { - contractAddress: '0x6b2d0691dfF5eb5Baa039b9aD9597B9169cA44d0', - tokenId: '2', - tokenType: 'ERC1155', -}] +let DUMMY_NFTS +if (config.chainId === 1666600000) { + DUMMY_NFTS = config.mainnet.nfts +} else { + DUMMY_NFTS = config.test.nfts +} const loadNFTs = ({ address }) => { const dispatch = useDispatch() diff --git a/client/src/utils.js b/client/src/utils.js index a3af734..2610a85 100644 --- a/client/src/utils.js +++ b/client/src/utils.js @@ -174,6 +174,7 @@ export const getTextFromFile = file => export const NFTUtils = { replaceIPFSLink: (link, ipfsGateway) => { + console.log(`replacing link: ${link}`) if (!link) { return link } diff --git a/miniserver/.env.example b/miniserver/.env.example new file mode 100644 index 0000000..b8d9bfc --- /dev/null +++ b/miniserver/.env.example @@ -0,0 +1,57 @@ +# Server Configuration +SERVER_URL='https://localhost' +PORT=3101 +HTTPS_PORT=8444 + + +## Configurable (set these values to change default behaviour for local testing) +MINISERVER_DEBUG=1 +RELAYER_DEBUG=1 +VERBOSE=1 +SAFE_NONCE=1 +APIDOCS=1 + +## Mandatory +CORS=* +SECRET='none' + +# Datastore +GCP_PROJECT='sms-wallet-00' +GCP_CRED_PATH='./credentials/sms-wallet-00-a91857ffcaaf.json' +GCP_NAMESPACE='sms-wallet' + +# Twilio +TWILIO_ACCOUNT_SID= +TWILIO_AUTH_TOKEN= +TWILIO_FROM= + +# OTP +OTP_SALT='local-salt' + +# Client +CLIENT_ROOT='https://localhost:3100/' + +## Netork Information +# eth-local +ETH_LOCAL_RPC='http://127.0.0.1:8545' +ETH_LOCAL_WSS='ws://127.0.0.1:8545' +ETH_LOCAL_KEY='0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d' +ETH_LOCAL_MNEMONIC='test test test test test test test test test test test junk' +ETH_LOCAL_NUM_ACCOUNTS=3 +ETH_LOCAL_MINI_WALLET=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 +ETH_LOCAL_MINI_ID=0x5FC8d32690cc91D4c39d9d3abcBD16989F875707 + +## Default Values (can be ommitted) +POLLING_INTERVAL=1000 +DEFAULT_NETWORK='eth-local' +GAS_LIMIT='67219000' +#GAS_PRICE='10000000' +GAS_PRICE='413290302' +CACHE='cache' +STATS_PATH='../data/stats.json' +OTP_INTERVAL=60000 + + + + + diff --git a/miniserver/.eslintrc.js b/miniserver/.eslintrc.js new file mode 100644 index 0000000..ca25daa --- /dev/null +++ b/miniserver/.eslintrc.js @@ -0,0 +1,36 @@ +module.exports = { + root: true, + env: { + node: true, + es2020: true, + jest: true, + }, + extends: [ + 'standard', + ], + globals: { + artifacts: 'readonly', + contract: 'readonly', + assert: 'readonly', + ethers: 'readonly' + }, + // 'parser': '@babel/eslint-parser', + rules: { + 'no-await-in-loop': 0, + 'no-underscore-dangle': 0, + 'import/prefer-default-export': 0, + 'import/no-extraneous-dependencies': 1, + 'comma-dangle': 0, + 'no-console': 0, + 'no-mixed-operators': 0, + 'new-cap': 0, + 'max-len': 0, + }, + parserOptions: { + requireConfigFile: false, + ecmaVersion: 2020 + }, + plugins: [ + '@babel', + ], +} diff --git a/miniserver/.gitignore b/miniserver/.gitignore new file mode 100644 index 0000000..6a4f96d --- /dev/null +++ b/miniserver/.gitignore @@ -0,0 +1,4 @@ +/credentials +/certs/* +!/certs/README.md +!/certs/gen.sh \ No newline at end of file diff --git a/miniserver/app.js b/miniserver/app.js new file mode 100644 index 0000000..f801255 --- /dev/null +++ b/miniserver/app.js @@ -0,0 +1,119 @@ +require('dotenv').config() +const createError = require('http-errors') +// const rateLimit = require('express-rate-limit') +const Fingerprint = require('express-fingerprint') +const express = require('express') +const path = require('path') +const cookieParser = require('cookie-parser') +const logger = require('morgan') +const config = require('./config') +const _index = require('./routes/index') +const bodyParser = require('body-parser') +const app = express() +const https = require('https') +const http = require('http') +const env = process.env.NODE_ENV || 'development' +const fs = require('fs') +const blockchain = require('./blockchain') + +Error.stackTraceLimit = 100 +app.locals.ENV = env +app.locals.ENV_DEVELOPMENT = env === 'development' + +app.set('trust proxy', true) + +try { + blockchain.init().catch(ex => { + console.error('Blockchain initialization failed') + console.error(ex) + process.exit(2) + }) +} catch (ex) { + console.error(ex) + process.exit(1) +} + +let httpServer, httpsServer + +const httpsOptions = { + key: fs.readFileSync(config.https.key), + cert: fs.readFileSync(config.https.cert) +} + +if (config.https.only) { + const httpApp = express() + const httpRouter = express.Router() + httpApp.use('*', httpRouter) + httpRouter.get('*', function (req, res) { + const hostPort = (req.get('host') || '').split(':') + const url = hostPort.length === 2 ? `https://${hostPort[0]}:${config.httpsPort}${req.originalUrl}` : `https://${hostPort[0]}${req.originalUrl}` + res.redirect(url) + }) + httpServer = http.createServer(httpApp) +} else { + httpServer = http.createServer(app) +} + +httpsServer = https.createServer(httpsOptions, app) + +app.use(Fingerprint({ + parameters: [ + Fingerprint.useragent, + Fingerprint.acceptHeaders, + Fingerprint.geoip, + ] +})) + +app.use(bodyParser.json({ + verify: function (req, _res, buf) { + req.rawBody = buf + } +})) +app.use(bodyParser.urlencoded({ extended: true })) +app.use(logger('dev')) +app.use(express.json()) +app.use(express.urlencoded({ extended: false })) +app.use(cookieParser()) + +if (config.corsOrigins) { + app.use((req, res, next) => { + // res.header('Access-Control-Allow-Origin', config.corsOrigins) + if (config.corsOrigins === '*' || config.corsOrigins.indexOf(req.headers.origin) >= 0) { + res.header('Access-Control-Allow-Origin', req.headers.origin || config.corsOrigins) + } else { + res.header('Access-Control-Allow-Origin', config.corsOrigins) + } + + res.header('Access-Control-Allow-Credentials', 'true') + + res.header('Access-Control-Allow-Methods', 'GET, PUT, POST, DELETE, OPTIONS') + + res.header('Access-Control-Allow-Headers', 'X-SECRET, X-NETWORK, X-MAJOR-VERSION, X-MINOR-VERSION, Accept, Accept-CH, Accept-Charset, Accept-Datetime, Accept-Encoding, Accept-Ext, Accept-Features, Accept-Language, Accept-Params, Accept-Ranges, Access-Control-Allow-Credentials, Access-Control-Allow-Headers, Access-Control-Allow-Methods, Access-Control-Allow-Origin, Access-Control-Expose-Headers, Access-Control-Max-Age, Access-Control-Request-Headers, Access-Control-Request-Method, Age, Allow, Alternates, Authentication-Info, Authorization, C-Ext, C-Man, C-Opt, C-PEP, C-PEP-Info, CONNECT, Cache-Control, Compliance, Connection, Content-Base, Content-Disposition, Content-Encoding, Content-ID, Content-Language, Content-Length, Content-Location, Content-MD5, Content-Range, Content-Script-Type, Content-Security-Policy, Content-Style-Type, Content-Transfer-Encoding, Content-Type, Content-Version, Cookie, Cost, DAV, DELETE, DNT, DPR, Date, Default-Style, Delta-Base, Depth, Derived-From, Destination, Differential-ID, Digest, ETag, Expect, Expires, Ext, From, GET, GetProfile, HEAD, HTTP-date, Host, IM, If, If-Match, If-Modified-Since, If-None-Match, If-Range, If-Unmodified-Since, Keep-Alive, Label, Last-Event-ID, Last-Modified, Link, Location, Lock-Token, MIME-Version, Man, Max-Forwards, Media-Range, Message-ID, Meter, Negotiate, Non-Compliance, OPTION, OPTIONS, OWS, Opt, Optional, Ordering-Type, Origin, Overwrite, P3P, PEP, PICS-Label, POST, PUT, Pep-Info, Permanent, Position, Pragma, ProfileObject, Protocol, Protocol-Query, Protocol-Request, Proxy-Authenticate, Proxy-Authentication-Info, Proxy-Authorization, Proxy-Features, Proxy-Instruction, Public, RWS, Range, Referer, Refresh, Resolution-Hint, Resolver-Location, Retry-After, Safe, Sec-Websocket-Extensions, Sec-Websocket-Key, Sec-Websocket-Origin, Sec-Websocket-Protocol, Sec-Websocket-Version, Security-Scheme, Server, Set-Cookie, Set-Cookie2, SetProfile, SoapAction, Status, Status-URI, Strict-Transport-Security, SubOK, Subst, Surrogate-Capability, Surrogate-Control, TCN, TE, TRACE, Timeout, Title, Trailer, Transfer-Encoding, UA-Color, UA-Media, UA-Pixels, UA-Resolution, UA-Windowpixels, URI, Upgrade, User-Agent, Variant-Vary, Vary, Version, Via, Viewport-Width, WWW-Authenticate, Want-Digest, Warning, Width, X-Content-Duration, X-Content-Security-Policy, X-Content-Type-Options, X-CustomHeader, X-DNSPrefetch-Control, X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto, X-Frame-Options, X-Modified, X-OTHER, X-PING, X-PINGOTHER, X-Powered-By, X-Requested-With') + next() + }) +} + +app.use(express.static(path.join(__dirname, 'public'))) +app.options('*', async (_req, res) => res.end()) +app.use('/', _index) + +// catch 404 and forward to error handler +app.use(function (req, res, next) { + next(createError(404)) +}) + +// error handler +app.use(function (err, req, res, next) { + // set locals, only providing error in development + res.locals.message = err.message + res.locals.error = config.debug ? err : {} + + // render the error page + res.status(err.status || 500) + res.json({ error: res.locals.error, message: err.message }) +}) + +module.exports = { + httpServer, + httpsServer +} diff --git a/miniserver/bin/run.js b/miniserver/bin/run.js new file mode 100644 index 0000000..71e9e27 --- /dev/null +++ b/miniserver/bin/run.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node +const apps = require('../app') +const config = require('../config') +const httpsServer = apps.httpsServer +const httpServer = apps.httpServer +console.log('Starting web server...') + +httpsServer.listen(config.httpsPort || 8443, () => { + const addr = httpsServer.address() + console.log(`HTTPS server listening on port ${addr.port} at ${addr.address}`) +}) + +httpServer.listen(config.port || 3000, () => { + const addr = httpServer.address() + console.log(`HTTP server listening on port ${addr.port} at ${addr.address}`) +}) diff --git a/miniserver/blockchain.js b/miniserver/blockchain.js new file mode 100644 index 0000000..674a0b9 --- /dev/null +++ b/miniserver/blockchain.js @@ -0,0 +1,127 @@ +const config = require('./config') +const { ethers } = require('ethers') +const { Logger } = require('./logger') +const cloneDeep = require('lodash/fp/cloneDeep') +const { backOff } = require('exponential-backoff') +const { rpc } = require('./rpc') +const MiniWallet = require('../miniwallet/build/contracts/MiniWallet.sol/MiniWallet.json') +const MiniID = require('../miniwallet/build/contracts/nft/MiniID.sol/MiniID.json') +const constants = require('./constants') +let networkConfig = {} +let provider +let miniWallet +let miniID +const pendingNonces = {} +const signers = [] + +const init = async () => { + Logger.log('Initializing blockchain for server') + try { + Logger.log(`config.defaultNetwork: ${config.defaultNetwork}`) + networkConfig = config.networks[config.defaultNetwork] + Logger.log(`network: ${JSON.stringify(networkConfig)}`) + provider = ethers.getDefaultProvider(networkConfig.url) + miniWallet = new ethers.Contract(networkConfig.miniWalletAddress, MiniWallet.abi, provider) + miniID = new ethers.Contract(networkConfig.miniIDAddress, MiniID.abi, provider) + provider.pollingInterval = config.pollingInterval + if (networkConfig.mnemonic) { + for (let i = 0; i < networkConfig.numAccounts; i += 1) { + const path = constants.WalletPath + i.toString() + Logger.log(`path: ${path}`) + const signer = new ethers.Wallet.fromMnemonic(networkConfig.mnemonic, path) + signers[i] = signer.connect(provider) + } + } else { + signers[0] = new ethers.Wallet(networkConfig.key, networkConfig.provider) + } + Logger.log(`networkConfig.miniWalletAddress: ${networkConfig.miniWalletAddress}`) + Logger.log(`miniWallet.address : ${miniWallet.address}`) + Logger.log(`miniID.address : ${miniID.address}`) + } catch (ex) { + console.error(ex) + console.trace(ex) + } + for (const signer of signers) { + pendingNonces[signer.address] = 0 + Logger.log(`[${config.defaultNetwork}][${signer.address}] Set pending nonce = 0`) + } +} + +const sampleExecutionAddress = () => { + const nonces = cloneDeep(pendingNonces) + const probs = [] + let sum = 0 + for (const signer of signers) { + const p = 1.0 / Math.exp(nonces[signer.address]) + probs.push(p) + sum += p + } + const r = Math.random() * sum + let s = 0 + for (let i = 0; i < probs.length; i++) { + s += probs[i] + if (s >= r) { + return [i] + } + } + return [signers.length - 1] +} + +// basic executor used to send funds +const prepareExecute = (logger = Logger.log, abortUnlessRPCError = true) => async (method, params) => { + const [fromIndex] = sampleExecutionAddress() + const from = signers[fromIndex].address + const miniWalletSigner = miniWallet.connect(signers[fromIndex]) + logger(`Sampled [${fromIndex}] ${from}`) + const latestNonce = await rpc.getNonce({ address: from, network: config.defaultNetwork }) + const snapshotPendingNonces = pendingNonces[from] + const nonce = latestNonce + snapshotPendingNonces + pendingNonces[from] += 1 + const t0 = performance.now() + const elapsed = () => (performance.now() - t0).toFixed(3) + const printNonceStats = () => `[elapsed=${elapsed()}ms][network=${config.defaultNetwork}][account=${fromIndex}][nonce=${nonce}][snapshot=${snapshotPendingNonces}][current=${pendingNonces[from]}]` + try { + logger(`[pending]${printNonceStats()}`) + let numAttempts = 0 + const tx = await backOff( + async () => miniWalletSigner.send(...params, { + nonce, + gasPrice: ethers.BigNumber.from(config.gasPrice).mul((numAttempts || 0) + 1), + value: 0, + }), { + retry: (ex, n) => { + if (ex?.abort) { + console.error('[error-abort]', ex) + logger(`[abort][attempts=${n}]${printNonceStats()}`) + return false + } + if (!ex?.receipt && !ex?.response?.data && abortUnlessRPCError) { + console.error('[error-abort-before-rpc]', ex) + logger(`[abort-before-rpc][attempts=${n}]${printNonceStats()}`) + return false + } + console.error('[error]', ex?.response?.status, ex) + numAttempts = n + logger(`[retry][attempts=${n}]${printNonceStats()}`) + return true + } + }) + logger(`[complete]${printNonceStats()}`, JSON.stringify(tx, null, 2)) + return tx + } catch (ex) { + logger(`[error]${printNonceStats()}`, ex) + throw ex + } finally { + pendingNonces[from] -= 1 + } +} + +module.exports = { + init, + getNetworkConfig: () => networkConfig, + getProvider: () => provider, + getSigners: () => signers, + getMiniWallet: () => miniWallet, + getMiniID: () => miniID, + prepareExecute +} diff --git a/miniserver/certs/README.md b/miniserver/certs/README.md new file mode 100644 index 0000000..d15018a --- /dev/null +++ b/miniserver/certs/README.md @@ -0,0 +1 @@ +For hosting temporary credentials. Run `./gen.sh` to generate a local dev certificate diff --git a/miniserver/certs/gen.sh b/miniserver/certs/gen.sh new file mode 100755 index 0000000..ca6cbfa --- /dev/null +++ b/miniserver/certs/gen.sh @@ -0,0 +1,4 @@ +!/bin/bash +openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \ + -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=sms-wallet.local" \ + -keyout test.key -out test.cert diff --git a/miniserver/config.js b/miniserver/config.js new file mode 100644 index 0000000..25cd972 --- /dev/null +++ b/miniserver/config.js @@ -0,0 +1,73 @@ +require('dotenv').config() +const ethers = require('ethers') +const DEBUG = process.env.MINISERVER_DEBUG === 'true' || process.env.MINISERVER_DEBUG === '1' +const config = { + debug: DEBUG, + url: process.env.SERVER_URL || 'https://localhost', + port: process.env.PORT || 3000, + httpsPort: process.env.HTTPS_PORT || 8443, + verbose: process.env.VERBOSE === 'true' || process.env.VERBOSE === '1', + https: { + only: process.env.HTTPS_ONLY === 'true' || process.env.HTTPS_ONLY === '1', + key: DEBUG ? './certs/test.key' : './certs/privkey.pem', + cert: DEBUG ? './certs/test.cert' : './certs/fullchain.pem' + }, + corsOrigins: process.env.CORS, + secret: process.env.SECRET, + pollingInterval: parseInt(process.env.POLLING_INTERVAL || 1000), + defaultNetwork: process.env.DEFAULT_NETWORK || 'eth-local', + networks: { + 'harmony-testnet': { + key: process.env.HARMONY_TESTNET_KEY || '', + url: process.env.TESTNET_RPC || 'https://api.s0.b.hmny.io', + wss: process.env.TESTNET_WSS, + mnemonic: process.env.HARMONY_TESTNET_MNEMONIC, + skip: process.env.SKIP_TESTNE || true, + numAccounts: process.env.TESTNET_NUM_ACCOUNTS || 1, + blockTime: 2, + miniWalletAddress: process.env.TESTNET_MINI_WALLET, + miniIDAddress: process.env.TESTNET_MINI_ID, + }, + 'harmony-mainnet': { + key: process.env.HARMONY_MAINNET_KEY || '', + beacon: process.env.BEACON_MAINNET_RPC, + url: process.env.MAINNET_RPC || process.env.BEACON_MAINNET_RPC || 'https://api.s0.t.hmny.io', + wss: process.env.MAINNET_WSS || process.env.BEACON_MAINNET_WSS, + mnemonic: process.env.HARMONY_MAINNET_MNEMONIC, + skip: process.env.SKIP_MAINNET || true, + numAccounts: process.env.MAINNET_NUM_ACCOUNTS || 1, + blockTime: 2, + miniWalletAddress: process.env.MAINNET_MINI_WALLET, + miniIDAddress: process.env.MAINNET_MINI_ID, + }, + 'eth-local': { + url: process.env.ETH_LOCAL_RPC || 'http://127.0.0.1:8545', + wss: process.env.ETH_LOCAL_WSS, + key: process.env.ETH_LOCAL_KEY, + mnemonic: process.env.ETH_LOCAL_MNEMONIC, + skip: process.env.SKIP_ETH || true, + numAccounts: process.env.ETH_LOCAL_NUM_ACCOUNTS || 1, + miniWalletAddress: process.env.ETH_LOCAL_MINI_WALLET, + miniIDAddress: process.env.ETH_LOCAL_MINI_ID, + }, + }, + gasLimit: parseInt(process.env.GAS_LIMIT || '12345678'), + gasPrice: ethers.BigNumber.from(process.env.GAS_PRICE || '200'), + + datastore: { + gceProjectId: process.env.GCP_PROJECT, + cred: !process.env.GCP_CRED_PATH ? {} : require(process.env.GCP_CRED_PATH), + mock: !process.env.GCP_CRED_PATH, + mockPort: 9000, + namespace: process.env.GCP_NAMESPACE || 'sms-wallet-server' + }, + + twilio: { + sid: process.env.TWILIO_ACCOUNT_SID, + token: process.env.TWILIO_AUTH_TOKEN, + from: process.env.TWILIO_FROM, + }, + + defaultSignatureValidDuration: 1000 * 60 * 15, +} +module.exports = config diff --git a/miniserver/constants.js b/miniserver/constants.js new file mode 100644 index 0000000..13cc0d8 --- /dev/null +++ b/miniserver/constants.js @@ -0,0 +1,5 @@ +module.exports = { + ReasonGiven: 'Reason given: ', + WalletPath: "m/44'/60'/0'/0/", + NullAddress: '0x0000000000000000000000000000000000000000' +} diff --git a/miniserver/deploy/enable.sh b/miniserver/deploy/enable.sh new file mode 100755 index 0000000..f98259c --- /dev/null +++ b/miniserver/deploy/enable.sh @@ -0,0 +1,6 @@ +#!/bin/sh +sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/node +sudo cp sms-miniwallet-server.service /etc/systemd/system/sms-miniwallet-server.service +sudo systemctl start sms-miniwallet-server +sudo systemctl enable sms-miniwallet-server +systemctl status sms-miniwallet-server diff --git a/miniserver/deploy/log.sh b/miniserver/deploy/log.sh new file mode 100755 index 0000000..b9ba23f --- /dev/null +++ b/miniserver/deploy/log.sh @@ -0,0 +1,2 @@ +#!/bin/sh +journalctl -u sms-miniwallet-server diff --git a/miniserver/deploy/port.sh b/miniserver/deploy/port.sh new file mode 100644 index 0000000..59834d6 --- /dev/null +++ b/miniserver/deploy/port.sh @@ -0,0 +1,8 @@ +!#/bin/sh +sudo iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT +sudo iptables -A INPUT -i eth0 -p tcp --dport 3000 -j ACCEPT +sudo iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT +sudo iptables -A INPUT -i eth0 -p tcp --dport 8443 -j ACCEPT +sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000 +sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443 +sudo iptables --flush diff --git a/miniserver/deploy/sms-miniwallet-server.service b/miniserver/deploy/sms-miniwallet-server.service new file mode 100644 index 0000000..2fde49f --- /dev/null +++ b/miniserver/deploy/sms-miniwallet-server.service @@ -0,0 +1,15 @@ +[Unit] +Description=SMS MiniWallet Server +Documentation=https://github.com/polymorpher/sms-wallet/ +After=network.target + +[Service] +Environment=PORT=80 HTTPS_PORT=443 +Type=simple +User=ec2-user +WorkingDirectory=/home/ec2-user/sms-wallet/miniserver +ExecStart=/usr/bin/node /home/ec2-user/sms-wallet/miniserver/bin/run.js +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/miniserver/logger.js b/miniserver/logger.js new file mode 100644 index 0000000..0976308 --- /dev/null +++ b/miniserver/logger.js @@ -0,0 +1,8 @@ + +const Logger = { + log: (...args) => { + console.log(...args) + } +} + +module.exports = { Logger } diff --git a/miniserver/package.json b/miniserver/package.json new file mode 100644 index 0000000..2fa63d8 --- /dev/null +++ b/miniserver/package.json @@ -0,0 +1,74 @@ +{ + "name": "sms-miniwallet-server", + "version": "0.0.1", + "private": true, + "main": "app.js", + "scripts": { + "start": "node ./bin/run.js", + "debug": "DEBUG=true npm run start" + }, + "dependencies": { + "@google-cloud/datastore": "^7.0.0", + "axios": "^0.21.1", + "body-parser": "^1.19.0", + "compression": "^1.7.4", + "cookie-parser": "^1.4.5", + "dotenv": "^10.0.0", + "ethers": "^5.7.0", + "exponential-backoff": "^3.1.0", + "express": "5.0.0-beta.1", + "express-fingerprint": "^1.2.2", + "express-rate-limit": "^5.3.0", + "express-slow-down": "^1.4.0", + "flat": "^5.0.2", + "http-errors": "^1.8.0", + "http-status-codes": "^2.2.0", + "json-stable-stringify": "^1.0.1", + "jssha": "^3.2.0", + "keccak": "^3.0.2", + "lodash": "^4.17.21", + "moment": "^2.29.1", + "morgan": "^1.10.0", + "node-cache": "^5.1.2", + "phone": "^3.1.22", + "twilio": "^3.79.0", + "ua-parser-js": "^1.0.2", + "uuid": "^8.3.2" + }, + "devDependencies": { + "@babel/core": "^7.14.2", + "@babel/eslint-parser": "^7.14.2", + "@babel/eslint-plugin": "^7.13.16", + "@babel/plugin-proposal-class-properties": "7.7.4", + "@babel/plugin-proposal-decorators": "7.7.4", + "@babel/plugin-proposal-export-namespace-from": "7.7.4", + "@babel/plugin-proposal-function-sent": "7.7.4", + "@babel/plugin-proposal-json-strings": "7.7.4", + "@babel/plugin-proposal-numeric-separator": "7.7.4", + "@babel/plugin-proposal-throw-expressions": "7.7.4", + "@babel/plugin-syntax-dynamic-import": "7.7.4", + "@babel/plugin-syntax-import-meta": "7.7.4", + "core-js": "^3.13.0", + "eslint": "^7.26.0", + "eslint-config-airbnb": "18.0.1", + "eslint-config-standard": "^16.0.3", + "eslint-plugin-import": "^2.23.3", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.0", + "eslint-plugin-standard": "^5.0.0", + "standard": "^17.0.0", + "swagger-jsdoc": "^6.2.5", + "swagger-ui-express": "^4.5.0" + }, + "resolutions": { + "tar": ">=4.4.15" + }, + "eslintConfig": { + "env": { + "node": true + }, + "rules": { + "import/no-extraneous-dependencies": 1 + } + } +} \ No newline at end of file diff --git a/miniserver/routes/index.js b/miniserver/routes/index.js new file mode 100644 index 0000000..94e7be6 --- /dev/null +++ b/miniserver/routes/index.js @@ -0,0 +1,58 @@ +const express = require('express') +const router = express.Router() +const { StatusCodes } = require('http-status-codes') +const { Logger } = require('../logger') +const Twilio = require('twilio') +const blockchain = require('../blockchain') +const { ethers } = require('ethers') +const utils = require('../../server/utils') +const { parseError } = utils +const { checkFromTwilio, parseSMS } = require('./middleware') + +router.get('/health', async (req, res) => { + Logger.log('[/health]', req.fingerprint) + res.send('OK').end() +}) + +router.post('/sms', checkFromTwilio, parseSMS, async (req, res) => { + const messagingResponse = Twilio.twiml.MessagingResponse + const response = new messagingResponse() + // Look up the from Phone Number to get the address + const { command, requestor, funder, amount } = req.processedBody + Logger.log(`req.body: ${JSON.stringify(req.processedBody)}`) + const miniWallet = blockchain.getMiniWallet() + // const miniWallet = miniWallets[1] + + const logger = (...args) => Logger.log('[/sms]', ...args) + const executor = blockchain.prepareExecute(logger) + + Logger.log(`miniWallet.address: ${miniWallet.address}`) + try { + if (command === 'balance') { + const balance = ethers.utils.formatEther(await miniWallet.userBalances(requestor.address)) + const response = new Twilio.twiml.MessagingResponse() + response.message(`Your balance is ${balance} (address: ${requestor.address})`) + return res.send(response.toString()) + } else if (command === 'pay') { + const method = 'send' + const params = [ + amount, + funder.address, + requestor.address + ] + const receipt = await executor(method, params) + const response = new Twilio.twiml.MessagingResponse() + response.message(`Payment Succesful\nfrom: ${funder.phone} (address: ${funder.address})\nto: ${requestor.phone} (address: ${requestor.address})\namount: ${ethers.utils.formatEther(amount)}\ntransaction: ${receipt.hash}`) + return res.send(response.toString()) + } else { + return res.status(StatusCodes.BAD_REQUEST).json({ error: 'invalid sms command' }) + } + } catch (ex) { + console.error(ex) + const { code, error, success } = parseError(ex) + response.message(`An exception occured. success: ${success} code: ${code} error: ${error.substr(0, 100)} `) + return res.send(response.toString()) + } +}) + +module.exports = router diff --git a/miniserver/routes/middleware.js b/miniserver/routes/middleware.js new file mode 100644 index 0000000..9ed12bf --- /dev/null +++ b/miniserver/routes/middleware.js @@ -0,0 +1,120 @@ +const config = require('../config') +const { StatusCodes } = require('http-status-codes') +const { Logger } = require('../logger') +const { phone } = require('phone') +const Twilio = require('twilio') +const { User } = require('../../server/src/data/user') +const { toNumber } = require('lodash') +const { ethers } = require('ethers') +const utils = require('../../server/utils') +const { parseError } = utils + +const checkFromTwilio = async (req, res, next) => { + // if not in debug mode check valid Twilio Request + if (config.debug === false) { + if (!Twilio.validateRequest(config.twilio.token, req.headers['x-twilio-signature'], (req.protocol + req.get('host') + req.path), req.body)) { + return res.status(StatusCodes.BAD_REQUEST).json({ error: 'request not from twilio' }) + } + } + next() +} + +// parseSMS parses a message and returns command, requestor, funder, amount +// Balance Example : smsBody = 'b' returns balance requestor.address +// Payment Example : smsbody = 'p 4158401410 0.1' returns pay requestor.address funder.address 0.1 +const parseSMS = async (req, res, next) => { + const { From: senderPhoneNumber, Body: smsBody } = req.body + const smsParams = smsBody.split(/(\s+)/).filter(e => { return e.trim().length > 0 }) + const response = new Twilio.twiml.MessagingResponse() + try { + let command + const requestor = await User.findByPhone({ phone: senderPhoneNumber }) + if (smsParams.length < 1) { + response.message('error: empy sms command') + return res.send(response.toString()) + } + if (smsParams[0] === 'b') { + command = 'balance' + req.processedBody = { ...req.processedBody, command, requestor } + } else if (smsParams[0] === 'p') { + command = 'pay' + let funder + let amount + if (smsParams.length < 2) { + response.message('error: pay request requires funder and an amount. example request "p +14158401999 0.1"') + return res.send(response.toString()) + } + // Allow requesting of funds from users by address (without checking registered phone number) + if (smsParams[1].substr(0, 2) === '0x') { + if (ethers.utils.isAddress(smsParams[1])) { + funder.address = smsParams[1] + } else { + response.message(`error: invalid funder address ${smsParams[1]}. example request "p 0x8ba1f109551bd432803012645ac136ddd64dba72 0.1"`) + return res.send(response.toString()) + } + } else { + // set country and look up user address from Phone Number + let funderPhone = smsParams[1] + if (funderPhone.substr(0, 1) !== '+') { + const { countryIso3 } = phone(requestor.phone) + const { isValid, phoneNumber } = phone(funderPhone, countryIso3) + funderPhone = phoneNumber + if (!isValid) { + response.message(`error: invalid recipient phone number ${smsParams[1]}. example request "p +14158401999 0.1"`) + return res.send(response.toString()) + } + } + Logger.log(`funderPhone: ${funderPhone}`) + funder = await User.findByPhone({ phone: funderPhone }) + if (!funder?.address) { + response.message(`error: funders phone number is not a registered wallet: ${smsParams[1]}. example request "p +14158401999 0.1"`) + return res.send(response.toString()) + } + } + + if (toNumber(smsParams[2]) > 0) { + amount = ethers.utils.parseEther(smsParams[2]) + } else { + response.message(`error: pay request requires a valid amount': ${smsParams[2]} example request "p +14158401999 0.1"`) + return res.send(response.toString()) + } + req.processedBody = { ...req.processedBody, command, requestor, funder, amount } + } else { + response.message('error: invalid sms command. example payment request "p +14158401999 0.1"') + return res.send(response.toString()) + } + } catch (ex) { + console.error(ex) + const { code, error, success } = parseError(ex) + response.message(`An exception occured. success: ${success} code: ${code} error: ${error.substr(0, 100)} `) + return res.send(response.toString()) + } + next() +} + +const validateID = async (req, res, next) => { + const { phoneNumber, address } = req.processedBody + let u + if (address) { + if (!ethers.utils.isAddress(address)) { + return res.status(StatusCodes.BAD_REQUEST).json({ error: `invalid Address: ${address}` }) + } else { + // find by address + u = await User.findByAddress({ address }) + if (!u?.id) { + return res.status(StatusCodes.BAD_REQUEST).json({ error: `address does not exists: ${address}` }) + } + } + } else { + // const u = await User.findByAddress({ address }) + u = await User.findByPhone({ phone: phoneNumber }) + if (!u?.id) { + return res.status(StatusCodes.BAD_REQUEST).json({ error: `phone number not registered: ${phoneNumber}` }) + } + } + console.log(`u: ${JSON.stringify(u)}`) + req.processedBody = { ...req.processedBody, phone: u.phone, address: u.address.toLowerCase() } + next() +} + +module.exports = { checkFromTwilio, parseSMS, validateID } diff --git a/miniserver/rpc.js b/miniserver/rpc.js new file mode 100644 index 0000000..532cfa5 --- /dev/null +++ b/miniserver/rpc.js @@ -0,0 +1,46 @@ +const axios = require('axios') +const config = require('./config') +const { ethers } = require('ethers') +const utils = require('../server/utils') +const { hexStringToBytes } = utils + +const rpc = { + getNonce: async ({ address, network, qualifier = 'latest' }) => { + const { data: { result } } = await axios.post(config.networks[network].url, { + jsonrpc: '2.0', + method: 'eth_getTransactionCount', // eth_getAccountNonce also works but is nonstandard (Harmony only) + params: [ + address, + qualifier + ], + id: 1 + }) + const bn = ethers.BigNumber.from(result.slice(2)) + return bn.toNumber() + }, + getCode: async ({ address, network, qualifier = 'latest' }) => { + const { data: { result } } = await axios.post(config.networks[network].url, { + jsonrpc: '2.0', + method: 'eth_getCode', + params: [ + address, + qualifier + ], + id: 1 + }) + return hexStringToBytes(result) + }, + gasPrice: async ({ network }) => { + const url = config.networks[network].url + const { data: { result } } = await axios.post(url, { + jsonrpc: '2.0', + method: 'eth_gasPrice', // eth_getAccountNonce also works but is nonstandard (Harmony only) + params: [], + id: 1 + }) + const bn = ethers.BigNumber.from(result.slice(2)) + return bn.toNumber() + } +} + +module.exports = { rpc } diff --git a/miniserver/utils.js b/miniserver/utils.js new file mode 100644 index 0000000..36e2738 --- /dev/null +++ b/miniserver/utils.js @@ -0,0 +1,16 @@ +const { StatusCodes } = require('http-status-codes') +const constants = require('./constants') + +const utils = { + + parseError: (ex) => { + let error = ex.toString() + if (error && error.indexOf(constants.ReasonGiven) > 0) { + error = error.slice(error.indexOf(constants.ReasonGiven) + constants.ReasonGiven.length) + return { success: false, code: StatusCodes.OK, error, extra: ex.extra } + } + return { success: false, code: StatusCodes.INTERNAL_SERVER_ERROR, error, extra: ex.extra } + } +} + +module.exports = utils diff --git a/miniserver/yarn.lock b/miniserver/yarn.lock new file mode 100644 index 0000000..69fe6d0 --- /dev/null +++ b/miniserver/yarn.lock @@ -0,0 +1,4630 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@ampproject/remapping@^2.1.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" + integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== + dependencies: + "@jridgewell/gen-mapping" "^0.1.0" + "@jridgewell/trace-mapping" "^0.3.9" + +"@apidevtools/json-schema-ref-parser@^9.0.6": + version "9.0.9" + resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#d720f9256e3609621280584f2b47ae165359268b" + integrity sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w== + dependencies: + "@jsdevtools/ono" "^7.1.3" + "@types/json-schema" "^7.0.6" + call-me-maybe "^1.0.1" + js-yaml "^4.1.0" + +"@apidevtools/openapi-schemas@^2.0.4": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz#9fa08017fb59d80538812f03fc7cac5992caaa17" + integrity sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ== + +"@apidevtools/swagger-methods@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz#b789a362e055b0340d04712eafe7027ddc1ac267" + integrity sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg== + +"@apidevtools/swagger-parser@10.0.2": + version "10.0.2" + resolved "https://registry.yarnpkg.com/@apidevtools/swagger-parser/-/swagger-parser-10.0.2.tgz#f4145afb7c3a3bafe0376f003b5c3bdeae17a952" + integrity sha512-JFxcEyp8RlNHgBCE98nwuTkZT6eNFPc1aosWV6wPcQph72TSEEu1k3baJD4/x1qznU+JiDdz8F5pTwabZh+Dhg== + dependencies: + "@apidevtools/json-schema-ref-parser" "^9.0.6" + "@apidevtools/openapi-schemas" "^2.0.4" + "@apidevtools/swagger-methods" "^3.0.2" + "@jsdevtools/ono" "^7.1.3" + call-me-maybe "^1.0.1" + z-schema "^4.2.3" + +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + +"@babel/compat-data@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" + integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== + +"@babel/core@^7.14.2": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.10.tgz#39ad504991d77f1f3da91be0b8b949a5bc466fb8" + integrity sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.10" + "@babel/helper-compilation-targets" "^7.18.9" + "@babel/helper-module-transforms" "^7.18.9" + "@babel/helpers" "^7.18.9" + "@babel/parser" "^7.18.10" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.18.10" + "@babel/types" "^7.18.10" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + +"@babel/eslint-parser@^7.14.2": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.18.9.tgz#255a63796819a97b7578751bb08ab9f2a375a031" + integrity sha512-KzSGpMBggz4fKbRbWLNyPVTuQr6cmCcBhOyXTw/fieOVaw5oYAwcAj4a7UKcDYCPxQq+CG1NCDZH9e2JTXquiQ== + dependencies: + eslint-scope "^5.1.1" + eslint-visitor-keys "^2.1.0" + semver "^6.3.0" + +"@babel/eslint-plugin@^7.13.16": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/eslint-plugin/-/eslint-plugin-7.18.10.tgz#11f454b5d1aa64c42fcfd64abe93071c15ebea3c" + integrity sha512-iV1OZj/7eg4wZIcsVEkXS3MUWdhmpLsu2h+9Zr2ppywKWdCRs6VfjxbRzmHHYeurTizrrnaJ9ZkbO8KOv4lauQ== + dependencies: + eslint-rule-composer "^0.3.0" + +"@babel/generator@^7.18.10": + version "7.18.12" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.12.tgz#fa58daa303757bd6f5e4bbca91b342040463d9f4" + integrity sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg== + dependencies: + "@babel/types" "^7.18.10" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + +"@babel/helper-annotate-as-pure@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" + integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-compilation-targets@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf" + integrity sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg== + dependencies: + "@babel/compat-data" "^7.18.8" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.20.2" + semver "^6.3.0" + +"@babel/helper-create-class-features-plugin@^7.7.4": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.9.tgz#d802ee16a64a9e824fcbf0a2ffc92f19d58550ce" + integrity sha512-WvypNAYaVh23QcjpMR24CwZY2Nz6hqdOcFdPbNpV56hL5H6KiFheO7Xm1aPdlLQ7d5emYZX7VZwPp9x3z+2opw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" + "@babel/helper-member-expression-to-functions" "^7.18.9" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/helper-replace-supers" "^7.18.9" + "@babel/helper-split-export-declaration" "^7.18.6" + +"@babel/helper-environment-visitor@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" + integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== + +"@babel/helper-function-name@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0" + integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A== + dependencies: + "@babel/template" "^7.18.6" + "@babel/types" "^7.18.9" + +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-member-expression-to-functions@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz#1531661e8375af843ad37ac692c132841e2fd815" + integrity sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg== + dependencies: + "@babel/types" "^7.18.9" + +"@babel/helper-module-imports@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-module-transforms@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712" + integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + +"@babel/helper-optimise-call-expression@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" + integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" + integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== + +"@babel/helper-replace-supers@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.18.9.tgz#1092e002feca980fbbb0bd4d51b74a65c6a500e6" + integrity sha512-dNsWibVI4lNT6HiuOIBr1oyxo40HvIVmbwPUm3XZ7wMh4k2WxrxTqZwSqw/eEmXDS9np0ey5M2bz9tBmO9c+YQ== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-member-expression-to-functions" "^7.18.9" + "@babel/helper-optimise-call-expression" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + +"@babel/helper-simple-access@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" + integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + +"@babel/helper-string-parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" + integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== + +"@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== + +"@babel/helper-validator-option@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== + +"@babel/helper-wrap-function@^7.7.4": + version "7.18.11" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.18.11.tgz#bff23ace436e3f6aefb61f85ffae2291c80ed1fb" + integrity sha512-oBUlbv+rjZLh2Ks9SKi4aL7eKaAXBWleHzU89mP0G6BMUlRxSckk9tSIkgDGydhgFxHuGSlBQZfnaD47oBEB7w== + dependencies: + "@babel/helper-function-name" "^7.18.9" + "@babel/template" "^7.18.10" + "@babel/traverse" "^7.18.11" + "@babel/types" "^7.18.10" + +"@babel/helpers@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9" + integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ== + dependencies: + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.18.10", "@babel/parser@^7.18.11", "@babel/parser@^7.9.4": + version "7.18.11" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.11.tgz#68bb07ab3d380affa9a3f96728df07969645d2d9" + integrity sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ== + +"@babel/plugin-proposal-class-properties@7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.7.4.tgz#2f964f0cb18b948450362742e33e15211e77c2ba" + integrity sha512-EcuXeV4Hv1X3+Q1TsuOmyyxeTRiSqurGJ26+I/FW1WbymmRRapVORm6x1Zl3iDIHyRxEs+VXWp6qnlcfcJSbbw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.7.4" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-proposal-decorators@7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.7.4.tgz#58c1e21d21ea12f9f5f0a757e46e687b94a7ab2b" + integrity sha512-GftcVDcLCwVdzKmwOBDjATd548+IE+mBo7ttgatqNDR7VG7GqIuZPtRWlMLHbhTXhcnFZiGER8iIYl1n/imtsg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.7.4" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-decorators" "^7.7.4" + +"@babel/plugin-proposal-export-namespace-from@7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.7.4.tgz#9b32a9e3538ba4b0e2fa08942f0a8e5f60899dea" + integrity sha512-3whN5U7iZjKdbwRSFwBOjGBgH7apXCzwielljxVH8D/iYcGRqPPw63vlIbG0GqQoT9bO0QYPcIUVkhQG5hcHtg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-export-namespace-from" "^7.7.4" + +"@babel/plugin-proposal-function-sent@7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-function-sent/-/plugin-proposal-function-sent-7.7.4.tgz#a1aaa820ed5210da7e31edee42f1a4cdc3ec1ba3" + integrity sha512-vCiie58siJZoGJBQT0WIKORMqCe6CFasTf2X1LOfyAiWYfLFcDCVg+Y4HIiDFH8hKwkMDGKJT6nLYHM0VmQZXA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-wrap-function" "^7.7.4" + "@babel/plugin-syntax-function-sent" "^7.7.4" + +"@babel/plugin-proposal-json-strings@7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.7.4.tgz#7700a6bfda771d8dc81973249eac416c6b4c697d" + integrity sha512-wQvt3akcBTfLU/wYoqm/ws7YOAQKu8EVJEvHip/mzkNtjaclQoCCIqKXFP5/eyfnfbQCDV3OLRIK3mIVyXuZlw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.7.4" + +"@babel/plugin-proposal-numeric-separator@7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.7.4.tgz#7819a17445f4197bb9575e5750ed349776da858a" + integrity sha512-CG605v7lLpVgVldSY6kxsN9ui1DxFOyepBfuX2AzU2TNriMAYApoU55mrGw9Jr4TlrTzPCG10CL8YXyi+E/iPw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-numeric-separator" "^7.7.4" + +"@babel/plugin-proposal-throw-expressions@7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-throw-expressions/-/plugin-proposal-throw-expressions-7.7.4.tgz#0321bd4acb699abef3006f7cd3d1b2c00daf1b82" + integrity sha512-yMcK1dM9Rv+Y5n62rKaHfRoRD4eOWIqYn4uy/Xu7C47rJKaR5JpQR905Hc/OL8EEaGNcEyuvjOtYdNAVXZKDZQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-throw-expressions" "^7.7.4" + +"@babel/plugin-syntax-decorators@^7.7.4": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.18.6.tgz#2e45af22835d0b0f8665da2bfd4463649ce5dbc1" + integrity sha512-fqyLgjcxf/1yhyZ6A+yo1u9gJ7eleFQod2lkaUsF9DQ7sbbY3Ligym3L0+I2c0WmqNKDpoD9UTb1AKP3qRMOAQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-syntax-dynamic-import@7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.7.4.tgz#29ca3b4415abfe4a5ec381e903862ad1a54c3aec" + integrity sha512-jHQW0vbRGvwQNgyVxwDh4yuXu4bH1f5/EICJLAhl1SblLs2CDhrsmCk+v5XLdE9wxtAFRyxx+P//Iw+a5L/tTg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-export-namespace-from@^7.7.4": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + +"@babel/plugin-syntax-function-sent@^7.7.4": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-function-sent/-/plugin-syntax-function-sent-7.18.6.tgz#ce2e8e9979f8a26246bba81534e605c6d1369e5e" + integrity sha512-f3OJHIlFIkg+cP1Hfo2SInLhsg0pz2Ikmgo7jMdIIKC+3jVXQlHB0bgSapOWxeWI0SU28qIWmfn5ZKu1yPJHkg== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/plugin-syntax-import-meta@7.7.4": + version "7.7.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.7.4.tgz#3e9e4630780df5885b801f53c5f68d75e99e5261" + integrity sha512-hl6aKgm2IbVB+X9Z2xcKvGObOOS//vbohHPpNvd8iaKA3XQi3Sz/3oOyb3GLes6hY871mkbZQYK7lxriVECRAQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-json-strings@^7.7.4": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" + integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== + dependencies: + "@babel/helper-plugin-utils" "^7.8.0" + +"@babel/plugin-syntax-numeric-separator@^7.7.4": + version "7.10.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== + dependencies: + "@babel/helper-plugin-utils" "^7.10.4" + +"@babel/plugin-syntax-throw-expressions@^7.7.4": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-throw-expressions/-/plugin-syntax-throw-expressions-7.18.6.tgz#50889d493f7ef9631d79bae6b30f58fa8c06449f" + integrity sha512-rp1CqEZXGv1z1YZ3qYffBH3rhnOxrTwQG8fh2yqulTurwv9zu3Gthfd+niZBLSOi1rY6146TgF+JmVeDXaX4TQ== + dependencies: + "@babel/helper-plugin-utils" "^7.18.6" + +"@babel/template@^7.18.10", "@babel/template@^7.18.6": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" + integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.10" + "@babel/types" "^7.18.10" + +"@babel/traverse@^7.18.10", "@babel/traverse@^7.18.11", "@babel/traverse@^7.18.9": + version "7.18.11" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.11.tgz#3d51f2afbd83ecf9912bcbb5c4d94e3d2ddaa16f" + integrity sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.10" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.18.11" + "@babel/types" "^7.18.10" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6" + integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ== + dependencies: + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^9.3.2" + globals "^13.15.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" + +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + js-sha3 "0.8.0" + +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@5.7.0", "@ethersproject/networks@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.0.tgz#df72a392f1a63a57f87210515695a31a245845ad" + integrity sha512-MG6oHSQHd4ebvJrleEQQ4HhVu8Ichr0RDYEfHzsVAVjHNM+w36x9wp9r+hf1JstMXtseXDtkiVoARAG6M959AA== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/providers@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.0.tgz#a885cfc7650a64385e7b03ac86fe9c2d4a9c2c63" + integrity sha512-+TTrrINMzZ0aXtlwO/95uhAggKm4USLm1PbeCBR/3XZ7+Oey+3pMyddzZEyRhizHpy1HXV0FRWRMI1O3EGYibA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^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== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/web@5.7.0", "@ethersproject/web@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.0.tgz#40850c05260edad8b54827923bbad23d96aac0bc" + integrity sha512-ApHcbbj+muRASVDSCl/tgxaH2LBkRMEYfLOLVa0COipx0+nlu0QKet7U2lEg0vdkh8XRSLf2nd1f1Uk9SrVSGA== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@google-cloud/datastore@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@google-cloud/datastore/-/datastore-7.0.0.tgz#e026db7d12c773230abf9e6b391a6196ef3fb81b" + integrity sha512-CbvqzqWFtwHqH3EWMWHqKzKiM9dV+/Ga0e1oSr7rO2KA6QBHGvUEBbLxRWirHnt6Xz2drjzIVjVE1tuOENHPlQ== + dependencies: + "@google-cloud/promisify" "^2.0.0" + arrify "^2.0.1" + concat-stream "^2.0.0" + extend "^3.0.2" + google-gax "^3.0.1" + is "^3.3.0" + split-array-stream "^2.0.0" + stream-events "^1.0.5" + +"@google-cloud/promisify@^2.0.0": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@google-cloud/promisify/-/promisify-2.0.4.tgz#9d8705ecb2baa41b6b2673f3a8e9b7b7e1abc52a" + integrity sha512-j8yRSSqswWi1QqUGKVEKOG03Q7qOoZP6/h2zN2YO+F5h2+DHU0bSrHCK9Y7lo2DI9fBd8qGAw795sf+3Jva4yA== + +"@grpc/grpc-js@~1.6.0": + version "1.6.10" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.6.10.tgz#b6584c59ef90aa76d878ac92c21785e602f247ff" + integrity sha512-XTX5z/P5kH802MDoVm/rqOil0UwYEOEjf9+NPgfmm5UINIxDzwYaXfVR6z8svCBG8Hlbu/FzkXqhP8J5xaWzSQ== + dependencies: + "@grpc/proto-loader" "^0.7.0" + "@types/node" ">=12.12.47" + +"@grpc/proto-loader@^0.7.0": + version "0.7.2" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.2.tgz#fa63178853afe1473c50cff89fe572f7c8b20154" + integrity sha512-jCdyLIT/tdQ1zhrbTQnJNK5nbDf0GoBpy5jVNywBzzMDF+Vs6uEaHnfz46dMtDxkvwrF2hzk5Z67goliceH0sA== + dependencies: + "@types/long" "^4.0.1" + lodash.camelcase "^4.3.0" + long "^4.0.0" + protobufjs "^7.0.0" + yargs "^16.2.0" + +"@humanwhocodes/config-array@^0.10.4": + version "0.10.4" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" + integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/gitignore-to-minimatch@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" + integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== + +"@humanwhocodes/object-schema@^1.2.0", "@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + +"@jridgewell/gen-mapping@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" + integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.15" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774" + integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jsdevtools/ono@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" + integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== + +"@types/json-schema@^7.0.6": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + +"@types/linkify-it@*": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-3.0.2.tgz#fd2cd2edbaa7eaac7e7f3c1748b52a19143846c9" + integrity sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA== + +"@types/long@^4.0.0", "@types/long@^4.0.1": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" + integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== + +"@types/markdown-it@^12.2.3": + version "12.2.3" + resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-12.2.3.tgz#0d6f6e5e413f8daaa26522904597be3d6cd93b51" + integrity sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ== + dependencies: + "@types/linkify-it" "*" + "@types/mdurl" "*" + +"@types/mdurl@*": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-1.0.2.tgz#e2ce9d83a613bacf284c7be7d491945e39e1f8e9" + integrity sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA== + +"@types/node@>=12.12.47", "@types/node@>=13.7.0": + version "18.7.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.9.tgz#180bfc495c91dc62573967edf047e15dbdce1491" + integrity sha512-0N5Y1XAdcl865nDdjbO0m3T6FdmQ4ijE89/urOHLREyTXbpMWbSafx9y7XIsgWGtwUP2iYTinLyyW3FatAxBLQ== + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +accepts@~1.3.5, accepts@~1.3.7: + 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-jsx@^5.3.1, acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +acorn@^8.8.0: + version "8.8.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +ajv@^6.10.0, ajv@^6.12.4: + 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.11.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.0.tgz#977e91dd96ca669f54a11e23e378e33b884a565f" + integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-flatten@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-3.0.0.tgz#6428ca2ee52c7b823192ec600fa3ed2f157cd541" + integrity sha512-zPMVc3ZYlGLNk4mpK1NzP2wg0ml9t7fUgDsayR5Y5rSzxQilzR9FGu/EH2jQOcKSAeAfWeylyW8juy3OkWRvNA== + +array-includes@^3.1.4, array-includes@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.flat@^1.2.5: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.0.tgz#a7e8ed4225f4788a70cd910abcf0791e76a5534f" + integrity sha512-PZC9/8TKAIxcWKdyeb77EzULHPrIX/tIZebLJUQOMR1OwYosT8yggdfWScfTBCDj5utONvOuPQQumYsU2ULbkg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + +arrify@^2.0.0, arrify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== + +asap@^2.0.0: + version "2.0.6" + resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +"async@2.1 - 2.6.4": + version "2.6.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" + integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== + dependencies: + lodash "^4.17.14" + +async@^3.2.0: + version "3.2.4" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" + integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== + +axios@^0.21.1: + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== + dependencies: + follow-redirects "^1.14.0" + +axios@^0.26.1: + version "0.26.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9" + integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA== + dependencies: + follow-redirects "^1.14.8" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base64-js@^1.3.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +basic-auth@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" + integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== + dependencies: + safe-buffer "5.1.2" + +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== + +bignumber.js@^9.0.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62" + integrity sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A== + +bluebird@^3.7.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.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.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@2.0.0-beta.1: + version "2.0.0-beta.1" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-2.0.0-beta.1.tgz#d4ed97d6ed51f6040b967db0db2252a0b235a661" + integrity sha512-I1v2bt2OdYqtmk8nEFZuEf+9Opb30DphYwTPDbgg/OorSAoJOuTpWyDrZaSWQw7FdoevbBRCP2+9z/halXSWcA== + dependencies: + bytes "3.1.1" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.8.1" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.9.6" + raw-body "2.4.2" + type-is "~1.6.18" + +body-parser@^1.19.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.0.tgz#3de69bd89011c11573d7bfee6a64f11b6bd27cc5" + integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg== + 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.10.3" + raw-body "2.5.1" + type-is "~1.6.18" + unpipe "1.0.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + +braces@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browserslist@^4.20.2: + version "4.21.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.3.tgz#5df277694eb3c48bc5c4b05af3e8b7e09c5a6d1a" + integrity sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ== + dependencies: + caniuse-lite "^1.0.30001370" + electron-to-chromium "^1.4.202" + node-releases "^2.0.6" + update-browserslist-db "^1.0.5" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== + +buffer-equal-constant-time@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" + integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== + +buffer-from@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +builtins@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== + dependencies: + semver "^7.0.0" + +bytes@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" + integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== + +bytes@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.1.tgz#3f018291cb4cbad9accb6e6970bca9c8889e879a" + integrity sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg== + +bytes@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +call-me-maybe@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha512-wCyFsDQkKPwwF8BDwOiWNx/9K45L/hvggQiDbve+viMNMQnWhrlYIuBk09offfwCRtCO9P6XwUttufzU11WCVw== + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +caniuse-lite@^1.0.30001370: + version "1.0.30001380" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001380.tgz#6f2427ad8ebee1b400a38ca3560515756ba352bb" + integrity sha512-OO+pPubxx16lkI7TVrbFpde8XHz66SMwstl1YWpg6uMGw56XnhYVwtPIjvX4kYpzwMwQKr4DDce394E03dQPGg== + +catharsis@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.9.0.tgz#40382a168be0e6da308c277d3a2b3eb40c7d2121" + integrity sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A== + dependencies: + lodash "^4.17.15" + +"chalk@4.1 - 4.1.2", chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^2.0.0: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone@2.x: + version "2.1.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" + integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== + +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +commander@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.0.tgz#b990bfb8ac030aedc6d11bc04d1488ffef56db75" + integrity sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q== + +commander@^2.7.1: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +compressible@~2.0.16: + version "2.0.18" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.18.tgz#af53cca6b070d4c3c0750fbd77286a6d7cc46fba" + integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== + dependencies: + mime-db ">= 1.43.0 < 2" + +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== + dependencies: + accepts "~1.3.5" + bytes "3.0.0" + compressible "~2.0.16" + debug "2.6.9" + on-headers "~1.0.2" + safe-buffer "5.1.2" + vary "~1.1.2" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + +concat-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-2.0.0.tgz#414cf5af790a48c60ab9be4527d56d5e41133cb1" + integrity sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.0.2" + typedarray "^0.0.6" + +confusing-browser-globals@^1.0.10: + version "1.0.11" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" + integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== + +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-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +convert-source-map@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== + dependencies: + safe-buffer "~5.1.1" + +cookie-parser@^1.4.5: + version "1.4.6" + resolved "https://registry.yarnpkg.com/cookie-parser/-/cookie-parser-1.4.6.tgz#3ac3a7d35a7a03bbc7e365073a26074824214594" + integrity sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA== + dependencies: + cookie "0.4.1" + cookie-signature "1.0.6" + +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.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + +core-js@^3.13.0: + version "3.24.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.24.1.tgz#cf7724d41724154010a6576b7b57d94c5d66e64f" + integrity sha512-0QTBSYSUZ6Gq21utGzkfITDylE8jWC9Ne1D2MrhvlsZBI1x39OdDIVbzSqtgMndIy6BlHxBXpMGqzZmnztg2rg== + +cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +dayjs@^1.8.29: + version "1.11.5" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93" + integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA== + +debug@2.6.9, debug@^2.6.9: + 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@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== + dependencies: + ms "2.0.0" + +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +deep-is@^0.1.3, deep-is@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA== + dependencies: + clone "^1.0.2" + +define-properties@^1.1.3, define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + +depd@2.0.0, depd@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" + integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== + +destroy@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015" + integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg== + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@3.0.0, doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +dotenv@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" + integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== + +duplexify@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-4.1.2.tgz#18b4f8d28289132fa0b9573c898d9f903f81c7b0" + integrity sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw== + dependencies: + end-of-stream "^1.4.1" + inherits "^2.0.3" + readable-stream "^3.1.1" + stream-shift "^1.0.0" + +ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" + integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== + dependencies: + safe-buffer "^5.0.1" + +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-to-chromium@^1.4.202: + version "1.4.225" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.225.tgz#3e27bdd157cbaf19768141f2e0f0f45071e52338" + integrity sha512-ICHvGaCIQR3P88uK8aRtx8gmejbVJyC6bB4LEC3anzBrIzdzC7aiZHY4iFfXhN4st6I7lMO0x4sgBHf/7kBvRw== + +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== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +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== + +end-of-stream@^1.4.1: + 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.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +entities@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5" + integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== + +error-ex@^1.3.1: + 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.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + regexp.prototype.flags "^1.4.3" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.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@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== + +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== + +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" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@^1.13.0: + version "1.14.3" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.14.3.tgz#4e7b81fba61581dc97582ed78cab7f0e8d63f503" + integrity sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== + dependencies: + esprima "^4.0.1" + estraverse "^4.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +eslint-config-airbnb-base@^14.0.0: + version "14.2.1" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" + integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== + dependencies: + confusing-browser-globals "^1.0.10" + object.assign "^4.1.2" + object.entries "^1.1.2" + +eslint-config-airbnb@18.0.1: + version "18.0.1" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-18.0.1.tgz#a3a74cc29b46413b6096965025381df8fb908559" + integrity sha512-hLb/ccvW4grVhvd6CT83bECacc+s4Z3/AEyWQdIT2KeTsG9dR7nx1gs7Iw4tDmGKozCNHFn4yZmRm3Tgy+XxyQ== + dependencies: + eslint-config-airbnb-base "^14.0.0" + object.assign "^4.1.0" + object.entries "^1.1.0" + +eslint-config-standard-jsx@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-11.0.0.tgz#70852d395731a96704a592be5b0bfaccfeded239" + integrity sha512-+1EV/R0JxEK1L0NGolAr8Iktm3Rgotx3BKwgaX+eAuSX8D952LULKtjgZD3F+e6SvibONnhLwoTi9DPxN5LvvQ== + +eslint-config-standard@17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz#fd5b6cf1dcf6ba8d29f200c461de2e19069888cf" + integrity sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg== + +eslint-config-standard@^16.0.3: + version "16.0.3" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz#6c8761e544e96c531ff92642eeb87842b8488516" + integrity sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg== + +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== + dependencies: + debug "^3.2.7" + resolve "^1.20.0" + +eslint-module-utils@^2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== + dependencies: + debug "^3.2.7" + +eslint-plugin-es@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" + integrity sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-es@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9" + integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-import@^2.23.3, eslint-plugin-import@^2.26.0: + version "2.26.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.3" + has "^1.0.3" + is-core-module "^2.8.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.5" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + +eslint-plugin-n@^15.1.0: + version "15.2.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.2.4.tgz#d62021a0821ae650701ed459756aaf478a9b6056" + integrity sha512-tjnVMv2fiXYMnuiIFI8QMtyUFI42SckEEWvi8h68SWGWshfqO6SSCASy24dGMGAiy7NUk6DZt90DM0iNUsmQ5w== + dependencies: + builtins "^5.0.1" + eslint-plugin-es "^4.1.0" + eslint-utils "^3.0.0" + ignore "^5.1.1" + is-core-module "^2.9.0" + minimatch "^3.1.2" + resolve "^1.10.1" + semver "^7.3.7" + +eslint-plugin-node@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz#c95544416ee4ada26740a30474eefc5402dc671d" + integrity sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g== + dependencies: + eslint-plugin-es "^3.0.0" + eslint-utils "^2.0.0" + ignore "^5.1.1" + minimatch "^3.0.4" + resolve "^1.10.1" + semver "^6.1.0" + +eslint-plugin-promise@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-5.2.0.tgz#a596acc32981627eb36d9d75f9666ac1a4564971" + integrity sha512-SftLb1pUG01QYq2A/hGAWfDRXqYD82zE7j7TopDOyNdU+7SvvoXREls/+PRTY17vUXzXnZA/zfnyKgRH6x4JJw== + +eslint-plugin-promise@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz#017652c07c9816413a41e11c30adc42c3d55ff18" + integrity sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw== + +eslint-plugin-react@^7.28.0: + version "7.30.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.30.1.tgz#2be4ab23ce09b5949c6631413ba64b2810fd3e22" + integrity sha512-NbEvI9jtqO46yJA3wcRF9Mo0lF9T/jhdHqhCHXiXtD+Zcb98812wvokjWpU7Q4QH5edo6dmqrukxVvWWXHlsUg== + dependencies: + array-includes "^3.1.5" + array.prototype.flatmap "^1.3.0" + doctrine "^2.1.0" + estraverse "^5.3.0" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.5" + object.fromentries "^2.0.5" + object.hasown "^1.1.1" + object.values "^1.1.5" + prop-types "^15.8.1" + resolve "^2.0.0-next.3" + semver "^6.3.0" + string.prototype.matchall "^4.0.7" + +eslint-plugin-standard@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-5.0.0.tgz#c43f6925d669f177db46f095ea30be95476b1ee4" + integrity sha512-eSIXPc9wBM4BrniMzJRBm2uoVuXz2EPa+NXPk2+itrVt+r5SbKFERx/IgrK/HmfjddyKVz2f+j+7gBRvu19xLg== + +eslint-rule-composer@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz#79320c927b0c5c0d3d3d2b76c8b4a488f25bbaf9" + integrity sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg== + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-utils@^2.0.0, eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + +eslint@^7.26.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +eslint@^8.13.0: + version "8.22.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.22.0.tgz#78fcb044196dfa7eef30a9d65944f6f980402c48" + integrity sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA== + dependencies: + "@eslint/eslintrc" "^1.3.0" + "@humanwhocodes/config-array" "^0.10.4" + "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + doctrine "^3.0.0" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.1" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.3.0" + espree "^9.3.3" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + find-up "^5.0.0" + functional-red-black-tree "^1.0.1" + glob-parent "^6.0.1" + globals "^13.15.0" + globby "^11.1.0" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^4.1.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.1" + regexpp "^3.2.0" + strip-ansi "^6.0.1" + strip-json-comments "^3.1.0" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + +espree@^9.0.0, espree@^9.3.2, espree@^9.3.3: + version "9.3.3" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.3.tgz#2dd37c4162bb05f433ad3c1a52ddf8a49dc08e9d" + integrity sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1, estraverse@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +esutils@^2.0.2: + version "2.0.3" + 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== + +ethers@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.0.tgz#0055da174b9e076b242b8282638bc94e04b39835" + integrity sha512-5Xhzp2ZQRi0Em+0OkOcRHxPzCfoBfgtOQA+RUylSkuHbhTEaQklnYi2hsWbRgs3ztJsXVXd9VKBcO1ScWL8YfA== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.0" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.0" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.0" + "@ethersproject/wordlists" "5.7.0" + +event-target-shim@^5.0.0: + version "5.0.1" + 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== + +exponential-backoff@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.0.tgz#9409c7e579131f8bd4b32d7d8094a911040f2e68" + integrity sha512-oBuz5SYz5zzyuHINoe9ooePwSu0xApKWgeNzok4hZ5YKXFh9zrQBEM15CXqoZkJJPuI2ArvqjPQd8UKJA753XA== + +express-fingerprint@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/express-fingerprint/-/express-fingerprint-1.2.2.tgz#bd641a233b6b45096f9c393cf0ad8ae7db7d79a1" + integrity sha512-d+Sw/aEXGslqn4dFoGKliqVghcuiBNY6AAxGGHMz6KcRkMxX+GlrY6TkTmHhCQP/b22KzuXzD9fahDeA1Vq5OQ== + dependencies: + async "^3.2.0" + geoip-lite "^1.4.2" + murmurhash3js "^3.0.1" + traverse "^0.6.6" + useragent "^2.3.0" + +express-rate-limit@^5.3.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/express-rate-limit/-/express-rate-limit-5.5.1.tgz#110c23f6a65dfa96ab468eda95e71697bc6987a2" + integrity sha512-MTjE2eIbHv5DyfuFz4zLYWxpqVhEhkTiwFGuB74Q9CSou2WHO52nlE5y3Zlg6SIsiYUIPj6ifFxnkPz6O3sIUg== + +express-slow-down@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/express-slow-down/-/express-slow-down-1.4.0.tgz#89e0aef6c3bb3602b70f06e0824889bd2362cc21" + integrity sha512-Tw5aa0plPj2STiuc2SyMw2VSjMvBgLGQHHoPhkIL4iPQcFZDueWBaiLxFZ3SrwrJhiu3b3sHNcsP6lXeWnbwAw== + dependencies: + defaults "^1.0.3" + +express@5.0.0-beta.1: + version "5.0.0-beta.1" + resolved "https://registry.yarnpkg.com/express/-/express-5.0.0-beta.1.tgz#efbfd372e4650a48e417b1adbaf43599092ddc8f" + integrity sha512-KPtBrlZoQu2Ps0Ce/Imqtq73AB0KBJ8Gx59yZQ3pmDJU2/LhcoZETo03oSgtTQufbcLXt/WBITk/jMjl/WMyrQ== + dependencies: + accepts "~1.3.7" + array-flatten "3.0.0" + body-parser "2.0.0-beta.1" + content-disposition "0.5.4" + content-type "~1.0.4" + cookie "0.4.1" + cookie-signature "1.0.6" + debug "3.1.0" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + mime-types "~2.1.34" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-is-absolute "1.0.1" + proxy-addr "~2.0.7" + qs "6.9.6" + range-parser "~1.2.1" + router "2.0.0-beta.1" + safe-buffer "5.2.1" + send "1.0.0-beta.1" + serve-static "2.0.0-beta.1" + setprototypeof "1.2.0" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.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== + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + 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, fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + +fast-text-encoding@^1.0.0, fast-text-encoding@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.4.tgz#bf1898ad800282a4e53c0ea9690704dd26e4298e" + integrity sha512-x6lDDm/tBAzX9kmsPcZsNbvDs3Zey3+scsxaZElS8xWLgUMAg/oFLeewfUz0mu1CblHhhsu15jGkraldkFh8KQ== + +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g== + dependencies: + pend "~1.2.0" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.1.0: + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== + +follow-redirects@^1.14.0, follow-redirects@^1.14.8: + version "1.15.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" + integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +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-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +gaxios@^5.0.0, gaxios@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-5.0.1.tgz#50fc76a2d04bc1700ed8c3ff1561e52255dfc6e0" + integrity sha512-keK47BGKHyyOVQxgcUaSaFvr3ehZYAlvhvpHXy0YB2itzZef+GqZR8TBsfVRWghdwlKrYsn+8L8i3eblF7Oviw== + dependencies: + extend "^3.0.2" + https-proxy-agent "^5.0.0" + is-stream "^2.0.0" + node-fetch "^2.6.7" + +gcp-metadata@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-5.0.0.tgz#a00f999f60a4461401e7c515f8a3267cfb401ee7" + integrity sha512-gfwuX3yA3nNsHSWUL4KG90UulNiq922Ukj3wLTrcnX33BB7PwB1o0ubR8KVvXu9nJH+P5w1j2SQSNNqto+H0DA== + dependencies: + gaxios "^5.0.0" + json-bigint "^1.0.0" + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +geoip-lite@^1.4.2: + version "1.4.6" + resolved "https://registry.yarnpkg.com/geoip-lite/-/geoip-lite-1.4.6.tgz#cb20c47be5173e5da4dd9678420b4524c2778c73" + integrity sha512-JiG2zqGhFPJU/Zz//XkSfUJAaCWEz8rBi3k7RbNDEYkxGSkmguGNirJ1Q5C2ADKTMY7RqDRdxIbiX55zzZ5eJw== + dependencies: + async "2.1 - 2.6.4" + chalk "4.1 - 4.1.2" + iconv-lite "0.4.13 - 0.6.3" + ip-address "5.8.9 - 5.9.4" + lazy "1.0.11" + rimraf "2.5.2 - 2.7.1" + yauzl "2.9.2 - 2.10.0" + +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" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +get-stdin@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" + integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== + +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" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +glob-parent@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + +glob@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.1.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^8.0.0: + version "8.0.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" + integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^13.15.0, globals@^13.6.0, globals@^13.9.0: + version "13.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== + dependencies: + type-fest "^0.20.2" + +globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + +google-auth-library@^8.0.2: + version "8.3.0" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-8.3.0.tgz#9286a613ee089f1d1728c07b9a302a22acf2dc2a" + integrity sha512-rXasaUScggvyD5ELpQC7SIOUOdqyOIifCK9TRDOLFEcuw1JxuyewKAwDs2QiKzMf8uLa0L360W0bVlV+sJDc8g== + dependencies: + arrify "^2.0.0" + base64-js "^1.3.0" + ecdsa-sig-formatter "^1.0.11" + fast-text-encoding "^1.0.0" + gaxios "^5.0.0" + gcp-metadata "^5.0.0" + gtoken "^6.0.0" + jws "^4.0.0" + lru-cache "^6.0.0" + +google-gax@^3.0.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-3.2.1.tgz#1562ac3f7e0403daa114ee47f5f821eaa9498a78" + integrity sha512-vWUFzAd/WaEgTOIMuQjjsGC9awlHy5Kl83kO+mVibSTloQjWlfa1k5FklFpnFMCcusMJvGgg0PlzDZS8sl0w8w== + dependencies: + "@grpc/grpc-js" "~1.6.0" + "@grpc/proto-loader" "^0.7.0" + "@types/long" "^4.0.0" + abort-controller "^3.0.0" + duplexify "^4.0.0" + fast-text-encoding "^1.0.3" + google-auth-library "^8.0.2" + is-stream-ended "^0.1.4" + node-fetch "^2.6.1" + object-hash "^3.0.0" + proto3-json-serializer "^1.0.0" + protobufjs "7.0.0" + protobufjs-cli "1.0.0" + retry-request "^5.0.0" + +google-p12-pem@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-4.0.0.tgz#f46581add1dc6ea0b96160cda6ce37ee35ab8ca3" + integrity sha512-lRTMn5ElBdDixv4a86bixejPSRk1boRtUowNepeKEVvYiFlkLuAJUVpEz6PfObDHYEKnZWq/9a2zC98xu62A9w== + dependencies: + node-forge "^1.3.1" + +graceful-fs@^4.1.15, graceful-fs@^4.1.9: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + +gtoken@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-6.1.1.tgz#29ebf3e6893719176d180f5694f1cad525ce3c04" + integrity sha512-HPM4VzzPEGxjQ7T2xLrdSYBs+h1c0yHAUiN+8RHPDoiZbndlpg9Sx3SjWcrTt9+N3FHsSABEpjvdQVan5AAuZQ== + dependencies: + gaxios "^5.0.1" + google-p12-pem "^4.0.0" + jws "^4.0.0" + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +http-errors@1.8.1, http-errors@^1.8.0: + version "1.8.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c" + integrity sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.1" + +http-errors@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3" + integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== + dependencies: + depd "2.0.0" + inherits "2.0.4" + setprototypeof "1.2.0" + statuses "2.0.1" + toidentifier "1.0.1" + +http-status-codes@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/http-status-codes/-/http-status-codes-2.2.0.tgz#bb2efe63d941dfc2be18e15f703da525169622be" + integrity sha512-feERVo9iWxvnejp3SEfm/+oNG517npqL2/PIA8ORjyOZjGC7TwCRQsZylciLS64i6pJ0wRYz3rkXLRwbtFa8Ng== + +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" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + +"iconv-lite@0.4.13 - 0.6.3": + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.1.1, ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.3, inherits@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + +"ip-address@5.8.9 - 5.9.4": + version "5.9.4" + resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-5.9.4.tgz#4660ac261ad61bd397a860a007f7e98e4eaee386" + integrity sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw== + dependencies: + jsbn "1.1.0" + lodash "^4.17.15" + sprintf-js "1.1.2" + +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== + +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" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-callable@^1.1.4, is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + +is-core-module@^2.8.1, is-core-module@^2.9.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== + +is-fullwidth-code-point@^3.0.0: + version "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-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + +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" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + +is-stream-ended@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/is-stream-ended/-/is-stream-ended-0.1.4.tgz#f50224e95e06bce0e356d440a4827cd35b267eda" + integrity sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw== + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + +is@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/is/-/is-3.3.0.tgz#61cff6dd3c4193db94a3d62582072b44e5645d79" + integrity sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg== + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== + +js-sha3@0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + +js2xmlparser@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-4.0.2.tgz#2a1fdf01e90585ef2ae872a01bc169c6a8d5e60a" + integrity sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA== + dependencies: + xmlcreate "^2.0.4" + +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + +jsdoc@^3.6.3: + version "3.6.11" + resolved "https://registry.yarnpkg.com/jsdoc/-/jsdoc-3.6.11.tgz#8bbb5747e6f579f141a5238cbad4e95e004458ce" + integrity sha512-8UCU0TYeIYD9KeLzEcAu2q8N/mx9O3phAGl32nmHlE0LpaJL71mMkP4d+QE5zWfNt50qheHtOZ0qoxVrsX5TUg== + dependencies: + "@babel/parser" "^7.9.4" + "@types/markdown-it" "^12.2.3" + bluebird "^3.7.2" + catharsis "^0.9.0" + escape-string-regexp "^2.0.0" + js2xmlparser "^4.0.2" + klaw "^3.0.0" + markdown-it "^12.3.2" + markdown-it-anchor "^8.4.1" + marked "^4.0.10" + mkdirp "^1.0.4" + requizzle "^0.2.3" + strip-json-comments "^3.1.0" + taffydb "2.6.2" + underscore "~1.13.2" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-bigint@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-1.0.0.tgz#ae547823ac0cad8398667f8cd9ef4730f5b01ff1" + integrity sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ== + dependencies: + bignumber.js "^9.0.0" + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +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-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg== + dependencies: + jsonify "~0.0.0" + +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + +json5@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + integrity sha512-trvBk1ki43VZptdBI5rIlG4YOzyeH/WefQt5rj1grasPn4iiZWKet8nkgc4GlsAylaztn0qZfUYOiTsASJFdNA== + +jsonwebtoken@^8.5.1: + version "8.5.1" + resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz#00e71e0b8df54c2121a1f26137df2280673bcc0d" + integrity sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w== + dependencies: + jws "^3.2.2" + lodash.includes "^4.3.0" + lodash.isboolean "^3.0.3" + lodash.isinteger "^4.0.4" + lodash.isnumber "^3.0.3" + lodash.isplainobject "^4.0.6" + lodash.isstring "^4.0.1" + lodash.once "^4.0.0" + ms "^2.1.1" + semver "^5.6.0" + +jssha@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jssha/-/jssha-3.2.0.tgz#88ec50b866dd1411deaddbe6b3e3692e4c710f16" + integrity sha512-QuruyBENDWdN4tZwJbQq7/eAK85FqrI4oDbXjy5IBhYD+2pTJyBUWZe8ctWaCkrV0gy6AaelgOZZBMeswEa/6Q== + +"jsx-ast-utils@^2.4.1 || ^3.0.0": + version "3.3.3" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz#76b3e6e6cece5c69d49a5792c3d01bd1a0cdc7ea" + integrity sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw== + dependencies: + array-includes "^3.1.5" + object.assign "^4.1.3" + +jwa@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" + integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jwa@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc" + integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== + dependencies: + buffer-equal-constant-time "1.0.1" + ecdsa-sig-formatter "1.0.11" + safe-buffer "^5.0.1" + +jws@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" + integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== + dependencies: + jwa "^1.4.1" + safe-buffer "^5.0.1" + +jws@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4" + integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== + dependencies: + jwa "^2.0.0" + safe-buffer "^5.0.1" + +keccak@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.2.tgz#4c2c6e8c54e04f2670ee49fa734eb9da152206e0" + integrity sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + readable-stream "^3.6.0" + +klaw@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146" + integrity sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g== + dependencies: + graceful-fs "^4.1.9" + +lazy@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/lazy/-/lazy-1.0.11.tgz#daa068206282542c088288e975c297c1ae77b690" + integrity sha512-Y+CjUfLmIpoUCCRl0ub4smrYtGGr5AOa2AKOaWelGHOGz33X/Y/KizefGqbkwfz44+cnq/+9habclf8vOmu2LA== + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +linkify-it@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e" + integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ== + dependencies: + uc.micro "^1.0.1" + +load-json-file@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-5.3.0.tgz#4d3c1e01fa1c03ea78a60ac7af932c9ce53403f3" + integrity sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw== + dependencies: + graceful-fs "^4.1.15" + parse-json "^4.0.0" + pify "^4.0.1" + strip-bom "^3.0.0" + type-fest "^0.3.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +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.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== + +lodash.includes@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f" + integrity sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w== + +lodash.isboolean@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6" + integrity sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg== + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + +lodash.isinteger@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343" + integrity sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA== + +lodash.isnumber@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc" + integrity sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw== + +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA== + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw== + +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.mergewith@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" + integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== + +lodash.once@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== + +lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +long@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + +long@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.0.tgz#2696dadf4b4da2ce3f6f6b89186085d94d52fd61" + integrity sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w== + +loose-envify@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +lru-cache@4.1.x: + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +markdown-it-anchor@^8.4.1: + version "8.6.4" + resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-8.6.4.tgz#affb8aa0910a504c114e9fcad53ac3a5b907b0e6" + integrity sha512-Ul4YVYZNxMJYALpKtu+ZRdrryYt/GlQ5CK+4l1bp/gWXOG2QWElt6AqF3Mih/wfUKdZbNAZVXGR73/n6U/8img== + +markdown-it@^12.3.2: + version "12.3.2" + resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.3.2.tgz#bf92ac92283fe983fe4de8ff8abfb5ad72cd0c90" + integrity sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg== + dependencies: + argparse "^2.0.1" + entities "~2.1.0" + linkify-it "^3.0.1" + mdurl "^1.0.1" + uc.micro "^1.0.5" + +marked@^4.0.10: + version "4.0.19" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.19.tgz#d36198d1ac1255525153c351c68c75bc1d7aee46" + integrity sha512-rgQF/OxOiLcvgUAj1Q1tAf4Bgxn5h5JZTp04Fx4XUkVhs7B+7YA9JEWJhJpoO8eJt8MkZMwqLCNeNqj1bCREZQ== + +mdurl@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" + integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== + +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== + +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== + +merge2@^1.3.0, merge2@^1.4.1: + version "1.4.1" + 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== + +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + +mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": + version "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.24, mime-types@~2.1.34: + 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" + +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" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + +minimatch@^5.0.1: + version "5.1.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" + integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== + dependencies: + brace-expansion "^2.0.1" + +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + +minipass@^3.0.0: + version "3.3.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.4.tgz#ca99f95dd77c43c7a76bf51e6d200025eee0ffae" + integrity sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw== + dependencies: + yallist "^4.0.0" + +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +moment@^2.29.1: + version "2.29.4" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" + integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== + +morgan@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.10.0.tgz#091778abc1fc47cd3509824653dae1faab6b17d7" + integrity sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ== + dependencies: + basic-auth "~2.0.1" + debug "2.6.9" + depd "~2.0.0" + on-finished "~2.3.0" + on-headers "~1.0.2" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +murmurhash3js@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/murmurhash3js/-/murmurhash3js-3.0.1.tgz#3e983e5b47c2a06f43a713174e7e435ca044b998" + integrity sha512-KL8QYUaxq7kUbcl0Yto51rMcYt7E/4N4BG3/c96Iqw1PQrTRspu8Cpx4TZ4Nunib1d4bEkIH3gjCYlP2RLBdow== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + +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== + +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" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-cache@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/node-cache/-/node-cache-5.1.2.tgz#f264dc2ccad0a780e76253a694e9fd0ed19c398d" + integrity sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg== + dependencies: + clone "2.x" + +node-fetch@^2.6.1, node-fetch@^2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + +node-forge@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" + integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== + +node-gyp-build@^4.2.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" + integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== + +node-releases@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== + +object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== + +object-hash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9" + integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw== + +object-inspect@^1.12.0, object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.0, object.assign@^4.1.2, object.assign@^4.1.3: + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.entries@^1.1.0, object.entries@^1.1.2, object.entries@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.5.tgz#e1acdd17c4de2cd96d5a08487cfb9db84d881861" + integrity sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +object.fromentries@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.5.tgz#7b37b205109c21e741e605727fe8b0ad5fa08251" + integrity sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +object.hasown@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.1.tgz#ad1eecc60d03f49460600430d97f23882cf592a3" + integrity sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A== + dependencies: + define-properties "^1.1.4" + es-abstract "^1.19.5" + +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + +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" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== + dependencies: + ee-first "1.1.1" + +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + +once@^1.3.0, once@^1.4.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== + dependencies: + wrappy "1" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +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-limit@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw== + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +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== + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ== + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@1.0.1, path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.2.0.tgz#fa7877ecbc495c601907562222453c43cc204a5f" + integrity sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA== + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== + +phone@^3.1.22: + version "3.1.25" + resolved "https://registry.yarnpkg.com/phone/-/phone-3.1.25.tgz#de5f8238110375831f953535c65c28e98347cfea" + integrity sha512-VA3vWF1WV/0DrpXRnANpZVQpT6wWO8GUdmz6RzyMNfSEV9qWZ2pX6fLYUXAIaYhMs/Bievqv5aXQTkK+e2Wp+Q== + +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + +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@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pkg-conf@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-3.1.0.tgz#d9f9c75ea1bae0e77938cde045b276dac7cc69ae" + integrity sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ== + dependencies: + find-up "^3.0.0" + load-json-file "^5.2.0" + +pop-iterate@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pop-iterate/-/pop-iterate-1.0.1.tgz#ceacfdab4abf353d7a0f2aaa2c1fc7b3f9413ba3" + integrity sha512-HRCx4+KJE30JhX84wBN4+vja9bNfysxg1y28l0DuJmkoaICiv2ZSilKddbS48pq50P8d2erAhqDLbp47yv3MbQ== + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +prop-types@^15.8.1: + version "15.8.1" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" + integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.13.1" + +proto3-json-serializer@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/proto3-json-serializer/-/proto3-json-serializer-1.0.3.tgz#c23a037eb7c3c7d963a0976fa8b09e942ac83fbe" + integrity sha512-4Xo7uzbTfc8ur9R8VgI0pJpI6aHix76cc7DHJEfZKrZ6vOUbOddxBrsMzAGG2s6b3iHknl4Gn50dA2Y3AoCdow== + dependencies: + protobufjs "^7.0.0" + +protobufjs-cli@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/protobufjs-cli/-/protobufjs-cli-1.0.0.tgz#62f99de142118f34c7b4ee53c2dc122612d2711c" + integrity sha512-7NZEBrFuuU2ZdzlhmAmvh8fdU7A4OFhzYX9AB7a5vXjopAeiks6ZgUSjOlOO7ItCDJQm3y9RWjk7spUbHc4X0w== + dependencies: + chalk "^4.0.0" + escodegen "^1.13.0" + espree "^9.0.0" + estraverse "^5.1.0" + glob "^8.0.0" + jsdoc "^3.6.3" + minimist "^1.2.0" + semver "^7.1.2" + tmp "^0.2.1" + uglify-js "^3.7.7" + +protobufjs@7.0.0, protobufjs@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.0.0.tgz#8c678e1351fd926178fce5a4213913e8d990974f" + integrity sha512-ffNIEm+quOcYtQvHdW406v1NQmZSuqVklxsXk076BtuFnlYZfigLU+JOMrTD8TUOyqHYbRI/fSVNvgd25YeN3w== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/long" "^4.0.1" + "@types/node" ">=13.7.0" + long "^5.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" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== + +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +q@2.0.x: + version "2.0.3" + resolved "https://registry.yarnpkg.com/q/-/q-2.0.3.tgz#75b8db0255a1a5af82f58c3f3aaa1efec7d0d134" + integrity sha512-gv6vLGcmAOg96/fgo3d9tvA4dJNZL3fMyBqVRrGxQ+Q/o4k9QzbJ3NQF9cOO/71wRodoXhaPgphvMFU68qVAJQ== + dependencies: + asap "^2.0.0" + pop-iterate "^1.0.1" + weak-map "^1.0.5" + +qs@6.10.3: + version "6.10.3" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.3.tgz#d6cde1b2ffca87b5aa57889816c5f81535e22e8e" + integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== + dependencies: + side-channel "^1.0.4" + +qs@6.9.6: + version "6.9.6" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.6.tgz#26ed3c8243a431b2924aca84cc90471f35d5a0ee" + integrity sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ== + +qs@^6.9.4: + 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" + +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +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.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.2.tgz#baf3e9c21eebced59dd6533ac872b71f7b61cb32" + integrity sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ== + dependencies: + bytes "3.1.1" + http-errors "1.8.1" + iconv-lite "0.4.24" + unpipe "1.0.0" + +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" + +react-is@^16.13.1: + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" + integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== + +readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +regexp.prototype.flags@^1.4.1, regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" + +regexpp@^3.0.0, regexpp@^3.1.0, regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +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@^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== + +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + +requizzle@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/requizzle/-/requizzle-0.2.3.tgz#4675c90aacafb2c036bd39ba2daa4a1cb777fded" + integrity sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ== + dependencies: + lodash "^4.17.14" + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve@^1.10.1, resolve@^1.20.0, resolve@^1.22.0: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +resolve@^2.0.0-next.3: + version "2.0.0-next.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" + integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + +retry-request@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-5.0.1.tgz#c6be2a4a36f1554ba3251fa8fd945af26ee0e9ec" + integrity sha512-lxFKrlBt0OZzCWh/V0uPEN0vlr3OhdeXnpeY5OES+ckslm791Cb1D5P7lJUSnY7J5hiCjcyaUGmzCnIGDCUBig== + dependencies: + debug "^4.1.1" + extend "^3.0.2" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +"rimraf@2.5.2 - 2.7.1": + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.0, rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rootpath@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/rootpath/-/rootpath-0.1.2.tgz#5b379a87dca906e9b91d690a599439bef267ea6b" + integrity sha512-R3wLbuAYejpxQjL/SjXo1Cjv4wcJECnMRT/FlcCfTwCBhaji9rWaRCoVEQ1SPiTJ4kKK+yh+bZLAV7SCafoDDw== + +router@2.0.0-beta.1: + version "2.0.0-beta.1" + resolved "https://registry.yarnpkg.com/router/-/router-2.0.0-beta.1.tgz#86fb03143cee259497d8b658c7f13b1d20049331" + integrity sha512-GLoYgkhAGAiwVda5nt6Qd4+5RAPuQ4WIYLlZ+mxfYICI+22gnIB3eCfmhgV8+uJNPS1/39DOYi/vdrrz0/ouKA== + dependencies: + array-flatten "3.0.0" + methods "~1.1.2" + parseurl "~1.3.3" + path-to-regexp "3.2.0" + setprototypeof "1.2.0" + utils-merge "1.0.1" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +safe-buffer@5.1.2, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@5.2.1, safe-buffer@^5.0.1, 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== + +"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== + +scmp@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/scmp/-/scmp-2.1.0.tgz#37b8e197c425bdeb570ab91cc356b311a11f9c9a" + integrity sha512-o/mRQGk9Rcer/jEEw/yw4mwo3EU/NvYvp577/Btqrym9Qy5/MdWGBqipbALgd2lrdWTJ5/gqDusxfnQBxOxT2Q== + +scrypt-js@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +semver@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.1.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.0.0, semver@^7.1.2, semver@^7.2.1, semver@^7.3.7: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + +send@1.0.0-beta.1: + version "1.0.0-beta.1" + resolved "https://registry.yarnpkg.com/send/-/send-1.0.0-beta.1.tgz#9db741443b0b25771cfd38adc833376ae2d606fe" + integrity sha512-OKTRokcl/oo34O8+6aUpj8Jf2Bjw2D0tZzmX0/RvyfVC9ZOZW+HPAWAlhS817IsRaCnzYX1z++h2kHFr2/KNRg== + dependencies: + debug "3.1.0" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "1.8.1" + mime-types "~2.1.34" + ms "2.1.3" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serve-static@2.0.0-beta.1: + version "2.0.0-beta.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-2.0.0-beta.1.tgz#003bc35db8b37905e1f6d380a4ccc0a34f30ec1d" + integrity sha512-DEJ9on/tQeFO2Omj7ovT02lCp1YgP4Kb8W2lv2o/4keTFAbgc8HtH3yPd47++2wv9lvQeqiA7FHFDe5+8c4XpA== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "1.0.0-beta.1" + +setprototypeof@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" + integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +split-array-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/split-array-stream/-/split-array-stream-2.0.0.tgz#85a4f8bfe14421d7bca7f33a6d176d0c076a53b1" + integrity sha512-hmMswlVY91WvGMxs0k8MRgq8zb2mSen4FmDNc5AFiTWtrBpdZN6nwD6kROVe4vNL+ywrvbCKsWVCnEd4riELIg== + dependencies: + is-stream-ended "^0.1.4" + +sprintf-js@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" + integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== + +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== + +standard-engine@^15.0.0: + version "15.0.0" + resolved "https://registry.yarnpkg.com/standard-engine/-/standard-engine-15.0.0.tgz#e37ca2e1a589ef85431043a3e87cb9ce95a4ca4e" + integrity sha512-4xwUhJNo1g/L2cleysUqUv7/btn7GEbYJvmgKrQ2vd/8pkTmN8cpqAZg+BT8Z1hNeEH787iWUdOpL8fmApLtxA== + dependencies: + get-stdin "^8.0.0" + minimist "^1.2.6" + pkg-conf "^3.1.0" + xdg-basedir "^4.0.0" + +standard@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/standard/-/standard-17.0.0.tgz#85718ecd04dc4133908434660788708cca855aa1" + integrity sha512-GlCM9nzbLUkr+TYR5I2WQoIah4wHA2lMauqbyPLV/oI5gJxqhHzhjl9EG2N0lr/nRqI3KCbCvm/W3smxvLaChA== + dependencies: + eslint "^8.13.0" + eslint-config-standard "17.0.0" + eslint-config-standard-jsx "^11.0.0" + eslint-plugin-import "^2.26.0" + eslint-plugin-n "^15.1.0" + eslint-plugin-promise "^6.0.0" + eslint-plugin-react "^7.28.0" + standard-engine "^15.0.0" + +statuses@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63" + integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== + +stream-events@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/stream-events/-/stream-events-1.0.5.tgz#bbc898ec4df33a4902d892333d47da9bf1c406d5" + integrity sha512-E1GUzBSgvct8Jsb3v2X15pjzN1tYebtbLaMg+eBOUOAxgbLoSbT2NS91ckc5lJD1KfLjId+jXJRgo0qnV5Nerg== + dependencies: + stubs "^3.0.0" + +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string.prototype.matchall@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz#8e6ecb0d8a1fb1fda470d81acecb2dba057a481d" + integrity sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + get-intrinsic "^1.1.1" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + regexp.prototype.flags "^1.4.1" + side-channel "^1.0.4" + +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + +strip-json-comments@^3.1.0, 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" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +stubs@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b" + integrity sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw== + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +supports-preserve-symlinks-flag@^1.0.0: + version "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== + +swagger-jsdoc@^6.2.5: + version "6.2.5" + resolved "https://registry.yarnpkg.com/swagger-jsdoc/-/swagger-jsdoc-6.2.5.tgz#65bffa142276436b2b131255f59a6b55384a0e8e" + integrity sha512-l+cdsKS2y+QDhrH1TJSUiE0y9XKuf5xaGSatjf0hR/wjTlMpO8WfubBK9d/nASdbHPMtj9iJZLBH2ogBEhL7Sw== + dependencies: + commander "6.2.0" + doctrine "3.0.0" + glob "7.1.6" + lodash.mergewith "^4.6.2" + swagger-parser "10.0.2" + yaml "2.0.0-1" + +swagger-parser@10.0.2: + version "10.0.2" + resolved "https://registry.yarnpkg.com/swagger-parser/-/swagger-parser-10.0.2.tgz#d7f18faa09c9c145e938977c9bd6c3435998b667" + integrity sha512-9jHkHM+QXyLGFLk1DkXBwV+4HyNm0Za3b8/zk/+mjr8jgOSiqm3FOTHBSDsBjtn9scdL+8eWcHdupp2NLM8tDw== + dependencies: + "@apidevtools/swagger-parser" "10.0.2" + +swagger-ui-dist@>=4.11.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/swagger-ui-dist/-/swagger-ui-dist-4.14.0.tgz#e34d807464eb84578c43902e393084a1a6fbda52" + integrity sha512-TBzhheU15s+o54Cgk9qxuYcZMiqSm/SkvKnapoGHOF66kz0Y5aGjpzj5BT/vpBbn6rTPJ9tUYXQxuDWfsjiGMw== + +swagger-ui-express@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/swagger-ui-express/-/swagger-ui-express-4.5.0.tgz#feb1314627092eb9c7e6b65ee018927011445530" + integrity sha512-DHk3zFvsxrkcnurGvQlAcLuTDacAVN1JHKDgcba/gr2NFRE4HGwP1YeHIXMiGznkWR4AeS7X5vEblNn4QljuNA== + dependencies: + swagger-ui-dist ">=4.11.0" + +table@^6.0.9: + version "6.8.0" + resolved "https://registry.yarnpkg.com/table/-/table-6.8.0.tgz#87e28f14fa4321c3377ba286f07b79b281a3b3ca" + integrity sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA== + dependencies: + ajv "^8.0.1" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + +taffydb@2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.6.2.tgz#7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268" + integrity sha512-y3JaeRSplks6NYQuCOj3ZFMO3j60rTwbuKCvZxsAraGYH2epusatvZ0baZYA01WsGqJBq/Dl6vOrMUJqyMj8kA== + +tar@>=4.4.15: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + +tmp@0.0.x: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +tmp@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" + integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +traverse@^0.6.6: + version "0.6.6" + resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" + integrity sha512-kdf4JKs8lbARxWdp7RKdNzoJBhGUcIalSYibuGyHJbmk40pOysQ0+QPvlkCOICOivDWU2IJo2rkrxyTK2AH4fw== + +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + +twilio@^3.79.0: + version "3.80.1" + resolved "https://registry.yarnpkg.com/twilio/-/twilio-3.80.1.tgz#4d9ad8221c86c4b70acd81ca1e60c245988a6449" + integrity sha512-eFqYefcuFCoHU3nSsYFdWjBpbzj3EdMl+kBwB1Uhv3+YC/Zt/WhEMZRG9YQqdQvApEhFlNSiO8YAvqvOvUN36w== + dependencies: + axios "^0.26.1" + dayjs "^1.8.29" + https-proxy-agent "^5.0.0" + jsonwebtoken "^8.5.1" + lodash "^4.17.21" + q "2.0.x" + qs "^6.9.4" + rootpath "^0.1.2" + scmp "^2.1.0" + url-parse "^1.5.9" + xmlbuilder "^13.0.2" + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== + dependencies: + prelude-ls "~1.1.2" + +type-fest@^0.20.2: + version "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== + +type-fest@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" + integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== + +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" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== + +ua-parser-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.2.tgz#e2976c34dbfb30b15d2c300b2a53eac87c57a775" + integrity sha512-00y/AXhx0/SsnI51fTc0rLRmafiGOM4/O+ny10Ps7f+j/b8p/ZY11ytMgznXkOVo4GQ+KwQG5UQLkLGirsACRg== + +uc.micro@^1.0.1, uc.micro@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac" + integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA== + +uglify-js@^3.7.7: + version "3.17.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85" + integrity sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + +underscore@~1.13.2: + version "1.13.4" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.4.tgz#7886b46bbdf07f768e0052f1828e1dcab40c0dee" + integrity sha512-BQFnUDuAQ4Yf/cYY5LNrK9NCJFKriaRbD9uR1fTeXnBeoa97W0i41qkZfGO9pSo8I5KzjAcSY2XYtdf0oKd7KQ== + +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== + +update-browserslist-db@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38" + integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +url-parse@^1.5.9: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + +useragent@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/useragent/-/useragent-2.3.0.tgz#217f943ad540cb2128658ab23fc960f6a88c9972" + integrity sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw== + dependencies: + lru-cache "4.1.x" + tmp "0.0.x" + +util-deprecate@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +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@^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== + +v8-compile-cache@^2.0.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + +validator@^13.6.0: + version "13.7.0" + resolved "https://registry.yarnpkg.com/validator/-/validator-13.7.0.tgz#4f9658ba13ba8f3d82ee881d3516489ea85c0857" + integrity sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw== + +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== + +weak-map@^1.0.5: + version "1.0.8" + resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.8.tgz#394c18a9e8262e790544ed8b55c6a4ddad1cb1a3" + integrity sha512-lNR9aAefbGPpHO7AEnY0hCFjz1eTkWCXYvkTRrTHs9qv8zJp+SkVYpzfLIFXQQiG3tVvbNFQgVg2bQS8YGgxyw== + +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== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +word-wrap@^1.2.3, word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== + +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +xdg-basedir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" + integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== + +xmlbuilder@^13.0.2: + version "13.0.2" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" + integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== + +xmlcreate@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/xmlcreate/-/xmlcreate-2.0.4.tgz#0c5ab0f99cdd02a81065fa9cd8f8ae87624889be" + integrity sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg== + +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== + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yaml@2.0.0-1: + version "2.0.0-1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.0.0-1.tgz#8c3029b3ee2028306d5bcf396980623115ff8d18" + integrity sha512-W7h5dEhywMKenDJh2iX/LABkbFnBxasD27oyXWDS/feDsxiw0dD5ncXdYXgkvAsXIY2MpW/ZKkr9IU30DBdMNQ== + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +"yauzl@2.9.2 - 2.10.0": + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g== + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +z-schema@^4.2.3: + version "4.2.4" + resolved "https://registry.yarnpkg.com/z-schema/-/z-schema-4.2.4.tgz#73102a49512179b12a8ec50b1daa676b984da6e4" + integrity sha512-YvBeW5RGNeNzKOUJs3rTL4+9rpcvHXt5I051FJbOcitV8bl40pEfcG0Q+dWSwS0/BIYrMZ/9HHoqLllMkFhD0w== + dependencies: + lodash.get "^4.4.2" + lodash.isequal "^4.5.0" + validator "^13.6.0" + optionalDependencies: + commander "^2.7.1" diff --git a/miniwallet/.env.example b/miniwallet/.env.example deleted file mode 100644 index bfcde5c..0000000 --- a/miniwallet/.env.example +++ /dev/null @@ -1,24 +0,0 @@ -# Network config - -ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1 -PRIVATE_KEY=abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 -HARDHAT_URL=http://localhost:8545 -LOCALNET_URL=http://localhost:9500 -DEVNET_URL=https://api.s0.ps.hmny.io/ -TESTNET_URL=https://api.s0.b.hmny.io -MAINNET_URL=https://api.harmony.one -LOCALGETH_URL=http://localhost:8645 -ROPSTEN_URL=https://ropsten.infura.io/v3/abc123abc123abc123abc123abc123ab -SEPOLIA_URL=https://rpc.sepolia.dev -ETHEREUM_URL=https://mainnet.infura.io/v3/abc123abc123abc123abc123abc123ab - -# Application config - -INITIAL_OPERATOR_THRESHOLD=10 -INITIAL_OPERATORS=["0x70997970C51812dc3A010C7d01b50e0d17dc79C8","0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC","0x90F79bf6EB2c4f870365E785982E1f101E93b906"] -INITIAL_USER_LIMIT=1000000 -INITIAL_AUTH_LIMIT=100000 -TEST_INITIAL_OPERATOR_THRESHOLD=10 -TEST_INITIAL_OPERATORS=["0x70997970C51812dc3A010C7d01b50e0d17dc79C8","0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC","0x90F79bf6EB2c4f870365E785982E1f101E93b906"] -TEST_INITIAL_USER_LIMIT=1000 -TEST_INITIAL_AUTH_LIMIT=100 \ No newline at end of file diff --git a/miniwallet/.gitignore b/miniwallet/.gitignore index 1d28dec..6254619 100644 --- a/miniwallet/.gitignore +++ b/miniwallet/.gitignore @@ -1,5 +1,6 @@ node_modules .env +env coverage coverage.json typechain diff --git a/miniwallet/MiniIDSampleMetaData.json b/miniwallet/MiniIDSampleMetaData.json new file mode 100644 index 0000000..5e356c5 --- /dev/null +++ b/miniwallet/MiniIDSampleMetaData.json @@ -0,0 +1,12 @@ +{ + "description": "MiniID for +1 415 840 1410", + "external_url": "https://gateway.pinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx/0", + "image": "https://gateway.pinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx/0.png", + "name": "+1 415 840 1410", + "attributes": [ + { + "trait_type": "Country", + "value": "US" + } + ] +} \ No newline at end of file diff --git a/miniwallet/README.md b/miniwallet/README.md index de255ea..aeee00a 100644 --- a/miniwallet/README.md +++ b/miniwallet/README.md @@ -4,7 +4,7 @@ See design and specification at [mini-wallet in SMS Wallet Wiki](https://github. This folder contains the code for the smart contracts, tests, and deployment scripts. -The main smart contract is [AssetManager](./contracts/AssetManager.sol). See in-line documentations for technical references. +The main smart contract is [MiniWallet](./contracts/MiniWallet.sol). See in-line documentations for technical references. diff --git a/miniwallet/config/getConfig.ts b/miniwallet/config/getConfig.ts new file mode 100644 index 0000000..870ce55 --- /dev/null +++ b/miniwallet/config/getConfig.ts @@ -0,0 +1,25 @@ +import * as fs from 'fs' +import * as path from 'path' + +export async function getConfig (networkName, configID) { +// Get the deployment configuration +// If a network specific config exists use that otherwise use the default + console.log(`Deploying to network: ${networkName}`) + let configPath = path.join(__dirname, './' + configID + '_' + networkName + '.ts') + let config + if (fs.existsSync(configPath)) { + configPath = configPath.substring(0, configPath.length - 3) + const { default: configNetwork } = await import(configPath) + config = configNetwork + } else { + configPath = path.join(__dirname, './' + configID + '.ts') + if (fs.existsSync(configPath)) { + // console.log(`getConfig configPath: ${configPath}`) + configPath = configPath.substring(0, configPath.length - 3) + const { default: configDefault } = await import(configPath) + // console.log(`getConfig configDefault: ${JSON.stringify(configDefault)}`) + config = configDefault + } + } + return config +} diff --git a/miniwallet/config/miniID.ts b/miniwallet/config/miniID.ts new file mode 100644 index 0000000..79dbe6b --- /dev/null +++ b/miniwallet/config/miniID.ts @@ -0,0 +1,10 @@ +import * as dotenv from 'dotenv' +import * as path from 'path' +const envPath = path.join(__dirname, '../env/miniID.env') +dotenv.config({ path: envPath }) +// Note used currently as deploy is hardcoded +export default { + miniID: { + baseUri: process.env.BASE_URI || 'ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/MiniID' + } +} diff --git a/miniwallet/config/miniNFTs.ts b/miniwallet/config/miniNFTs.ts new file mode 100644 index 0000000..c9aef3f --- /dev/null +++ b/miniwallet/config/miniNFTs.ts @@ -0,0 +1,83 @@ +import * as dotenv from 'dotenv' +import * as path from 'path' +const envPath = path.join(__dirname, '../env/miniNFTs.env') +dotenv.config({ path: envPath }) + +export default { + mini721: { + saleIsActive: process.env.MINI721_DEPLOY_SALES_IS_ACTIVE === '1' || process.env.MINI721_DEPLOY_SALES_IS_ACTIVE === 'true', + metadataFrozen: process.env.MINI721_DEPLOY_METADATA_FROZEN === '1' || process.env.MINI721_DEPLOY_METADATA_FROZEN === 'true', + provenanceFrozen: process.env.MINI721_DEPLOY_PROVENANCE_FROZEN === '1' || process.env.MINI721_DEPLOY_PROVENANCE_FROZEN === 'true', + max721Tokens: process.env.MINI721_DEPLOY_MAX721_TOKENS || 1000000000000, + mintPrice: process.env.MINI721_DEPLOY_MINT_PRICE || '000000000000000000', + maxPerMint: process.env.MINI721_DEPLOY_MAX_PER_MINT || 1, + baseUri: process.env.MINI721_DEPLOY_BASE_URI || 'ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/', + contractUri: process.env.MINI721_DEPLOY_CONTRACT_URI || 'ipfs://Qmezo5wDKz7kH' + }, + mini1155: { + collection1: { + revenueAccount: process.env.MINI1155_COLLECTION1_REVENUE_ACCOUNT || 'badAddress', + maxPerMint: process.env.MINI1155_COLLECTION1_MAX_PER_MINT || 10, + mintPrice: process.env.MINI1155_COLLECTION1_MINT_PRICE || '420000000000000000', + exchangeRatio: process.env.MINI1155_COLLECTION1_EXCHANGE_RATIO || 0, + rareProbabilityPercentage: process.env.MINI1155_COLLECTION1_RARE_PROBABLITY_PERCENTAGE || 1, + // standard token configuration + s: { + tokenId: process.env.MINI1155_COLLECTION1_STANDARD_TOKEN_ID || 1, + maxSupply: process.env.MINI1155_COLLECTION1_STANDARD_TOKEN_MAX_SUPPLY || 770, + personalCap: process.env.MINI1155_COLLECTION1_STANDARD_TOKEN_PERSONAL_CAP || 10 + }, + // rare token configuration + r: { + tokenId: process.env.MINI1155_COLLECTION1_RARE_TOKEN_ID || 2, + maxSupply: process.env.MINI1155_COLLECTION1_RARE_TOKEN_MAX_SUPPLY || 7, // will be 84 after Sale + personalCap: process.env.MINI1155_COLLECTION1_RARE_TOKEN_PERSONAL_CAP || 1 + } + }, + collection2: { + revenueAccount: process.env.MINI1155_COLLECTION2_REVENUE_ACCOUNT || 'badAddress', + maxPerMint: process.env.MINI1155_COLLECTION2_MAX_PER_MINT || 20, + mintPrice: process.env.MINI1155_COLLECTION2_MINT_PRICE || '840000000000000000', + exchangeRatio: process.env.MINI1155_COLLECTION2_EXCHANGE_RATIO || 0, + rareProbabilityPercentage: process.env.MINI1155_COLLECTION2_RARE_PROBABLITY_PERCENTAGE || 2, + // standard token configuration + s: { + tokenId: process.env.MINI1155_COLLECTION2_STANDARD_TOKEN_ID || 3, + maxSupply: process.env.MINI1155_COLLECTION2_STANDARD_TOKEN_MAX_SUPPLY || 1540, + personalCap: process.env.MINI1155_COLLECTION2_STANDARD_TOKEN_PERSONAL_CAP || 20 + }, + // rare token configuration + r: { + tokenId: process.env.MINI1155_COLLECTION2_RARE_TOKEN_ID || 4, + maxSupply: process.env.MINI1155_COLLECTION2_RARE_TOKEN_MAX_SUPPLY || 28, // will be 84 after Sale + personalCap: process.env.MINI1155_COLLECTION2_RARE_TOKEN_PERSONAL_CAP || 2 + } + }, + deploy: { + name: process.env.MINI1155_DEPLOY_NAME || 'MiniWallet', + symbol: process.env.MINI1155_DEPLOY_SYMBOL || 'Mini1155', + salt: process.env.MINI1155_DEPLOY_SALT || '0x3100000000000000000000000000000000000000000000000000000000000000', + baseUri: process.env.MINI1155_DEPLOY_BASE_URI || 'ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/', + contractUri: process.env.MINI1155_DEPLOY_CONTRACT_URI || 'ipfs://QmdKB6d1zT7R8dNmEQzc6N1m5p2LDJZ66Hzu8F4fGhdVrq', + revenueAccount: process.env.MINI1155_DEPLOY_REVENUE_ACCOUNT, + saleIsActive: process.env.MINI1155_DEPLOY_SALE_IS_ACTIVE === 'true' || process.env.MINI1155_DEPLOY_SALE_IS_ACTIVE === '1', + metadataFrozen: process.env.MINI1155_DEPLOY_METADATA_FROZEN === 'true' || process.env.MINI1155_DEPLOY_METADATA_FROZEN === '1', + mintPrice: process.env.MINI1155_DEPLOY_MINT_PRICE || '000000000000000000', + exchangeRatio: process.env.MINI1155_DEPLOY_EXCHANGE_RATIO || 0, // will be 20 after sale + rareProbabilityPercentage: process.env.MINI1155_DEPLOY_RARE_PROBABLITY_PERCENTAGE || 1, + maxPerMint: process.env.MINI1155_DEPLOY_MAX_PER_MINT || 10, + // standard token configuration + s: { + tokenId: process.env.MINI1155_DEPLOY_STANDARD_TOKEN_ID || 1, + maxSupply: process.env.MINI1155_DEPLOY_STANDARD_TOKEN_MAX_SUPPLY || 770, + personalCap: process.env.MINI1155_DEPLOY_STANDARD_TOKEN_PERSONAL_CAP || 10 + }, + // rare token configuration + r: { + tokenId: process.env.MINI1155_DEPLOY_RARE_TOKEN_ID || 2, + maxSupply: process.env.MINI1155_DEPLOY_RARE_TOKEN_MAX_SUPPLY || 7, // will be 84 after Sale + personalCap: process.env.MINI1155_DEPLOY_RARE_TOKEN_PERSONAL_CAP || 1 + } + } + } +} diff --git a/miniwallet/config/miniWallet.ts b/miniwallet/config/miniWallet.ts new file mode 100644 index 0000000..2eace19 --- /dev/null +++ b/miniwallet/config/miniWallet.ts @@ -0,0 +1,13 @@ +import * as dotenv from 'dotenv' +import * as path from 'path' +const envPath = path.join(__dirname, '../env/miniWallet.env') +dotenv.config({ path: envPath }) +export default { + miniWallet: { + initialOperatorThreshold: process.env.INITIAL_OPERATOR_THRESHOLD, + initialOperators: JSON.parse(process.env.INITIAL_OPERATORS || '[]'), + initialUserLimit: process.env.INITIAL_USER_LIMIT || '100000000000000000000', + initialAuthLimit: process.env.INITIAL_AUTH_LIMIT || '10000000000000000000' + } + +} diff --git a/miniwallet/config/users.ts b/miniwallet/config/users.ts new file mode 100644 index 0000000..17b9f4c --- /dev/null +++ b/miniwallet/config/users.ts @@ -0,0 +1,12 @@ +import * as dotenv from 'dotenv' +import * as path from 'path' +const envPath = path.join(__dirname, '../env/users.env') +dotenv.config({ path: envPath }) + +export default { + users: { + operator: JSON.parse(process.env.INITIAL_OPERATORS || '[]')[0] || '0x70997970C51812dc3A010C7d01b50e0d17dc79C8', + user: process.env.USER1 || '0xEf4634BdBc6F6528EacB49278d7E17BCB9e2689A', + creator: process.env.CREATOR || '0x1cf6490889A92371fdBC610C4A862061F28BaFfA' + } +} diff --git a/miniwallet/contracts/deployments/ERC1967Proxy.sol b/miniwallet/contracts/deployments/ERC1967Proxy.sol new file mode 100644 index 0000000..955945f --- /dev/null +++ b/miniwallet/contracts/deployments/ERC1967Proxy.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: Apache-2.0 + +// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol) + +pragma solidity ^0.8.0; + +import "hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol"; +import "hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol"; + +/** + * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an + * implementation address that can be changed. This address is stored in storage in the location specified by + * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the + * implementation behind the proxy. + */ +contract ERC1967Proxy is Proxy, ERC1967Upgrade { + /** + * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`. + * + * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded + * function call, and allows initializating the storage of the proxy like a Solidity constructor. + */ + constructor(address _logic, bytes memory _data) payable { + assert( + _IMPLEMENTATION_SLOT == + bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1) + ); + _upgradeToAndCall(_logic, _data, false); + } + + /** + * @dev Returns the current implementation address. + */ + function _implementation() + internal + view + virtual + override + returns (address impl) + { + return ERC1967Upgrade._getImplementation(); + } +} diff --git a/miniwallet/contracts/miniID/MiniID.sol b/miniwallet/contracts/miniID/MiniID.sol new file mode 100644 index 0000000..335a235 --- /dev/null +++ b/miniwallet/contracts/miniID/MiniID.sol @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.4; + +import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; + +/// @custom:security-contact john@johnwhitton.com +contract MiniID is + Initializable, + ERC721Upgradeable, + ERC721EnumerableUpgradeable, + ERC721URIStorageUpgradeable, + PausableUpgradeable, + AccessControlUpgradeable, + ERC721BurnableUpgradeable, + EIP712Upgradeable, + ERC721VotesUpgradeable, + UUPSUpgradeable +{ + using CountersUpgradeable for CountersUpgradeable.Counter; + + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + CountersUpgradeable.Counter private _tokenIdCounter; + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + function initialize() public initializer { + address owner = msg.sender; + // solhint-disable-next-line security/no-inline-assembly + assembly { + sstore( + 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, + owner + ) + } + + __ERC721_init("MiniID", "MID"); + __ERC721Enumerable_init(); + __ERC721URIStorage_init(); + __Pausable_init(); + __AccessControl_init(); + __ERC721Burnable_init(); + __EIP712_init("MiniID", "1"); + __ERC721Votes_init(); + __UUPSUpgradeable_init(); + + _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(PAUSER_ROLE, msg.sender); + _grantRole(MINTER_ROLE, msg.sender); + _grantRole(UPGRADER_ROLE, msg.sender); + } + + function _baseURI() internal pure override returns (string memory) { + return "ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/MiniID/"; + } + + function pause() public onlyRole(PAUSER_ROLE) { + _pause(); + } + + function unpause() public onlyRole(PAUSER_ROLE) { + _unpause(); + } + + function safeMint(address to, string memory uri) + public + onlyRole(MINTER_ROLE) + { + uint256 tokenId = _tokenIdCounter.current(); + _tokenIdCounter.increment(); + _safeMint(to, tokenId); + _setTokenURI(tokenId, uri); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) + internal + override(ERC721Upgradeable, ERC721EnumerableUpgradeable) + whenNotPaused + { + super._beforeTokenTransfer(from, to, tokenId); + } + + function _authorizeUpgrade(address newImplementation) + internal + override + onlyRole(UPGRADER_ROLE) + {} + + // The following functions are overrides required by Solidity. + + function _afterTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal override(ERC721Upgradeable, ERC721VotesUpgradeable) { + super._afterTokenTransfer(from, to, tokenId); + } + + function _burn(uint256 tokenId) + internal + override(ERC721Upgradeable, ERC721URIStorageUpgradeable) + { + super._burn(tokenId); + } + + function tokenURI(uint256 tokenId) + public + view + override(ERC721Upgradeable, ERC721URIStorageUpgradeable) + returns (string memory) + { + return super.tokenURI(tokenId); + } + + function supportsInterface(bytes4 interfaceId) + public + view + override( + ERC721Upgradeable, + ERC721EnumerableUpgradeable, + AccessControlUpgradeable + ) + returns (bool) + { + return super.supportsInterface(interfaceId); + } +} diff --git a/miniwallet/contracts/miniNFTs/ERC721M/ERC721M.sol b/miniwallet/contracts/miniNFTs/ERC721M/ERC721M.sol new file mode 100644 index 0000000..f3dd17a --- /dev/null +++ b/miniwallet/contracts/miniNFTs/ERC721M/ERC721M.sol @@ -0,0 +1,691 @@ +// SPDX-License-Identifier: Apache-2.0 + +// Creator: Chiru Labs +// Feb 23rd 2022, Modification for sms-wallet by John Whitton + +pragma solidity ^0.8.4; + +import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; +import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; +import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; +import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; +import "@openzeppelin/contracts/utils/Address.sol"; +import "@openzeppelin/contracts/utils/Context.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; + +error ApprovalCallerNotOwnerNorApproved(); +error ApprovalQueryForNonexistentToken(); +error ApproveToCaller(); +error ApprovalToCurrentOwner(); +error BalanceQueryForZeroAddress(); +error MintedQueryForZeroAddress(); +error BurnedQueryForZeroAddress(); +error MintToZeroAddress(); +error MintZeroQuantity(); +error OwnerIndexOutOfBounds(); +error OwnerQueryForNonexistentToken(); +error TokenIndexOutOfBounds(); +error TransferCallerNotOwnerNorApproved(); +error TransferFromIncorrectOwner(); +error TransferToNonERC721ReceiverImplementer(); +error TransferToZeroAddress(); +error URIQueryForNonexistentToken(); + +/** + * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including + * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. + * + * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). + * + * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. + * + * Assumes that the maximum token id cannot exceed 2**128 - 1 (max value of uint128). + */ +contract ERC721M is + Context, + ERC165, + IERC721, + IERC721Metadata, + IERC721Enumerable +{ + using Address for address; + using Strings for uint256; + + // Compiler will pack this into a single 256bit word. + struct TokenOwnership { + // The address of the owner. + address addr; + // Keeps track of the start time of ownership with minimal overhead for tokenomics. + uint64 startTimestamp; + // Whether the token has been burned. + bool burned; + } + + // Compiler will pack this into a single 256bit word. + struct AddressData { + // Realistically, 2**64-1 is more than enough. + uint64 balance; + // Keeps track of mint count with minimal overhead for tokenomics. + uint64 numberMinted; + // Keeps track of burn count with minimal overhead for tokenomics. + uint64 numberBurned; + } + + // Compiler will pack the following + // _currentIndex and _burnCounter into a single 256bit word. + + // The tokenId of the next token to be minted. + uint128 internal _currentIndex; + + // The number of tokens burned. + uint128 internal _burnCounter; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Mapping from token ID to ownership details + // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. + mapping(uint256 => TokenOwnership) internal _ownerships; + + // Mapping owner address to address data + mapping(address => AddressData) private _addressData; + + // Mapping from token ID to approved address + mapping(uint256 => address) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping(address => mapping(address => bool)) private _operatorApprovals; + + constructor(string memory name_, string memory symbol_) { + _name = name_; + _symbol = symbol_; + } + + /** + * @dev See {IERC721Enumerable-totalSupply}. + */ + function totalSupply() public view override returns (uint256) { + // Counter underflow is impossible as _burnCounter cannot be incremented + // more than _currentIndex times + unchecked { + return _currentIndex - _burnCounter; + } + } + + /** + * @dev See {IERC721Enumerable-tokenByIndex}. + * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. + * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. + */ + function tokenByIndex(uint256 index) + public + view + override + returns (uint256) + { + uint256 numMintedSoFar = _currentIndex; + uint256 tokenIdsIdx; + + // Counter overflow is impossible as the loop breaks when + // uint256 i is equal to another uint256 numMintedSoFar. + unchecked { + for (uint256 i; i < numMintedSoFar; i++) { + TokenOwnership memory ownership = _ownerships[i]; + if (!ownership.burned) { + if (tokenIdsIdx == index) { + return i; + } + tokenIdsIdx++; + } + } + } + revert TokenIndexOutOfBounds(); + } + + /** + * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. + * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. + * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) + public + view + override + returns (uint256) + { + if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds(); + uint256 numMintedSoFar = _currentIndex; + uint256 tokenIdsIdx; + address currOwnershipAddr; + + // Counter overflow is impossible as the loop breaks when + // uint256 i is equal to another uint256 numMintedSoFar. + unchecked { + for (uint256 i; i < numMintedSoFar; i++) { + TokenOwnership memory ownership = _ownerships[i]; + if (ownership.burned) { + continue; + } + if (ownership.addr != address(0)) { + currOwnershipAddr = ownership.addr; + } + if (currOwnershipAddr == owner) { + if (tokenIdsIdx == index) { + return i; + } + tokenIdsIdx++; + } + } + } + + // Execution should never reach this point. + revert(); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) + public + view + virtual + override(ERC165, IERC165) + returns (bool) + { + return + interfaceId == type(IERC721).interfaceId || + interfaceId == type(IERC721Metadata).interfaceId || + interfaceId == type(IERC721Enumerable).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC721-balanceOf}. + */ + function balanceOf(address owner) public view override returns (uint256) { + if (owner == address(0)) revert BalanceQueryForZeroAddress(); + return uint256(_addressData[owner].balance); + } + + function _numberMinted(address owner) internal view returns (uint256) { + if (owner == address(0)) revert MintedQueryForZeroAddress(); + return uint256(_addressData[owner].numberMinted); + } + + function _numberBurned(address owner) internal view returns (uint256) { + if (owner == address(0)) revert BurnedQueryForZeroAddress(); + return uint256(_addressData[owner].numberBurned); + } + + /** + * Gas spent here starts off proportional to the maximum mint batch size. + * It gradually moves to O(1) as tokens get transferred around in the collection over time. + */ + function ownershipOf(uint256 tokenId) + internal + view + returns (TokenOwnership memory) + { + uint256 curr = tokenId; + + unchecked { + if (curr < _currentIndex) { + TokenOwnership memory ownership = _ownerships[curr]; + if (!ownership.burned) { + if (ownership.addr != address(0)) { + return ownership; + } + // Invariant: + // There will always be an ownership that has an address and is not burned + // before an ownership that does not have an address and is not burned. + // Hence, curr will not underflow. + while (true) { + curr--; + ownership = _ownerships[curr]; + if (ownership.addr != address(0)) { + return ownership; + } + } + } + } + } + revert OwnerQueryForNonexistentToken(); + } + + /** + * @dev See {IERC721-ownerOf}. + */ + function ownerOf(uint256 tokenId) public view override returns (address) { + return ownershipOf(tokenId).addr; + } + + /** + * @dev See {IERC721Metadata-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC721Metadata-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) + public + view + virtual + override + returns (string memory) + { + if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); + + string memory baseURI = _baseURI(); + return + bytes(baseURI).length != 0 + ? string(abi.encodePacked(baseURI, tokenId.toString())) + : ""; + } + + /** + * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each + * token will be the concatenation of the `baseURI` and the `tokenId`. Empty + * by default, can be overriden in child contracts. + */ + function _baseURI() internal view virtual returns (string memory) { + return ""; + } + + /** + * @dev See {IERC721-approve}. + */ + function approve(address to, uint256 tokenId) public override { + address owner = ERC721M.ownerOf(tokenId); + if (to == owner) revert ApprovalToCurrentOwner(); + + if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { + revert ApprovalCallerNotOwnerNorApproved(); + } + + _approve(to, tokenId, owner); + } + + /** + * @dev See {IERC721-getApproved}. + */ + function getApproved(uint256 tokenId) + public + view + override + returns (address) + { + if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); + + return _tokenApprovals[tokenId]; + } + + /** + * @dev See {IERC721-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) + public + override + { + if (operator == _msgSender()) revert ApproveToCaller(); + + _operatorApprovals[_msgSender()][operator] = approved; + emit ApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC721-isApprovedForAll}. + */ + function isApprovedForAll(address owner, address operator) + public + view + virtual + override + returns (bool) + { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev See {IERC721-transferFrom}. + */ + function transferFrom( + address from, + address to, + uint256 tokenId + ) public virtual override { + _transfer(from, to, tokenId); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId + ) public virtual override { + safeTransferFrom(from, to, tokenId, ""); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) public virtual override { + _transfer(from, to, tokenId); + if (!_checkOnERC721Received(from, to, tokenId, _data)) { + revert TransferToNonERC721ReceiverImplementer(); + } + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted (`_mint`), + */ + function _exists(uint256 tokenId) internal view returns (bool) { + return tokenId < _currentIndex && !_ownerships[tokenId].burned; + } + + function _safeMint(address to, uint256 quantity) internal { + _safeMint(to, quantity, ""); + } + + /** + * @dev Safely mints `quantity` tokens and transfers them to `to`. + * + * Requirements: + * + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. + * - `quantity` must be greater than 0. + * + * Emits a {Transfer} event. + */ + function _safeMint( + address to, + uint256 quantity, + bytes memory _data + ) internal { + _mint(to, quantity, _data, true); + } + + /** + * @dev Mints `quantity` tokens and transfers them to `to`. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `quantity` must be greater than 0. + * + * Emits a {Transfer} event. + */ + function _mint( + address to, + uint256 quantity, + bytes memory _data, + bool safe + ) internal { + uint256 startTokenId = _currentIndex; + if (to == address(0)) revert MintToZeroAddress(); + if (quantity == 0) revert MintZeroQuantity(); + + _beforeTokenTransfers(address(0), to, startTokenId, quantity); + + // Overflows are incredibly unrealistic. + // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1 + // updatedIndex overflows if _currentIndex + quantity > 3.4e38 (2**128) - 1 + unchecked { + _addressData[to].balance += uint64(quantity); + _addressData[to].numberMinted += uint64(quantity); + + _ownerships[startTokenId].addr = to; + _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); + + uint256 updatedIndex = startTokenId; + + for (uint256 i; i < quantity; i++) { + emit Transfer(address(0), to, updatedIndex); + if ( + safe && + !_checkOnERC721Received(address(0), to, updatedIndex, _data) + ) { + revert TransferToNonERC721ReceiverImplementer(); + } + updatedIndex++; + } + + _currentIndex = uint128(updatedIndex); + } + _afterTokenTransfers(address(0), to, startTokenId, quantity); + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer( + address from, + address to, + uint256 tokenId + ) private { + TokenOwnership memory prevOwnership = ownershipOf(tokenId); + + bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || + isApprovedForAll(prevOwnership.addr, _msgSender()) || + getApproved(tokenId) == _msgSender()); + + if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); + if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); + if (to == address(0)) revert TransferToZeroAddress(); + + _beforeTokenTransfers(from, to, tokenId, 1); + + // Clear approvals from the previous owner + _approve(address(0), tokenId, prevOwnership.addr); + + // Underflow of the sender's balance is impossible because we check for + // ownership above and the recipient's balance can't realistically overflow. + // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128. + unchecked { + _addressData[from].balance -= 1; + _addressData[to].balance += 1; + + _ownerships[tokenId].addr = to; + _ownerships[tokenId].startTimestamp = uint64(block.timestamp); + + // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. + // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. + uint256 nextTokenId = tokenId + 1; + if (_ownerships[nextTokenId].addr == address(0)) { + // This will suffice for checking _exists(nextTokenId), + // as a burned slot cannot contain the zero address. + if (nextTokenId < _currentIndex) { + _ownerships[nextTokenId].addr = prevOwnership.addr; + _ownerships[nextTokenId].startTimestamp = prevOwnership + .startTimestamp; + } + } + } + + emit Transfer(from, to, tokenId); + _afterTokenTransfers(from, to, tokenId, 1); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal virtual { + TokenOwnership memory prevOwnership = ownershipOf(tokenId); + + _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); + + // Clear approvals from the previous owner + _approve(address(0), tokenId, prevOwnership.addr); + + // Underflow of the sender's balance is impossible because we check for + // ownership above and the recipient's balance can't realistically overflow. + // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128. + unchecked { + _addressData[prevOwnership.addr].balance -= 1; + _addressData[prevOwnership.addr].numberBurned += 1; + + // Keep track of who burned the token, and the timestamp of burning. + _ownerships[tokenId].addr = prevOwnership.addr; + _ownerships[tokenId].startTimestamp = uint64(block.timestamp); + _ownerships[tokenId].burned = true; + + // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. + // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. + uint256 nextTokenId = tokenId + 1; + if (_ownerships[nextTokenId].addr == address(0)) { + // This will suffice for checking _exists(nextTokenId), + // as a burned slot cannot contain the zero address. + if (nextTokenId < _currentIndex) { + _ownerships[nextTokenId].addr = prevOwnership.addr; + _ownerships[nextTokenId].startTimestamp = prevOwnership + .startTimestamp; + } + } + } + + emit Transfer(prevOwnership.addr, address(0), tokenId); + _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); + + // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. + unchecked { + _burnCounter++; + } + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * Emits a {Approval} event. + */ + function _approve( + address to, + uint256 tokenId, + address owner + ) private { + _tokenApprovals[tokenId] = to; + emit Approval(owner, to, tokenId); + } + + /** + * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. + * The call is not executed if the target address is not a contract. + * + * @param from address representing the previous owner of the given token ID + * @param to target address that will receive the tokens + * @param tokenId uint256 ID of the token to be transferred + * @param _data bytes optional data to send along with the call + * @return bool whether the call correctly returned the expected magic value + */ + function _checkOnERC721Received( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) private returns (bool) { + if (to.isContract()) { + try + IERC721Receiver(to).onERC721Received( + _msgSender(), + from, + tokenId, + _data + ) + returns (bytes4 retval) { + return retval == IERC721Receiver(to).onERC721Received.selector; + } catch (bytes memory reason) { + if (reason.length == 0) { + revert TransferToNonERC721ReceiverImplementer(); + } else { + assembly { + revert(add(32, reason), mload(reason)) + } + } + } + } else { + return true; + } + } + + /** + * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. + * And also called before burning one token. + * + * startTokenId - the first token id to be transferred + * quantity - the amount to be transferred + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, `tokenId` will be burned by `from`. + * - `from` and `to` are never both zero. + */ + function _beforeTokenTransfers( + address from, + address to, + uint256 startTokenId, + uint256 quantity + ) internal virtual {} + + /** + * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes + * minting. + * And also called after one token has been burned. + * + * startTokenId - the first token id to be transferred + * quantity - the amount to be transferred + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been + * transferred to `to`. + * - When `from` is zero, `tokenId` has been minted for `to`. + * - When `to` is zero, `tokenId` has been burned by `from`. + * - `from` and `to` are never both zero. + */ + function _afterTokenTransfers( + address from, + address to, + uint256 startTokenId, + uint256 quantity + ) internal virtual {} +} diff --git a/miniwallet/contracts/miniNFTs/ERC721M/extensions/ERC721MBurnable.sol b/miniwallet/contracts/miniNFTs/ERC721M/extensions/ERC721MBurnable.sol new file mode 100644 index 0000000..19ff32e --- /dev/null +++ b/miniwallet/contracts/miniNFTs/ERC721M/extensions/ERC721MBurnable.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: Apache-2.0 + +// Creator: Chiru Labs +// Sep 1st 2022, Modification for MiniWallet by John Whitton + +pragma solidity ^0.8.4; + +import "../ERC721M.sol"; +import "@openzeppelin/contracts/utils/Context.sol"; + +/** + * @title ERC721M Burnable Token + * @dev ERC721M Token that can be irreversibly burned (destroyed). + */ +abstract contract ERC721MBurnable is Context, ERC721M { + /** + * @dev Burns `tokenId`. See {ERC721M-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + TokenOwnership memory prevOwnership = ownershipOf(tokenId); + + bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || + isApprovedForAll(prevOwnership.addr, _msgSender()) || + getApproved(tokenId) == _msgSender()); + + if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); + + _burn(tokenId); + } +} diff --git a/miniwallet/contracts/miniNFTs/ERC721M/extensions/ERC721MOwnersExplicit.sol b/miniwallet/contracts/miniNFTs/ERC721M/extensions/ERC721MOwnersExplicit.sol new file mode 100644 index 0000000..8195a1c --- /dev/null +++ b/miniwallet/contracts/miniNFTs/ERC721M/extensions/ERC721MOwnersExplicit.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: Apache-2.0 + +// Creator: Chiru Labs +// Sep 1st 2022, Modification for MiniWallet by John Whitton + +pragma solidity ^0.8.4; + +import "../ERC721M.sol"; + +error AllOwnershipsHaveBeenSet(); +error QuantityMustBeNonZero(); +error NoTokensMintedYet(); + +abstract contract ERC721MOwnersExplicit is ERC721M { + uint256 public nextOwnerToExplicitlySet; + + /** + * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf(). + */ + function _setOwnersExplicit(uint256 quantity) internal { + if (quantity == 0) revert QuantityMustBeNonZero(); + if (_currentIndex == 0) revert NoTokensMintedYet(); + uint256 _nextOwnerToExplicitlySet = nextOwnerToExplicitlySet; + if (_nextOwnerToExplicitlySet >= _currentIndex) + revert AllOwnershipsHaveBeenSet(); + + // Index underflow is impossible. + // Counter or index overflow is incredibly unrealistic. + unchecked { + uint256 endIndex = _nextOwnerToExplicitlySet + quantity - 1; + + // Set the end index to be the last token index + if (endIndex + 1 > _currentIndex) { + endIndex = _currentIndex - 1; + } + + for (uint256 i = _nextOwnerToExplicitlySet; i <= endIndex; i++) { + if ( + _ownerships[i].addr == address(0) && !_ownerships[i].burned + ) { + TokenOwnership memory ownership = ownershipOf(i); + _ownerships[i].addr = ownership.addr; + _ownerships[i].startTimestamp = ownership.startTimestamp; + } + } + + nextOwnerToExplicitlySet = endIndex + 1; + } + } +} diff --git a/miniwallet/contracts/miniNFTs/Mini1155.sol b/miniwallet/contracts/miniNFTs/Mini1155.sol new file mode 100644 index 0000000..17e4698 --- /dev/null +++ b/miniwallet/contracts/miniNFTs/Mini1155.sol @@ -0,0 +1,422 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.4; + +import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/security/Pausable.sol"; +import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; +import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; +// import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol"; +import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; +import "./rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; +import "./rarible/royalties/contracts/LibPart.sol"; +import "./rarible/royalties/contracts/LibRoyaltiesV2.sol"; + +/// Developed by: John Whitton (github: johnwhittton), Aaron Li (github: polymorpher) +contract Mini1155 is + ERC1155, + Ownable, + Pausable, + ERC1155Burnable, + ERC1155Supply, + RoyaltiesV2Impl +{ + // Contract logic variables + string public contractURI; + string public baseUri; + bytes32 public salt; + uint256 public mintPrice; + uint256 public maxPerMint; + uint256 public standardTokenId; + uint256 public rareTokenId; + uint256 public exchangeRatio; // # standard needed to get 1 rare + uint256 public rareProbabilityPercentage; // chance to get rare token during minting + + // Contract admin variables + address public revenueAccount; + string public name; + string public symbol; + bool public saleIsActive; + bool public saleStarted; + bool public metadataFrozen; + + // Token specific public variables + mapping(uint256 => uint256) public maxSupply; + mapping(uint256 => uint256) public maxPersonalCap; + mapping(uint256 => string) public metadataUris; + + bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; + + event SetBaseUri(string baseUri); + event Mini1155Mint( + uint256 standardTokenId, + uint256 numStandardTokens, + uint256 rareTokenId, + uint256 numRareTokens, + address initialOwner + ); + event Mini1155MintCommunity( + uint256 tokenId, + uint256 numTokens, + address initialOwner + ); + event Mini1155Transfer( + uint256 id, + address from, + address to, + address operator + ); + + constructor( + bool _saleIsActive, + bool _metadataFrozen, + uint256 _mintPrice, + uint256 _maxPerMint, + uint256 _standardTokenId, + uint256 _rareTokenId, + uint256 _exchangeRatio, + uint256 _rareProbabilityPercentage, + bytes32 _salt, + string memory _baseUri, + string memory _contractUri + ) ERC1155(_baseUri) { + saleIsActive = _saleIsActive; + if (saleIsActive) { + saleStarted = true; + } + metadataFrozen = _metadataFrozen; + mintPrice = _mintPrice; + maxPerMint = _maxPerMint; + standardTokenId = _standardTokenId; + rareTokenId = _rareTokenId; + exchangeRatio = _exchangeRatio; + rareProbabilityPercentage = _rareProbabilityPercentage; + salt = _salt; + contractURI = _contractUri; + baseUri = _baseUri; + setURI(_contractUri); + } + + function setURI(string memory newuri) public onlyOwner { + _setURI(newuri); + } + + function pause() public onlyOwner { + _pause(); + } + + function unpause() public onlyOwner { + _unpause(); + } + + function _beforeTokenTransfer( + address operator, + address from, + address to, + uint256[] memory ids, + uint256[] memory amounts, + bytes memory data + ) internal override(ERC1155, ERC1155Supply) whenNotPaused { + super._beforeTokenTransfer(operator, from, to, ids, amounts, data); + } + + // Begin Mini1155 Enhancements + modifier whenSaleActive() { + require(saleIsActive, "sale not active"); + _; + } + + modifier whenMetadataNotFrozen() { + require(!metadataFrozen, "metadata frozen"); + _; + } + + function supportsInterface(bytes4 interfaceId) + public + view + override + returns (bool) + { + return + interfaceId == this.name.selector || + interfaceId == this.symbol.selector || + interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES || + interfaceId == _INTERFACE_ID_ERC2981 || + super.supportsInterface(interfaceId); + } + + function mint(uint256 _amount) external payable whenSaleActive { + require(_amount > 0, "minting too few"); + require(_amount <= maxPerMint, "exceeded per mint limit"); + require(mintPrice * _amount <= msg.value, "insufficient payment"); + uint256 excess = msg.value - (_amount * mintPrice); + if (excess > 0) { + payable(msg.sender).transfer(excess); + } + + bool isRare = false; + uint256 standardBalance = ERC1155.balanceOf( + msg.sender, + standardTokenId + ); + uint256 rareBalance = ERC1155.balanceOf(msg.sender, rareTokenId); + uint256 rareSupply = ERC1155Supply.totalSupply(rareTokenId); + if ( + rareSupply < maxSupply[rareTokenId] && + rareBalance < maxPersonalCap[rareTokenId] + ) { + uint256 roll = uint256( + keccak256( + bytes.concat( + salt, + bytes20(msg.sender), + bytes32(standardBalance), + bytes32(rareBalance) + ) + ) + ) % 100; + if (roll < (rareProbabilityPercentage * _amount)) { + isRare = true; + } + } + if (isRare) { + _amount -= 1; + _mint(msg.sender, rareTokenId, 1, ""); + } + if (_amount > 0) { + require( + totalSupply(standardTokenId) + _amount <= + maxSupply[standardTokenId], + "standard token supply cap exceeded" + ); + require( + standardBalance + _amount <= maxPersonalCap[standardTokenId], + "standard token personal cap exceeded" + ); + _mint(msg.sender, standardTokenId, _amount, ""); + } + emit Mini1155Mint( + standardTokenId, + _amount, + rareTokenId, + isRare ? 1 : 0, + msg.sender + ); + } + + function exchange() public { + require(exchangeRatio > 0, "exchange not enabled"); + uint256 standardBalance = ERC1155.balanceOf( + msg.sender, + standardTokenId + ); + require(standardBalance >= exchangeRatio, "too few standard tokens"); + _burn(msg.sender, standardTokenId, exchangeRatio); + _mint(msg.sender, rareTokenId, 1, ""); + } + + function uri(uint256 id) public view override returns (string memory) { + if (bytes(metadataUris[id]).length == 0) { + // return string(abi.encodePacked(baseUri, uint2str(id), ".json")); + return string(abi.encodePacked(baseUri, uint2str(id))); + } + return metadataUris[id]; + } + + // ------------------ + // Functions for the owner (MiniWallet minting contracts) + // ------------------ + + // Explicit Overrides + function burn( + address _address, + uint256 _tokenId, + uint256 _amount + ) public override(ERC1155Burnable) onlyOwner { + ERC1155Burnable.burn(_address, _tokenId, _amount); + } + + function burnBatch( + address _address, + uint256[] memory _tokenIds, + uint256[] memory _amounts + ) public override(ERC1155Burnable) onlyOwner { + ERC1155Burnable.burnBatch(_address, _tokenIds, _amounts); + } + + function freezeMetadata() external onlyOwner whenMetadataNotFrozen { + metadataFrozen = true; + } + + function toggleSaleState() external onlyOwner { + // require ((saleIsActive || (offsetValue != 0)), "cannot start sale until airdrop is complete and offset set"); + saleIsActive = !saleIsActive; + if (saleIsActive && !saleStarted) { + saleStarted = true; + } + } + + function setContractUri(string memory uri_) + public + whenMetadataNotFrozen + onlyOwner + { + contractURI = uri_; + } + + function setMaxPerMint(uint256 _maxPerMint) external onlyOwner { + maxPerMint = _maxPerMint; + } + + function setMintPrice(uint256 _mintPrice) external onlyOwner { + mintPrice = _mintPrice; + } + + function setMaxSupply(uint256 _tokenId, uint256 _cap) external onlyOwner { + maxSupply[_tokenId] = _cap; + } + + function setMaxPersonalCap(uint256 _tokenId, uint256 _cap) + external + onlyOwner + { + maxPersonalCap[_tokenId] = _cap; + } + + function setStandardTokenId(uint256 _tokenId) external onlyOwner { + standardTokenId = _tokenId; + } + + function setRareTokenId(uint256 _tokenId) external onlyOwner { + rareTokenId = _tokenId; + } + + function setExchangeRatio(uint256 _exchangeRatio) external onlyOwner { + exchangeRatio = _exchangeRatio; + } + + function setRareProbabilityPercentage(uint256 _rareProbabilityPercentage) + external + onlyOwner + { + rareProbabilityPercentage = _rareProbabilityPercentage; + } + + function setBaseUri(string memory _baseUri) + external + onlyOwner + whenMetadataNotFrozen + { + baseUri = _baseUri; + emit SetBaseUri(baseUri); + } + + function mintAsOwner( + address _to, + uint256 _tokenId, + uint256 _numberOfTokens + ) external onlyOwner { + require(_to != address(0), "zero to-address"); + if (maxSupply[_tokenId] > 0) { + require( + totalSupply(_tokenId) + _numberOfTokens <= maxSupply[_tokenId], + "supply exceeded" + ); + } + _mint(_to, _tokenId, _numberOfTokens, ""); + emit Mini1155MintCommunity(_tokenId, _numberOfTokens, _to); + } + + function withdraw(uint256 amount, bool shouldUseRevenueAccount) public { + require( + msg.sender == Ownable.owner() || msg.sender == revenueAccount, + "unauthorized" + ); + address a = shouldUseRevenueAccount ? revenueAccount : Ownable.owner(); + (bool success, ) = a.call{value: amount}(""); + require(success); + } + + function setUri(uint256 id, string memory uri_) + public + onlyOwner + whenMetadataNotFrozen + { + metadataUris[id] = uri_; + } + + function uint2str(uint256 _i) + internal + pure + returns (string memory _uintAsString) + { + if (_i == 0) { + return "0"; + } + uint256 j = _i; + uint256 len; + while (j != 0) { + len++; + j /= 10; + } + bytes memory bstr = new bytes(len); + uint256 k = len; + while (_i != 0) { + k = k - 1; + uint8 temp = (48 + uint8(_i - (_i / 10) * 10)); + bytes1 b1 = bytes1(temp); + bstr[k] = b1; + _i /= 10; + } + return string(bstr); + } + + function setRevenueAccount(address account) public onlyOwner { + revenueAccount = account; + } + + function setSalt(bytes32 _salt) public onlyOwner { + salt = _salt; + } + + function setNameSymbol(string memory name_, string memory symbol_) + public + onlyOwner + { + name = name_; + symbol = symbol_; + } + + function setRoyalties( + uint256 _tokenId, + address payable _royaltiesReceipientAddress, + uint96 _percentageBasisPoints + ) public onlyOwner { + LibPart.Part[] memory _royalties = new LibPart.Part[](1); + _royalties[0].value = _percentageBasisPoints; + _royalties[0].account = _royaltiesReceipientAddress; + _saveRoyalties(_tokenId, _royalties); + } + + // royalty stuff + + function royaltyInfo(uint256 _tokenId, uint256 _salePrice) + external + view + returns (address receiver, uint256 royaltyAmount) + { + LibPart.Part[] memory _royalties = royalties[_tokenId]; + if (_royalties.length > 0) { + return ( + _royalties[0].account, + (_salePrice * _royalties[0].value) / 10000 + ); + } + return (address(0), 0); + } + + // accept deposit + + receive() external payable {} +} diff --git a/miniwallet/contracts/miniNFTs/Mini721.sol b/miniwallet/contracts/miniNFTs/Mini721.sol new file mode 100644 index 0000000..d9308c5 --- /dev/null +++ b/miniwallet/contracts/miniNFTs/Mini721.sol @@ -0,0 +1,392 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.4; + +import "./ERC721M/ERC721M.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; +import "./rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; +import "./rarible/royalties/contracts/LibPart.sol"; +import "./rarible/royalties/contracts/LibRoyaltiesV2.sol"; + +contract Mini721 is ERC721M, Ownable, RoyaltiesV2Impl { + bytes32 internal salt; + uint256 public maxMiniTokens; + uint256 public mintPrice; + uint256 public maxPerMint; + uint256 public startIndex; + + string public provenanceHash = ""; + uint256 public offsetValue; + + bool public metadataFrozen; + bool public provenanceFrozen; + bool public saleIsActive; + bool public saleStarted; + + mapping(uint256 => string) internal metadataUris; + string internal _contractUri; + string public temporaryTokenUri; + string internal baseUri; + address internal revenueAccount; + + bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; + + event SetBaseUri(string baseUri); + event SetStartIndex(uint256 index); + event MiniMint( + uint256 lastTokenId, + uint256 numTokens, + address initialOwner + ); + event MiniMintCommunity( + uint256 lastTokenId, + uint256 numTokens, + address initialOwner + ); + event MiniBurn(uint256 id); + event MiniBatchBurn(uint256[] ids); + event MiniTransfer(uint256 id, address from, address to, address operator); + event MiniSetup( + uint32 coolingPeriod_, + uint32 shipNumber_, + string contractUri + ); + + constructor( + bool _saleIsActive, + bool _metadataFrozen, + bool _provenanceFrozen, + uint256 _maxMiniTokens, + uint256 _mintPrice, + uint256 _maxPerMint, + string memory _baseUri, + string memory contractUri_ + ) ERC721M("MiniWallet NFT", "Mini721") { + saleIsActive = _saleIsActive; + if (saleIsActive) { + saleStarted = true; + } + // false + metadataFrozen = _metadataFrozen; + //false + provenanceFrozen = _provenanceFrozen; + //false + maxMiniTokens = _maxMiniTokens; + // 10000 + mintPrice = _mintPrice; + // 100000000000000000 = 0.01 ETH + maxPerMint = _maxPerMint; + // 10; + baseUri = _baseUri; + // "ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/"; + _contractUri = contractUri_; + //"ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/contract.json"; //TODO review URI + } + + modifier whenSaleActive() { + require(saleIsActive, "Mini721: Sale is not active"); + _; + } + + modifier whenMetadataNotFrozen() { + require(!metadataFrozen, "Mini721: Metadata is frozen"); + _; + } + + modifier whenProvenanceNotFrozen() { + require(!provenanceFrozen, "Mini721: Provenance is frozen"); + _; + } + + // ------------------ + // Explicit overrides + // ------------------ + + function _burn(uint256 tokenId) internal virtual override(ERC721M) { + super._burn(tokenId); + } + + function setTemporaryTokenUri(string memory uri) public onlyOwner { + temporaryTokenUri = uri; + } + + function tokenURI(uint256 tokenId) + public + view + virtual + override(ERC721M) + returns (string memory) + { + if (!metadataFrozen && bytes(temporaryTokenUri).length > 0) { + return temporaryTokenUri; + } + if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); + uint256 tid = tokenId; + if (tid >= offsetValue) { + tid = + ((startIndex + tid - offsetValue) % + (maxMiniTokens - offsetValue)) + + offsetValue; + } + + if (bytes(metadataUris[tokenId]).length == 0) { + return + bytes(baseUri).length != 0 + ? string(abi.encodePacked(baseUri, uint2str(tid))) + : ""; + } + return metadataUris[tokenId]; + } + + function setStartIndex() external onlyOwner { + startIndex = + uint256( + keccak256( + abi.encodePacked( + blockhash(block.number - 2), + bytes20(msg.sender), + bytes32(totalSupply()) + ) + ) + ) % + (maxMiniTokens - offsetValue); + emit SetStartIndex(startIndex); + } + + function _baseURI() internal view override returns (string memory) { + return baseUri; + } + + function supportsInterface(bytes4 interfaceId) + public + view + override + returns (bool) + { + return + interfaceId == this.name.selector || + interfaceId == this.symbol.selector || + interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES || + interfaceId == _INTERFACE_ID_ERC2981 || + ERC721M.supportsInterface(interfaceId); + } + + // ------------------ + // Utility view functions + // ------------------ + + function exists(uint256 _tokenId) public view returns (bool) { + return _exists(_tokenId); + } + + //TODO review if we need to override the contractURI + function contractURI() public view returns (string memory) { + return _contractUri; + } + + // ------------------ + // Functions for external (user) minting + // ------------------ + + function mintMini(uint256 amount) external payable whenSaleActive { + require( + totalSupply() + amount < maxMiniTokens, + "Mini721: Purchase would exceed cap" + ); + require(amount <= maxPerMint, "Mini721: Amount exceeds max per mint"); + require( + mintPrice * amount <= msg.value, + "Mini721: Ether value sent is not correct" + ); + uint256 excess = msg.value - (amount * mintPrice); + if (excess > 0) { + payable(msg.sender).transfer(excess); + } + _safeMint(msg.sender, amount); + emit MiniMint(totalSupply(), amount, msg.sender); + } + + function burn(uint256 id) public onlyOwner whenMetadataNotFrozen { + ERC721M._burn(id); + emit MiniBurn(id); + } + + function batchBurn(uint256[] memory ids) + public + onlyOwner + whenMetadataNotFrozen + { + for (uint32 i = 0; i < ids.length; i++) { + uint256 id = ids[i]; + ERC721M._burn(id); + } + emit MiniBatchBurn(ids); + } + + // ------------------ + // Functions for the owner (Mini minting contracts) + // ------------------ + + function freezeMetadata() external onlyOwner whenMetadataNotFrozen { + metadataFrozen = true; + } + + function freezeProvenance() external onlyOwner whenProvenanceNotFrozen { + provenanceFrozen = true; + } + + function toggleSaleState() external onlyOwner { + require( + (saleIsActive || (offsetValue != 0)), + "cannot start sale until airdrop is complete and offset set" + ); + saleIsActive = !saleIsActive; + if (saleIsActive && !saleStarted) { + saleStarted = true; + } + } + + function setContractUri(string memory uri_) public onlyOwner { + _contractUri = uri_; + } + + function setProvenanceHash(string memory _provenanceHash) + external + onlyOwner + whenProvenanceNotFrozen + { + provenanceHash = _provenanceHash; + } + + function setOffsetValue(uint256 _offsetValue) external onlyOwner { + require(!saleStarted, "sale already begun"); + offsetValue = _offsetValue; + } + + function setMaxPerMint(uint256 _maxPerMint) external onlyOwner { + maxPerMint = _maxPerMint; + } + + function setMintPrice(uint256 _mintPrice) external onlyOwner { + mintPrice = _mintPrice; + } + + function setBaseUri(string memory _baseUri) + external + onlyOwner + whenMetadataNotFrozen + { + baseUri = _baseUri; + emit SetBaseUri(baseUri); + } + + function mintForCommunity(address _to, uint256 _numberOfTokens) + external + onlyOwner + { + require(_to != address(0), "Mini721: Cannot mint to zero address."); + require( + totalSupply() + _numberOfTokens < maxMiniTokens, + "Mini721: Minting would exceed cap" + ); + _safeMint(_to, _numberOfTokens); + emit MiniMintCommunity(totalSupply(), _numberOfTokens, _to); + } + + function withdraw(uint256 amount, bool shouldUseRevenueAccount) public { + require( + msg.sender == Ownable.owner() || msg.sender == revenueAccount, + "unauthorized" + ); + address a = shouldUseRevenueAccount ? revenueAccount : Ownable.owner(); + (bool success, ) = a.call{value: amount}(""); + require(success); + } + + function setUri(uint256 id, string memory uri_) + public + onlyOwner + whenMetadataNotFrozen + { + metadataUris[id] = uri_; + } + + function uint2str(uint256 _i) + internal + pure + returns (string memory _uintAsString) + { + if (_i == 0) { + return "0"; + } + uint256 j = _i; + uint256 len; + while (j != 0) { + len++; + j /= 10; + } + bytes memory bstr = new bytes(len); + uint256 k = len; + while (_i != 0) { + k = k - 1; + uint8 temp = (48 + uint8(_i - (_i / 10) * 10)); + bytes1 b1 = bytes1(temp); + bstr[k] = b1; + _i /= 10; + } + return string(bstr); + } + + function setRevenueAccount(address account) public onlyOwner { + revenueAccount = account; + } + + function setRoyalties( + uint256 _tokenId, + address payable _royaltiesReceipientAddress, + uint96 _percentageBasisPoints + ) public onlyOwner { + LibPart.Part[] memory _royalties = new LibPart.Part[](1); + _royalties[0].value = _percentageBasisPoints; + _royalties[0].account = _royaltiesReceipientAddress; + _saveRoyalties(_tokenId, _royalties); + } + + function royaltyInfo(uint256 _tokenId, uint256 _salePrice) + external + view + returns (address receiver, uint256 royaltyAmount) + { + LibPart.Part[] memory _royalties = royalties[_tokenId]; + if (_royalties.length > 0) { + return ( + _royalties[0].account, + (_salePrice * _royalties[0].value) / 10000 + ); + } + return (address(0), 0); + } + + receive() external payable {} + + // ------------------ + // Utility function for getting the tokens of a certain address + // ------------------ + + function tokensOfOwner(address _owner) + external + view + returns (uint256[] memory) + { + uint256 tokenCount = balanceOf(_owner); + if (tokenCount == 0) { + return new uint256[](0); + } else { + uint256[] memory result = new uint256[](tokenCount); + for (uint256 index; index < tokenCount; index++) { + result[index] = tokenOfOwnerByIndex(_owner, index); + } + return result; + } + } +} diff --git a/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/IRoyaltiesProvider.sol b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/IRoyaltiesProvider.sol new file mode 100644 index 0000000..47d7f17 --- /dev/null +++ b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/IRoyaltiesProvider.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; +import "./LibPart.sol"; +interface IRoyaltiesProvider { + function getRoyalties(address token, uint tokenId) external returns (LibPart.Part[] memory); +} diff --git a/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/LibPart.sol b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/LibPart.sol new file mode 100644 index 0000000..140a07c --- /dev/null +++ b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/LibPart.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +library LibPart { + bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)"); + + struct Part { + address payable account; + uint96 value; + } + + function hash(Part memory part) internal pure returns (bytes32) { + return keccak256(abi.encode(TYPE_HASH, part.account, part.value)); + } +} diff --git a/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/LibRoyaltiesV2.sol b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/LibRoyaltiesV2.sol new file mode 100644 index 0000000..59438ea --- /dev/null +++ b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/LibRoyaltiesV2.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +library LibRoyaltiesV2 { + /* + * bytes4(keccak256('getRoyalties(LibAsset.AssetType)')) == 0x44c74bcc + */ + bytes4 constant _INTERFACE_ID_ROYALTIES = 0x44c74bcc; +} diff --git a/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/RoyaltiesV2.sol b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/RoyaltiesV2.sol new file mode 100644 index 0000000..4559d26 --- /dev/null +++ b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/RoyaltiesV2.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import "./LibPart.sol"; + +interface RoyaltiesV2 { + event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties); + + function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory); +} diff --git a/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/impl/AbstractRoyalties.sol b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/impl/AbstractRoyalties.sol new file mode 100644 index 0000000..14d7f79 --- /dev/null +++ b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/impl/AbstractRoyalties.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import "../LibPart.sol"; + +abstract contract AbstractRoyalties { + mapping (uint256 => LibPart.Part[]) public royalties; + + function _saveRoyalties(uint256 _id, LibPart.Part[] memory _royalties) internal { + for (uint i = 0; i < _royalties.length; i++) { + require(_royalties[i].account != address(0x0), "Recipient should be present"); + require(_royalties[i].value != 0, "Royalty value should be positive"); + royalties[_id].push(_royalties[i]); + } + _onRoyaltiesSet(_id, _royalties); + } + + function _updateAccount(uint256 _id, address _from, address _to) internal { + uint length = royalties[_id].length; + for(uint i = 0; i < length; i++) { + if (royalties[_id][i].account == _from) { + royalties[_id][i].account = payable(address(uint160(_to))); + } + } + } + + function _onRoyaltiesSet(uint256 _id, LibPart.Part[] memory _royalties) virtual internal; +} diff --git a/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol new file mode 100644 index 0000000..932b961 --- /dev/null +++ b/miniwallet/contracts/miniNFTs/rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.0; + +import "./AbstractRoyalties.sol"; +import "../RoyaltiesV2.sol"; + +contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 { + function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) { + return royalties[id]; + } + + function _onRoyaltiesSet(uint256 _id, LibPart.Part[] memory _royalties) override internal { + emit RoyaltiesSet(_id, _royalties); + } +} diff --git a/miniwallet/contracts/AssetManager.sol b/miniwallet/contracts/miniWallet/MiniWallet.sol similarity index 87% rename from miniwallet/contracts/AssetManager.sol rename to miniwallet/contracts/miniWallet/MiniWallet.sol index 36b466f..eab76c0 100644 --- a/miniwallet/contracts/AssetManager.sol +++ b/miniwallet/contracts/miniWallet/MiniWallet.sol @@ -3,39 +3,43 @@ pragma solidity ^0.8.9; // import "hardhat/console.sol"; -import "./lib/SafeCast.sol"; -import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol"; +import "./libraries/SafeCast.sol"; +import "./libraries/Enums.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; -import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; +import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; +import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; -import "./Enums.sol"; /** @title An asset management contract for low value tokens and assets. @author John Whitton https://github.com/johnwhitton/ @notice This contract allows users to transfer native tokens and authorize recipients (such as games) to receive these tokens. Once approved it can transfer the native tokens on behalf of the user. - It also can transfer ERC20, ERC721 and ERC1155 tokens on behalf of the user, after the user approves the AssetManager contract to do so. - @dev The AssetManager is designed to simplify management and transfer of tokens + It also can transfer ERC20, ERC721 and ERC1155 tokens on behalf of the user, after the user approves the MiniWallet contract to do so. + @dev The MiniWallet is designed to simplify management and transfer of tokens by light clients such as the sms-wallet. */ -contract AssetManager is +contract MiniWallet is Initializable, PausableUpgradeable, - AccessControlEnumerableUpgradeable + AccessControlEnumerableUpgradeable, + UUPSUpgradeable, + EIP712Upgradeable { using SafeCast for *; using SafeMathUpgradeable for uint256; /** - * @dev Emitted when a `user` deposits native tokens (`amount`) into the AssetManager + * @dev Emitted when a `user` deposits native tokens (`amount`) into the MiniWallet * `balance` is the users new balance held. * @param user The user depositing the native token * @param amount The amount of native tokens deposited - * @param balance The users balance of native tokens held by the AssetManager contract after the deposit + * @param balance The users balance of native tokens held by the MiniWallet contract after the deposit */ event DepositSuccessful( address indexed user, @@ -44,11 +48,11 @@ contract AssetManager is ); /** - * @dev Emitted when a `user` withdraws native tokens (`amount`) from the AssetManager + * @dev Emitted when a `user` withdraws native tokens (`amount`) from the MiniWallet * `balance` is the users new balance held. * @param user The user withdrawing the native token * @param amount The amount of native tokens withdrawn - * @param balance The users balance of native tokens held by the AssetManager contract after the withdrawal + * @param balance The users balance of native tokens held by the MiniWallet contract after the withdrawal */ event WithdrawalSuccessful( address indexed user, @@ -62,7 +66,7 @@ contract AssetManager is * e.g. `Insufficient Locked Funds to Withdraw`. * @param user The user attempting to withdraw the native token * @param amount The amount of native tokens requested to withdraw - * @param balance The users balance of native tokens held by the AssetManager contract + * @param balance The users balance of native tokens held by the MiniWallet contract */ error WithdrawalFailed( address user, @@ -76,7 +80,7 @@ contract AssetManager is * a call to {approve}. `value` is the new allowance. * @param owner The owner of the native token which are being approved * @param spender The spender who can spend the native tokens (actual transferring of the funds is done by the operator) - * @param allowance The allowance of native tokens which can be transferred by the AssetManager Operator to the spender + * @param allowance The allowance of native tokens which can be transferred by the MiniWallet Operator to the spender */ event Approval( address indexed owner, @@ -89,8 +93,8 @@ contract AssetManager is * @param from The sender of the native token * @param to The recipient of the native token * @param amount The amount of native token sent - * @param newBalance The updated balance of native tokens held by the AssetManager contract on behalf of the user - * @param newAllowance The updated allowance of native tokens which can be transferred by the AssetManager Operator to the spender + * @param newBalance The updated balance of native tokens held by the MiniWallet contract on behalf of the user + * @param newAllowance The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender */ event SendSuccessful( address indexed from, @@ -106,8 +110,8 @@ contract AssetManager is * @param from The sender of the native token * @param to The recipient of the native token * @param amount The amount of native token sent - * @param balance The updated balance of native tokens held by the AssetManager contract on behalf of the user - * @param allowance The updated allowance of native tokens which can be transferred by the AssetManager Operator to the spender + * @param balance The updated balance of native tokens held by the MiniWallet contract on behalf of the user + * @param allowance The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender * @param reason The reason the Send Failed */ error SendFailed( @@ -180,7 +184,7 @@ contract AssetManager is event GlobalUserAuthLimitChanged(uint256 newGlobalUserAuthLimit); /** - * @dev Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can hold in the AssetManager Contract + * @dev Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract * @param newGlobalUserLimit The updated global limit of native tokens a user can hold */ event GlobalUserLimitChanged(uint256 newGlobalUserLimit); @@ -192,13 +196,13 @@ contract AssetManager is uint256 public globalUserAuthLimit; /** - * @dev The global limit for the amount of Native Tokens a user can hold in the AssetManager Contract. + * @dev The global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract. * This value is checked when depositing funds. */ uint256 public globalUserLimit; /** - * @dev This mapping tracks the balances of native tokens stored in the AssetManager contract for each user + * @dev This mapping tracks the balances of native tokens stored in the MiniWallet contract for each user */ mapping(address => uint256) public userBalances; @@ -221,10 +225,11 @@ contract AssetManager is * @dev `OPERATOR_ROLE` is the role assigned to operators */ bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); + bytes32 public constant UPGRADER_ROLE = keccak256("UPGRADER_ROLE"); /** * @dev `onlyAdmin` modifier is used on functions which only administrators can run - * e.g. Updating global limits or operator Thresholds and pausing the AssetManager contract. + * e.g. Updating global limits or operator Thresholds and pausing the MiniWallet contract. */ modifier onlyAdmin() { require( @@ -247,16 +252,16 @@ contract AssetManager is } /** - * @dev `adminPauseAssetManager` pauses the `AssetManager` contract + * @dev `adminPauseMiniWallet` pauses the `MiniWallet` contract */ - function adminPauseAssetManager() external onlyAdmin { + function adminPauseMiniWallet() external onlyAdmin { _pause(); } /** - * @dev `adminUnpauseAssetManager` unpauses the `AssetManager` contract + * @dev `adminUnpauseMiniWallet` unpauses the `MiniWallet` contract */ - function adminUnpauseAssetManager() external onlyAdmin { + function adminUnpauseMiniWallet() external onlyAdmin { _unpause(); } @@ -326,7 +331,7 @@ contract AssetManager is } /** - * @dev `adminChangeGlobalUserLimit` updates the global limit for the amount of Native Tokens a user can hold in the AssetManager Contract. + * @dev `adminChangeGlobalUserLimit` updates the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract. * This value is checked when depositing funds. * This function can only be called by the administrator. * @param newGlobalUserLimit The updated global limit. @@ -354,8 +359,8 @@ contract AssetManager is } /** - * @dev `initialize` initializes the AssetManager contract. It should be called directly after the deploy. - * It is used instead of a `constructor` as the `AssetManager` is upgradeable. + * @dev `initialize` initializes the MiniWallet contract. It should be called directly after the deploy. + * It is used instead of a `constructor` as the `MiniWallet` is upgradeable. * The `msg.sender` is granted the `DEFAULT_ADMIN_ROLE`. * @param initialOperatorThreshold The initial maximum number of operators allowed * @param initialOperators The address of the initial operators (each will be granted the `OPERATOR_ROLE`) @@ -368,7 +373,16 @@ contract AssetManager is uint256 globalUserLimit_, uint256 globalUserAuthLimit_ ) external initializer { + address owner = msg.sender; + // solhint-disable-next-line security/no-inline-assembly + assembly { + sstore( + 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103, + owner + ) + } _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); + _grantRole(UPGRADER_ROLE, msg.sender); operatorThreshold = initialOperatorThreshold; for (uint256 i; i < initialOperators.length; i++) { grantRole(OPERATOR_ROLE, initialOperators[i]); @@ -378,14 +392,14 @@ contract AssetManager is } /** - * @dev `deposit` allows a user to deposit funds to the `AssetManager` contract. + * @dev `deposit` allows a user to deposit funds to the `MiniWallet` contract. * It uses `msg.sender` to determine the user and the `msg.value` to determine the amount to deposit. - * The `amount` deposited needs to be less than or equal to the `globalUserLimit + * The `amount` deposited needs to be less than or equal to the `globalUserLimit` */ function deposit() public payable whenNotPaused { require( (userBalances[address(msg.sender)] + msg.value) <= globalUserLimit, - "AssetManager: deposit greater than global limit" + "MiniWallet: deposit greater than global limit" ); userBalances[msg.sender] += msg.value; // update the userBalance @@ -443,28 +457,34 @@ contract AssetManager is /** * @dev `approve` approves an amount of native tokens that the operator is allowed to send on behalf of the `msg.sender` to the `spender`. * The amount needs to be less than the `globalUserAuthLimit` and the `owner` and `spender` cannot be the zero address. + * Also if funds are sent they are deposited to the users account, if the value and the users current balance exceeds the `globalUserLimit` + * the transaction is rejected. * @param spender The approved recipient of the native tokens. * @param amount The amount of native tokens approved. * @return true if the amount is approved */ function approve(address spender, uint256 amount) public + payable whenNotPaused returns (bool) { address owner = msg.sender; require( owner != address(0), - "AssetManager: approve from the zero address" + "MiniWallet: approve from the zero address" ); require( spender != address(0), - "AssetManager: approve to the zero address" + "MiniWallet: approve to the zero address" ); require( amount <= globalUserAuthLimit, - "AssetManager: approve greater than global limit" + "MiniWallet: approve greater than global limit" ); + if (msg.value > 0) { + deposit(); + } _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); @@ -531,7 +551,7 @@ contract AssetManager is /** * @dev `transfer` transfers tokens (ERC20, ERC721, ERC1155). - * The user account must have previously approved the `AssetManager` contract to send the funds. + * The user account must have previously approved the `MiniWallet` contract to send the funds. * @param amount The amount of the token sent * @param tokenType an enumerated value indicating the type of token being sent * @param tokenAddress the address of the token contract @@ -606,4 +626,10 @@ contract AssetManager is ); } } + + function _authorizeUpgrade(address newImplementation) + internal + override + onlyRole(UPGRADER_ROLE) + {} } diff --git a/miniwallet/contracts/Enums.sol b/miniwallet/contracts/miniWallet/libraries/Enums.sol similarity index 100% rename from miniwallet/contracts/Enums.sol rename to miniwallet/contracts/miniWallet/libraries/Enums.sol diff --git a/miniwallet/contracts/lib/SafeCast.sol b/miniwallet/contracts/miniWallet/libraries/SafeCast.sol similarity index 100% rename from miniwallet/contracts/lib/SafeCast.sol rename to miniwallet/contracts/miniWallet/libraries/SafeCast.sol diff --git a/miniwallet/contracts/debug/TestTokens.sol b/miniwallet/contracts/miniWallet/mocks/TestTokens.sol similarity index 100% rename from miniwallet/contracts/debug/TestTokens.sol rename to miniwallet/contracts/miniWallet/mocks/TestTokens.sol diff --git a/miniwallet/contracts/v2/MiniID_v2.sol b/miniwallet/contracts/v2/MiniID_v2.sol new file mode 100644 index 0000000..f6711f0 --- /dev/null +++ b/miniwallet/contracts/v2/MiniID_v2.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.9; + +import "../miniID/MiniID.sol"; + +// Clone of MiniID used for testing upgrades +// When making enhancements would code them here +contract MiniID_v2 is MiniID { + +} diff --git a/miniwallet/contracts/v2/MiniWallet_v2.sol b/miniwallet/contracts/v2/MiniWallet_v2.sol new file mode 100644 index 0000000..5d10aab --- /dev/null +++ b/miniwallet/contracts/v2/MiniWallet_v2.sol @@ -0,0 +1,11 @@ +// SPDX-License-Identifier: Apache-2.0 + +pragma solidity ^0.8.9; + +import "../miniWallet/MiniWallet.sol"; + +// Clone of MiniWallet used for testing upgrades +// When making enhancements would code them here +contract MiniWallet_v2 is MiniWallet { + +} diff --git a/miniwallet/deploy/001_deploy_assetManager.ts b/miniwallet/deploy/001_deploy_assetManager.ts deleted file mode 100644 index a24a341..0000000 --- a/miniwallet/deploy/001_deploy_assetManager.ts +++ /dev/null @@ -1,54 +0,0 @@ -import config from '../src/config' -import { HardhatRuntimeEnvironment } from 'hardhat/types' -import { DeployFunction } from 'hardhat-deploy/types' -import { ethers, upgrades } from 'hardhat' - -// import config from '../src/config' - -const OPERATOR_ROLE = ethers.utils.id('OPERATOR_ROLE') - -const deployFunction: DeployFunction = async function ( - hre: HardhatRuntimeEnvironment -) { - console.log('operators:', JSON.stringify(config.initialOperators)) - - const AssetManager = await ethers.getContractFactory('AssetManager') - const assetManager = await upgrades.deployProxy( - AssetManager, - [ - config.test.initialOperatorThreshold, - config.test.initialOperators, - config.initialUserLimit, - config.initialAuthLimit - ], - { initializer: 'initialize', unsafeAllow: ['external-library-linking'] } - ) - - await assetManager.deployed() - console.log('AssetManager deployed to:', assetManager.address) - console.log( - 'AssetManager Operator Threshold:', - await assetManager.operatorThreshold() - ) - - const operatorCount = await assetManager.getRoleMemberCount(OPERATOR_ROLE) - console.log(`operatorCount : ${operatorCount}`) - for (let i = 0; i < operatorCount; ++i) { - console.log(`Operator [${i}]: ${await assetManager.getRoleMember(OPERATOR_ROLE, i)}`) - } - - const globalUserLimit = await assetManager.globalUserLimit() - console.log( - 'AssetManager Global User Auth Limit:', - ethers.utils.formatUnits(globalUserLimit.toString()) - ) - - const globalUserAuthLimit = await assetManager.globalUserAuthLimit() - console.log( - 'AssetManager Global User Auth Limit:', - ethers.utils.formatUnits(globalUserAuthLimit.toString()) - ) -} -deployFunction.dependencies = [] -deployFunction.tags = ['AssetManager'] -export default deployFunction diff --git a/miniwallet/deploy/001_deploy_miniWallet.ts b/miniwallet/deploy/001_deploy_miniWallet.ts new file mode 100644 index 0000000..e79b3fc --- /dev/null +++ b/miniwallet/deploy/001_deploy_miniWallet.ts @@ -0,0 +1,69 @@ +import { getConfig } from '../config/getConfig' +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' +import { ethers } from 'hardhat' + +const OPERATOR_ROLE = ethers.utils.id('OPERATOR_ROLE') + +const deployFunction: DeployFunction = async function ( + hre: HardhatRuntimeEnvironment +) { + const { deployments, getNamedAccounts } = hre + const { deploy } = deployments + const { deployer } = await getNamedAccounts() + + // Get the deployment configuration + console.log(`Deploying to network: ${hre.network.name}`) + const config = await getConfig(hre.network.name, 'miniWallet') + + const deployedContract = await deploy('MiniWallet', { + contract: 'MiniWallet', + from: deployer, + proxy: { + owner: deployer, + proxyContract: 'ERC1967Proxy', + proxyArgs: ['{implementation}', '{data}'], + execute: { + init: { + methodName: 'initialize', + args: [ + config.miniWallet.initialOperatorThreshold, + config.miniWallet.initialOperators, + config.miniWallet.initialUserLimit, + config.miniWallet.initialAuthLimit + ] + } + } + }, + log: true + }) + const miniWallet = await hre.ethers.getContractAt('MiniWallet', deployedContract.address) + + console.log('MiniWallet deployed to:', miniWallet.address) + console.log( + 'MiniWallet Operator Threshold:', + await miniWallet.operatorThreshold() + ) + + const operatorCount = await miniWallet.getRoleMemberCount(OPERATOR_ROLE) + console.log(`operatorCount : ${operatorCount}`) + for (let i = 0; i < operatorCount; ++i) { + console.log(`Operator [${i}]: ${await miniWallet.getRoleMember(OPERATOR_ROLE, i)}`) + } + + const globalUserLimit = await miniWallet.globalUserLimit() + console.log( + 'MiniWallet Global User Limit:', + ethers.utils.formatUnits(globalUserLimit.toString()) + ) + + const globalUserAuthLimit = await miniWallet.globalUserAuthLimit() + console.log( + 'MiniWallet Global User Auth Limit:', + ethers.utils.formatUnits(globalUserAuthLimit.toString()) + ) +} + +deployFunction.dependencies = [] +deployFunction.tags = ['MiniWallet', '001', 'deploy', 'MiniWalletDeploy'] +export default deployFunction diff --git a/miniwallet/deploy/002_deploy_miniID.ts b/miniwallet/deploy/002_deploy_miniID.ts new file mode 100644 index 0000000..0a70713 --- /dev/null +++ b/miniwallet/deploy/002_deploy_miniID.ts @@ -0,0 +1,55 @@ +import { getConfig } from '../config/getConfig' +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' + +const deployFunction: DeployFunction = async function ( + hre: HardhatRuntimeEnvironment +) { + const { deployments, getNamedAccounts } = hre + const { deploy } = deployments + const { deployer, operatorA } = await getNamedAccounts() + // Get the deployment configuration + // TODO Update miniID contract to parameterize constructor + // const config = await getConfig(hre.network.name, 'miniID') + const userConfig = await getConfig(hre.network.name, 'users') + + const deployedMiniID = await deploy('MiniID', { + contract: 'MiniID', + from: deployer, + proxy: { + proxyContract: 'ERC1967Proxy', + proxyArgs: ['{implementation}', '{data}'], + execute: { + init: { + methodName: 'initialize', + args: [] + } + } + }, + log: true + }) + + const miniID = await hre.ethers.getContractAt('MiniID', deployedMiniID.address) + + console.log('MiniID deployed to :', miniID.address) + console.log('MiniID Name : ', await miniID.name()) + console.log('MiniID Symbol : ', await miniID.symbol()) + // Mint test tokens on networks hardhat and ethLocal + console.log(`hre.network.name : ${hre.network.name}`) + if (hre.network.name === 'hardhat' || hre.network.name === 'ethLocal') { + miniID.connect(operatorA) + await miniID.safeMint(userConfig.users.operator, '') + await miniID.safeMint(userConfig.users.creator, '') + await miniID.safeMint(userConfig.users.user, '') + console.log(`Token 0 Owner: ${await miniID.ownerOf(0)}`) + console.log(`Token 1 Owner: ${await miniID.ownerOf(1)}`) + console.log(`Token 2 Owner: ${await miniID.ownerOf(2)}`) + console.log(`Token 0 URI : ${await miniID.tokenURI(0)}`) + console.log(`Token 1 URI : ${await miniID.tokenURI(1)}`) + console.log(`Token 2 URI : ${await miniID.tokenURI(2)}`) + } +} + +deployFunction.dependencies = [] +deployFunction.tags = ['MiniID', '004', 'deploy'] +export default deployFunction diff --git a/miniwallet/deploy/003_deploy_mini721.ts b/miniwallet/deploy/003_deploy_mini721.ts new file mode 100644 index 0000000..2efc944 --- /dev/null +++ b/miniwallet/deploy/003_deploy_mini721.ts @@ -0,0 +1,57 @@ +import { getConfig } from '../config/getConfig' +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' + +const deployFunction: DeployFunction = async function ( + hre: HardhatRuntimeEnvironment +) { + const { deployments, getNamedAccounts, getChainId } = hre + const { deploy } = deployments + const { deployer } = await getNamedAccounts() + + // Get the deployment configuration + const config = await getConfig(hre.network.name, 'miniNFTs') + const userConfig = await getConfig(hre.network.name, 'users') + + // console.log('mini721DeployArgs:', JSON.stringify(config.mini721)) + + const deployedMini721 = await deploy('Mini721', { + from: deployer, + args: [ + config.mini721.saleIsActive, // false, + config.mini721.metadataFrozen, // false, + config.mini721.provenanceFrozen, // false + config.mini721.max721Tokens, // 1000000000000 + config.mini721.mintPrice, // ethers.utils.parseEther('0') + config.mini721.maxPerMint, // 1 + config.mini721.baseUri, // "ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/" + config.mini721.contractUri // 'ipfs://Qmezo5wDKz7kHwAPRUSJby96rnCfvhqgVqDD7Zorx9rqy8' + ], + log: true + }) + + const mini721 = await hre.ethers.getContractAt('Mini721', deployedMini721.address) + + console.log('Mini721 deployed to :', mini721.address) + console.log('Mini721 Name : ', await mini721.name()) + console.log('Mini721 Symbol : ', await mini721.symbol()) + + // Mint test tokens on networks hardhat and ethLocal + if (hre.network.name === 'hardhat' || hre.network.name === 'ethLocal') { + await mini721.mintForCommunity(userConfig.users.operator, 1) + await mini721.mintForCommunity(userConfig.users.creator, 1) + await mini721.mintForCommunity(userConfig.users.user, 1) + console.log(`Token 0 Owner: ${await mini721.ownerOf(0)}`) + console.log(`Token 1 Owner: ${await mini721.ownerOf(1)}`) + console.log(`Token 2 Owner: ${await mini721.ownerOf(2)}`) + } + console.log('Mini721 maxMiniTokens: ', (await mini721.maxMiniTokens()).toString()) + console.log('Mini721 totalSupply : ', (await mini721.totalSupply()).toString()) + console.log('Mini721 mintPrice : ', (await mini721.mintPrice()).toString()) + console.log('Mini721 saleIsActive : ', await mini721.saleIsActive()) + console.log('Mini721 maxPerMint : ', (await mini721.maxPerMint()).toString()) +} + +deployFunction.dependencies = [] +deployFunction.tags = ['Mini721', '003', 'deploy'] +export default deployFunction diff --git a/miniwallet/deploy/004_deploy_mini1155.ts b/miniwallet/deploy/004_deploy_mini1155.ts new file mode 100644 index 0000000..4b8df9f --- /dev/null +++ b/miniwallet/deploy/004_deploy_mini1155.ts @@ -0,0 +1,67 @@ +import { getConfig } from '../config/getConfig' +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' + +const deployFunction: DeployFunction = async function ( + hre: HardhatRuntimeEnvironment +) { + const { deployments, getNamedAccounts } = hre + const { deploy } = deployments + const { deployer } = await getNamedAccounts() + // Get the deployment configuration + const config = await getConfig(hre.network.name, 'miniNFTs') + const userConfig = await getConfig(hre.network.name, 'users') + + const deployedMini1155 = await deploy('Mini1155', { + from: deployer, + gasLimit: 4000000, + args: [ + config.mini1155.deploy.saleIsActive, + config.mini1155.deploy.metadataFrozen, + config.mini1155.deploy.mintPrice, + config.mini1155.deploy.maxPerMint, + config.mini1155.deploy.s.tokenId, + config.mini1155.deploy.r.tokenId, + config.mini1155.deploy.exchangeRatio, + config.mini1155.deploy.rareProbabilityPercentage, + config.mini1155.deploy.salt, + config.mini1155.deploy.baseUri, + config.mini1155.deploy.contractUri + ], + log: true + }) + console.log('Deployed Mini1155') + + const mini1155 = await hre.ethers.getContractAt('Mini1155', deployedMini1155.address) + + console.log('Mini1155 deployed to :', mini1155.address) + console.log('Mini1155 Name : ', await mini1155.name()) + console.log('Mini1155 Symbol : ', await mini1155.symbol()) + + // Mint test tokens on networks hardhat and ethLocal + if (hre.network.name === 'hardhat' || hre.network.name === 'ethLocal') { + await mini1155.mintAsOwner(userConfig.users.creator, 0, 1) // Operator Friend Token to creator + await mini1155.mintAsOwner(userConfig.users.user, 0, 1) // Operator Friend Token to User + await mini1155.mintAsOwner(userConfig.users.user, 1, 1) // Creator Friend Token to User + + console.log(`Operator Token 0 User Balance : ${await mini1155.balanceOf(userConfig.users.user, 0)}`) + console.log(`Operator Token 0 Creator Balance: ${await mini1155.balanceOf(userConfig.users.creator, 0)}`) + console.log(`Creator Token 1 User Balance : ${await mini1155.balanceOf(userConfig.users.user, 1)}`) + } + console.log('Mini1155 maxSupply 0 : ', (await mini1155.maxSupply(0)).toString()) + console.log('Mini1155 totalSupply 0 : ', (await mini1155.totalSupply(0)).toString()) + console.log('Mini1155 uri 0 : ', (await mini1155.uri(0))) + console.log('Mini1155 maxSupply 1 : ', (await mini1155.maxSupply(1)).toString()) + console.log('Mini1155 totalSupply 1 : ', (await mini1155.totalSupply(1)).toString()) + console.log('Mini1155 uri 1 : ', (await mini1155.uri(1))) + console.log('Mini1155 maxSupply 2 : ', (await mini1155.maxSupply(2)).toString()) + console.log('Mini1155 totalSupply 2 : ', (await mini1155.totalSupply(2)).toString()) + console.log('Mini1155 uri 2 : ', (await mini1155.uri(2))) + console.log('Mini1155 mintPrice : ', (await mini1155.mintPrice()).toString()) + console.log('Mini1155 saleIsActive : ', await mini1155.saleIsActive()) + console.log('Mini1155 maxPerMint : ', (await mini1155.maxPerMint()).toString()) +} + +deployFunction.dependencies = [] +deployFunction.tags = ['Mini1155', '003', 'deploy'] +export default deployFunction diff --git a/miniwallet/deploy/101_upgrade_miniWallet.ts b/miniwallet/deploy/101_upgrade_miniWallet.ts new file mode 100644 index 0000000..a931e8f --- /dev/null +++ b/miniwallet/deploy/101_upgrade_miniWallet.ts @@ -0,0 +1,57 @@ +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' +import { ethers } from 'hardhat' + +const OPERATOR_ROLE = ethers.utils.id('OPERATOR_ROLE') + +const deployFunction: DeployFunction = async function ( + hre: HardhatRuntimeEnvironment +) { + const { deployments, getNamedAccounts, getChainId } = hre + const { deploy } = deployments + const { deployer } = await getNamedAccounts() + const chainId = await getChainId() + console.log(`chainId: ${chainId}`) + + const deployedContract = await deploy('MiniWallet', { + contract: 'MiniWallet_v2', + from: deployer, + proxy: { + owner: deployer, + proxyContract: 'ERC1967Proxy', + proxyArgs: ['{implementation}', '{data}'] + }, + log: true + }) + + console.log('Deploy Finished') + const miniWallet = await hre.ethers.getContractAt('MiniWallet_v2', deployedContract.address) + + console.log('MiniWallet_v2 deployed to:', miniWallet.address) + console.log( + 'MiniWallet_v2 Operator Threshold:', + await miniWallet.operatorThreshold() + ) + + const operatorCount = await miniWallet.getRoleMemberCount(OPERATOR_ROLE) + console.log(`operatorCount : ${operatorCount}`) + for (let i = 0; i < operatorCount; ++i) { + console.log(`Operator [${i}]: ${await miniWallet.getRoleMember(OPERATOR_ROLE, i)}`) + } + + const globalUserLimit = await miniWallet.globalUserLimit() + console.log( + 'MiniWallet_v2 Global User Limit:', + ethers.utils.formatUnits(globalUserLimit.toString()) + ) + + const globalUserAuthLimit = await miniWallet.globalUserAuthLimit() + console.log( + 'MiniWallet_v2 Global User Auth Limit:', + ethers.utils.formatUnits(globalUserAuthLimit.toString()) + ) +} + +deployFunction.dependencies = [] +deployFunction.tags = ['MiniWallet_v2', '002', 'upgrade', 'MiniWalletUpgrade'] +export default deployFunction diff --git a/miniwallet/deploy/999_test.ts b/miniwallet/deploy/999_test.ts new file mode 100644 index 0000000..27f5584 --- /dev/null +++ b/miniwallet/deploy/999_test.ts @@ -0,0 +1,75 @@ +import { getConfig } from '../config/getConfig' +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments, getNamedAccounts, getChainId } = hre + const { deploy } = deployments + const { deployer } = await getNamedAccounts() + + // Get the deployment configuration + const config = await getConfig(hre.network.name, 'miniWallet') + await deploy('MiniWallet', { + contract: 'MiniWallet', + from: deployer, + proxy: { + owner: deployer, + proxyContract: 'ERC1967Proxy', + proxyArgs: ['{implementation}', '{data}'], + execute: { + init: { + methodName: 'initialize', + args: [ + config.miniWallet.initialOperatorThreshold, + config.miniWallet.initialOperators, + config.miniWallet.initialUserLimit, + config.miniWallet.initialAuthLimit + ] + } + } + }, + log: true + }) + + await deploy('MiniID', { + contract: 'MiniID', + from: deployer, + args: [], + proxy: { + proxyContract: 'ERC1967Proxy', + proxyArgs: ['{implementation}', '{data}'], + execute: { + init: { + methodName: 'initialize', + args: [] + } + } + }, + log: true + }) + + await deploy('MiniWallet', { + contract: 'MiniWallet_v2', + from: deployer, + args: [], + proxy: { + proxyContract: 'ERC1967Proxy', + proxyArgs: ['{implementation}', '{data}'] + }, + log: true + }) + + await deploy('MiniID', { + contract: 'MiniID_v2', + from: deployer, + args: [], + proxy: { + proxyContract: 'ERC1967Proxy', + proxyArgs: ['{implementation}', '{data}'] + }, + log: true + }) +} + +export default func +func.tags = ['Test999'] diff --git a/miniwallet/deployments/ethLocal/.chainId b/miniwallet/deployments/ethLocal/.chainId new file mode 100644 index 0000000..fa1bddf --- /dev/null +++ b/miniwallet/deployments/ethLocal/.chainId @@ -0,0 +1 @@ +1337 \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/Mini1155.json b/miniwallet/deployments/ethLocal/Mini1155.json new file mode 100644 index 0000000..e717f84 --- /dev/null +++ b/miniwallet/deployments/ethLocal/Mini1155.json @@ -0,0 +1,1781 @@ +{ + "address": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "abi": [ + { + "inputs": [ + { + "internalType": "bool", + "name": "_saleIsActive", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_metadataFrozen", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_mintPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxPerMint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_standardTokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_rareTokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_exchangeRatio", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_rareProbabilityPercentage", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "_baseUri", + "type": "string" + }, + { + "internalType": "string", + "name": "_contractUri", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "standardTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numStandardTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rareTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numRareTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "Mini1155Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "Mini1155MintCommunity", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "Mini1155Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "value", + "type": "uint96" + } + ], + "indexed": false, + "internalType": "struct LibPart.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "RoyaltiesSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "baseUri", + "type": "string" + } + ], + "name": "SetBaseUri", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "baseUri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "burnBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "contractURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exchange", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRatio", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "exists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "freezeMetadata", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getRaribleV2Royalties", + "outputs": [ + { + "components": [ + { + "internalType": "address payable", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "value", + "type": "uint96" + } + ], + "internalType": "struct LibPart.Part[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxPerMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "maxPersonalCap", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "maxSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "metadataFrozen", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "metadataUris", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_numberOfTokens", + "type": "uint256" + } + ], + "name": "mintAsOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "mintPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rareProbabilityPercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rareTokenId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "revenueAccount", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "royalties", + "outputs": [ + { + "internalType": "address payable", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "value", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "royaltyAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "saleIsActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "saleStarted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "salt", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_baseUri", + "type": "string" + } + ], + "name": "setBaseUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "uri_", + "type": "string" + } + ], + "name": "setContractUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_exchangeRatio", + "type": "uint256" + } + ], + "name": "setExchangeRatio", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxPerMint", + "type": "uint256" + } + ], + "name": "setMaxPerMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_cap", + "type": "uint256" + } + ], + "name": "setMaxPersonalCap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_cap", + "type": "uint256" + } + ], + "name": "setMaxSupply", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_mintPrice", + "type": "uint256" + } + ], + "name": "setMintPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + } + ], + "name": "setNameSymbol", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_rareProbabilityPercentage", + "type": "uint256" + } + ], + "name": "setRareProbabilityPercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "setRareTokenId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "setRevenueAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_royaltiesReceipientAddress", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_percentageBasisPoints", + "type": "uint96" + } + ], + "name": "setRoyalties", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + } + ], + "name": "setSalt", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "setStandardTokenId", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "newuri", + "type": "string" + } + ], + "name": "setURI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "string", + "name": "uri_", + "type": "string" + } + ], + "name": "setUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "standardTokenId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "toggleSaleState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "shouldUseRevenueAccount", + "type": "bool" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x0bfa5c52626a3057133110bfcace16829008ed7bdee4ee66d1a905c448fa8e45", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "transactionIndex": 0, + "gasUsed": "3855279", + "logsBloom": "0x00000000100000000000000000000000000000000040000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x95755b6c3f5f25f13db18fcb48a7c50fa2dbd557f2bcc997fc6e74b5c126b5c2", + "transactionHash": "0x0bfa5c52626a3057133110bfcace16829008ed7bdee4ee66d1a905c448fa8e45", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 12, + "transactionHash": "0x0bfa5c52626a3057133110bfcace16829008ed7bdee4ee66d1a905c448fa8e45", + "address": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x95755b6c3f5f25f13db18fcb48a7c50fa2dbd557f2bcc997fc6e74b5c126b5c2" + } + ], + "blockNumber": 12, + "cumulativeGasUsed": "3855279", + "status": 1, + "byzantium": true + }, + "args": [ + false, + false, + "42000000000000000", + "10", + "1", + "2", + "0", + "1", + "0x3100000000000000000000000000000000000000000000000000000000000000", + "ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/", + "ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/contract.json" + ], + "numDeployments": 1, + "solcInputHash": "eb67976a27a158fcc5c575ed68d95e39", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_saleIsActive\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_metadataFrozen\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_mintPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxPerMint\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_standardTokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_rareTokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_exchangeRatio\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_rareProbabilityPercentage\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"_baseUri\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_contractUri\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"standardTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numStandardTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rareTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numRareTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"}],\"name\":\"Mini1155Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"}],\"name\":\"Mini1155MintCommunity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"Mini1155Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"indexed\":false,\"internalType\":\"struct LibPart.Part[]\",\"name\":\"royalties\",\"type\":\"tuple[]\"}],\"name\":\"RoyaltiesSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"baseUri\",\"type\":\"string\"}],\"name\":\"SetBaseUri\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseUri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"burnBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contractURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exchange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exchangeRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getRaribleV2Royalties\",\"outputs\":[{\"components\":[{\"internalType\":\"address payable\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"internalType\":\"struct LibPart.Part[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPerMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"maxPersonalCap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"maxSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"metadataFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"metadataUris\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfTokens\",\"type\":\"uint256\"}],\"name\":\"mintAsOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mintPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rareProbabilityPercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rareTokenId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"revenueAccount\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"royalties\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salePrice\",\"type\":\"uint256\"}],\"name\":\"royaltyInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"royaltyAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saleIsActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saleStarted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"salt\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_baseUri\",\"type\":\"string\"}],\"name\":\"setBaseUri\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri_\",\"type\":\"string\"}],\"name\":\"setContractUri\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_exchangeRatio\",\"type\":\"uint256\"}],\"name\":\"setExchangeRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxPerMint\",\"type\":\"uint256\"}],\"name\":\"setMaxPerMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_cap\",\"type\":\"uint256\"}],\"name\":\"setMaxPersonalCap\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_cap\",\"type\":\"uint256\"}],\"name\":\"setMaxSupply\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_mintPrice\",\"type\":\"uint256\"}],\"name\":\"setMintPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"name\":\"setNameSymbol\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rareProbabilityPercentage\",\"type\":\"uint256\"}],\"name\":\"setRareProbabilityPercentage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"setRareTokenId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"setRevenueAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_royaltiesReceipientAddress\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_percentageBasisPoints\",\"type\":\"uint96\"}],\"name\":\"setRoyalties\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_salt\",\"type\":\"bytes32\"}],\"name\":\"setSalt\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"setStandardTokenId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"newuri\",\"type\":\"string\"}],\"name\":\"setURI\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"uri_\",\"type\":\"string\"}],\"name\":\"setUri\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"standardTokenId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"toggleSaleState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"shouldUseRevenueAccount\",\"type\":\"bool\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"balanceOf(address,uint256)\":{\"details\":\"See {IERC1155-balanceOf}. Requirements: - `account` cannot be the zero address.\"},\"balanceOfBatch(address[],uint256[])\":{\"details\":\"See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length.\"},\"exists(uint256)\":{\"details\":\"Indicates whether any token exist with a given id, or not.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"See {IERC1155-safeBatchTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"See {IERC1155-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC1155-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"totalSupply(uint256)\":{\"details\":\"Total amount of tokens in with a given id.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Developed by: John Whitton (github: johnwhittton), Aaron Li (github: polymorpher)\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/miniNFTs/Mini1155.sol\":\"Mini1155\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\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 * - `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(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\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 * - 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[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\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 _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.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 IERC1155 is IERC165 {\\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(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n 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(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) 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\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.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/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\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\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\\n * own tokens and those that they have been approved to use.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Burnable is ERC1155 {\\n function burn(\\n address account,\\n uint256 id,\\n uint256 value\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burn(account, id, value);\\n }\\n\\n function burnBatch(\\n address account,\\n uint256[] memory ids,\\n uint256[] memory values\\n ) public virtual {\\n require(\\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n\\n _burnBatch(account, ids, values);\\n }\\n}\\n\",\"keccak256\":\"0xb11d1ade7146ac3da122e1f387ea82b0bd385d50823946c3f967dbffef3e9f4f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\n\\n/**\\n * @dev Extension of ERC1155 that adds tracking of total supply per id.\\n *\\n * Useful for scenarios where Fungible and Non-fungible tokens have to be\\n * clearly identified. Note: While a totalSupply of 1 might mean the\\n * corresponding is an NFT, there is no guarantees that no other token with the\\n * same id are not going to be minted.\\n */\\nabstract contract ERC1155Supply is ERC1155 {\\n mapping(uint256 => uint256) private _totalSupply;\\n\\n /**\\n * @dev Total amount of tokens in with a given id.\\n */\\n function totalSupply(uint256 id) public view virtual returns (uint256) {\\n return _totalSupply[id];\\n }\\n\\n /**\\n * @dev Indicates whether any token exist with a given id, or not.\\n */\\n function exists(uint256 id) public view virtual returns (bool) {\\n return ERC1155Supply.totalSupply(id) > 0;\\n }\\n\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n if (from == address(0)) {\\n for (uint256 i = 0; i < ids.length; ++i) {\\n _totalSupply[ids[i]] += amounts[i];\\n }\\n }\\n\\n if (to == address(0)) {\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n uint256 supply = _totalSupply[id];\\n require(supply >= amount, \\\"ERC1155: burn amount exceeds totalSupply\\\");\\n unchecked {\\n _totalSupply[id] = supply - amount;\\n }\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe3deb5f3b0c9d12944f62ab680f041bbf1910d9d3ac6b545b4b8e399643c538d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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}\\n\",\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"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/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\"},\"contracts/miniNFTs/Mini1155.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol\\\";\\n// import \\\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport \\\"./rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol\\\";\\nimport \\\"./rarible/royalties/contracts/LibPart.sol\\\";\\nimport \\\"./rarible/royalties/contracts/LibRoyaltiesV2.sol\\\";\\n\\n/// Developed by: John Whitton (github: johnwhittton), Aaron Li (github: polymorpher)\\ncontract Mini1155 is\\n ERC1155,\\n Ownable,\\n Pausable,\\n ERC1155Burnable,\\n ERC1155Supply,\\n RoyaltiesV2Impl\\n{\\n // Contract logic variables\\n string public contractURI;\\n string public baseUri;\\n bytes32 public salt;\\n uint256 public mintPrice;\\n uint256 public maxPerMint;\\n uint256 public standardTokenId;\\n uint256 public rareTokenId;\\n uint256 public exchangeRatio; // # standard needed to get 1 rare\\n uint256 public rareProbabilityPercentage; // chance to get rare token during minting\\n\\n // Contract admin variables\\n address public revenueAccount;\\n string public name;\\n string public symbol;\\n bool public saleIsActive;\\n bool public saleStarted;\\n bool public metadataFrozen;\\n\\n // Token specific public variables\\n mapping(uint256 => uint256) public maxSupply;\\n mapping(uint256 => uint256) public maxPersonalCap;\\n mapping(uint256 => string) public metadataUris;\\n\\n bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;\\n\\n event SetBaseUri(string baseUri);\\n event Mini1155Mint(\\n uint256 standardTokenId,\\n uint256 numStandardTokens,\\n uint256 rareTokenId,\\n uint256 numRareTokens,\\n address initialOwner\\n );\\n event Mini1155MintCommunity(\\n uint256 tokenId,\\n uint256 numTokens,\\n address initialOwner\\n );\\n event Mini1155Transfer(\\n uint256 id,\\n address from,\\n address to,\\n address operator\\n );\\n\\n constructor(\\n bool _saleIsActive,\\n bool _metadataFrozen,\\n uint256 _mintPrice,\\n uint256 _maxPerMint,\\n uint256 _standardTokenId,\\n uint256 _rareTokenId,\\n uint256 _exchangeRatio,\\n uint256 _rareProbabilityPercentage,\\n bytes32 _salt,\\n string memory _baseUri,\\n string memory _contractUri\\n ) ERC1155(_baseUri) {\\n saleIsActive = _saleIsActive;\\n if (saleIsActive) {\\n saleStarted = true;\\n }\\n metadataFrozen = _metadataFrozen;\\n mintPrice = _mintPrice;\\n maxPerMint = _maxPerMint;\\n standardTokenId = _standardTokenId;\\n rareTokenId = _rareTokenId;\\n exchangeRatio = _exchangeRatio;\\n rareProbabilityPercentage = _rareProbabilityPercentage;\\n salt = _salt;\\n contractURI = _contractUri;\\n baseUri = _baseUri;\\n setURI(_contractUri);\\n }\\n\\n function setURI(string memory newuri) public onlyOwner {\\n _setURI(newuri);\\n }\\n\\n function pause() public onlyOwner {\\n _pause();\\n }\\n\\n function unpause() public onlyOwner {\\n _unpause();\\n }\\n\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal override(ERC1155, ERC1155Supply) whenNotPaused {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n }\\n\\n // Begin Mini1155 Enhancements\\n modifier whenSaleActive() {\\n require(saleIsActive, \\\"sale not active\\\");\\n _;\\n }\\n\\n modifier whenMetadataNotFrozen() {\\n require(!metadataFrozen, \\\"metadata frozen\\\");\\n _;\\n }\\n\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == this.name.selector ||\\n interfaceId == this.symbol.selector ||\\n interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES ||\\n interfaceId == _INTERFACE_ID_ERC2981 ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n function mint(uint256 _amount) external payable whenSaleActive {\\n require(_amount > 0, \\\"minting too few\\\");\\n require(_amount <= maxPerMint, \\\"exceeded per mint limit\\\");\\n require(mintPrice * _amount <= msg.value, \\\"insufficient payment\\\");\\n uint256 excess = msg.value - (_amount * mintPrice);\\n if (excess > 0) {\\n payable(msg.sender).transfer(excess);\\n }\\n\\n bool isRare = false;\\n uint256 standardBalance = ERC1155.balanceOf(\\n msg.sender,\\n standardTokenId\\n );\\n uint256 rareBalance = ERC1155.balanceOf(msg.sender, rareTokenId);\\n uint256 rareSupply = ERC1155Supply.totalSupply(rareTokenId);\\n if (\\n rareSupply < maxSupply[rareTokenId] &&\\n rareBalance < maxPersonalCap[rareTokenId]\\n ) {\\n uint256 roll = uint256(\\n keccak256(\\n bytes.concat(\\n salt,\\n bytes20(msg.sender),\\n bytes32(standardBalance),\\n bytes32(rareBalance)\\n )\\n )\\n ) % 100;\\n if (roll < (rareProbabilityPercentage * _amount)) {\\n isRare = true;\\n }\\n }\\n if (isRare) {\\n _amount -= 1;\\n _mint(msg.sender, rareTokenId, 1, \\\"\\\");\\n }\\n if (_amount > 0) {\\n require(\\n totalSupply(standardTokenId) + _amount <=\\n maxSupply[standardTokenId],\\n \\\"standard token supply cap exceeded\\\"\\n );\\n require(\\n standardBalance + _amount <= maxPersonalCap[standardTokenId],\\n \\\"standard token personal cap exceeded\\\"\\n );\\n _mint(msg.sender, standardTokenId, _amount, \\\"\\\");\\n }\\n emit Mini1155Mint(\\n standardTokenId,\\n _amount,\\n rareTokenId,\\n isRare ? 1 : 0,\\n msg.sender\\n );\\n }\\n\\n function exchange() public {\\n require(exchangeRatio > 0, \\\"exchange not enabled\\\");\\n uint256 standardBalance = ERC1155.balanceOf(\\n msg.sender,\\n standardTokenId\\n );\\n require(standardBalance >= exchangeRatio, \\\"too few standard tokens\\\");\\n _burn(msg.sender, standardTokenId, exchangeRatio);\\n _mint(msg.sender, rareTokenId, 1, \\\"\\\");\\n }\\n\\n function uri(uint256 id) public view override returns (string memory) {\\n if (bytes(metadataUris[id]).length == 0) {\\n // return string(abi.encodePacked(baseUri, uint2str(id), \\\".json\\\"));\\n return string(abi.encodePacked(baseUri, uint2str(id)));\\n }\\n return metadataUris[id];\\n }\\n\\n // ------------------\\n // Functions for the owner (MiniWallet minting contracts)\\n // ------------------\\n\\n // Explicit Overrides\\n function burn(\\n address _address,\\n uint256 _tokenId,\\n uint256 _amount\\n ) public override(ERC1155Burnable) onlyOwner {\\n ERC1155Burnable.burn(_address, _tokenId, _amount);\\n }\\n\\n function burnBatch(\\n address _address,\\n uint256[] memory _tokenIds,\\n uint256[] memory _amounts\\n ) public override(ERC1155Burnable) onlyOwner {\\n ERC1155Burnable.burnBatch(_address, _tokenIds, _amounts);\\n }\\n\\n function freezeMetadata() external onlyOwner whenMetadataNotFrozen {\\n metadataFrozen = true;\\n }\\n\\n function toggleSaleState() external onlyOwner {\\n // require ((saleIsActive || (offsetValue != 0)), \\\"cannot start sale until airdrop is complete and offset set\\\");\\n saleIsActive = !saleIsActive;\\n if (saleIsActive && !saleStarted) {\\n saleStarted = true;\\n }\\n }\\n\\n function setContractUri(string memory uri_)\\n public\\n whenMetadataNotFrozen\\n onlyOwner\\n {\\n contractURI = uri_;\\n }\\n\\n function setMaxPerMint(uint256 _maxPerMint) external onlyOwner {\\n maxPerMint = _maxPerMint;\\n }\\n\\n function setMintPrice(uint256 _mintPrice) external onlyOwner {\\n mintPrice = _mintPrice;\\n }\\n\\n function setMaxSupply(uint256 _tokenId, uint256 _cap) external onlyOwner {\\n maxSupply[_tokenId] = _cap;\\n }\\n\\n function setMaxPersonalCap(uint256 _tokenId, uint256 _cap)\\n external\\n onlyOwner\\n {\\n maxPersonalCap[_tokenId] = _cap;\\n }\\n\\n function setStandardTokenId(uint256 _tokenId) external onlyOwner {\\n standardTokenId = _tokenId;\\n }\\n\\n function setRareTokenId(uint256 _tokenId) external onlyOwner {\\n rareTokenId = _tokenId;\\n }\\n\\n function setExchangeRatio(uint256 _exchangeRatio) external onlyOwner {\\n exchangeRatio = _exchangeRatio;\\n }\\n\\n function setRareProbabilityPercentage(uint256 _rareProbabilityPercentage)\\n external\\n onlyOwner\\n {\\n rareProbabilityPercentage = _rareProbabilityPercentage;\\n }\\n\\n function setBaseUri(string memory _baseUri)\\n external\\n onlyOwner\\n whenMetadataNotFrozen\\n {\\n baseUri = _baseUri;\\n emit SetBaseUri(baseUri);\\n }\\n\\n function mintAsOwner(\\n address _to,\\n uint256 _tokenId,\\n uint256 _numberOfTokens\\n ) external onlyOwner {\\n require(_to != address(0), \\\"zero to-address\\\");\\n if (maxSupply[_tokenId] > 0) {\\n require(\\n totalSupply(_tokenId) + _numberOfTokens <= maxSupply[_tokenId],\\n \\\"supply exceeded\\\"\\n );\\n }\\n _mint(_to, _tokenId, _numberOfTokens, \\\"\\\");\\n emit Mini1155MintCommunity(_tokenId, _numberOfTokens, _to);\\n }\\n\\n function withdraw(uint256 amount, bool shouldUseRevenueAccount) public {\\n require(\\n msg.sender == Ownable.owner() || msg.sender == revenueAccount,\\n \\\"unauthorized\\\"\\n );\\n address a = shouldUseRevenueAccount ? revenueAccount : Ownable.owner();\\n (bool success, ) = a.call{value: amount}(\\\"\\\");\\n require(success);\\n }\\n\\n function setUri(uint256 id, string memory uri_)\\n public\\n onlyOwner\\n whenMetadataNotFrozen\\n {\\n metadataUris[id] = uri_;\\n }\\n\\n function uint2str(uint256 _i)\\n internal\\n pure\\n returns (string memory _uintAsString)\\n {\\n if (_i == 0) {\\n return \\\"0\\\";\\n }\\n uint256 j = _i;\\n uint256 len;\\n while (j != 0) {\\n len++;\\n j /= 10;\\n }\\n bytes memory bstr = new bytes(len);\\n uint256 k = len;\\n while (_i != 0) {\\n k = k - 1;\\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\\n bytes1 b1 = bytes1(temp);\\n bstr[k] = b1;\\n _i /= 10;\\n }\\n return string(bstr);\\n }\\n\\n function setRevenueAccount(address account) public onlyOwner {\\n revenueAccount = account;\\n }\\n\\n function setSalt(bytes32 _salt) public onlyOwner {\\n salt = _salt;\\n }\\n\\n function setNameSymbol(string memory name_, string memory symbol_)\\n public\\n onlyOwner\\n {\\n name = name_;\\n symbol = symbol_;\\n }\\n\\n function setRoyalties(\\n uint256 _tokenId,\\n address payable _royaltiesReceipientAddress,\\n uint96 _percentageBasisPoints\\n ) public onlyOwner {\\n LibPart.Part[] memory _royalties = new LibPart.Part[](1);\\n _royalties[0].value = _percentageBasisPoints;\\n _royalties[0].account = _royaltiesReceipientAddress;\\n _saveRoyalties(_tokenId, _royalties);\\n }\\n\\n // royalty stuff\\n\\n function royaltyInfo(uint256 _tokenId, uint256 _salePrice)\\n external\\n view\\n returns (address receiver, uint256 royaltyAmount)\\n {\\n LibPart.Part[] memory _royalties = royalties[_tokenId];\\n if (_royalties.length > 0) {\\n return (\\n _royalties[0].account,\\n (_salePrice * _royalties[0].value) / 10000\\n );\\n }\\n return (address(0), 0);\\n }\\n\\n // accept deposit\\n\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0xec4689e603376f34475cb1feae005dd7610fabb9e0485e8b44f4eabffcd050d6\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/LibPart.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nlibrary LibPart {\\n bytes32 public constant TYPE_HASH = keccak256(\\\"Part(address account,uint96 value)\\\");\\n\\n struct Part {\\n address payable account;\\n uint96 value;\\n }\\n\\n function hash(Part memory part) internal pure returns (bytes32) {\\n return keccak256(abi.encode(TYPE_HASH, part.account, part.value));\\n }\\n}\\n\",\"keccak256\":\"0xdd349a780718d549e742a2a6e10fda27fcbb989717ef352c6643b3bce70b9351\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/LibRoyaltiesV2.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nlibrary LibRoyaltiesV2 {\\n /*\\n * bytes4(keccak256('getRoyalties(LibAsset.AssetType)')) == 0x44c74bcc\\n */\\n bytes4 constant _INTERFACE_ID_ROYALTIES = 0x44c74bcc;\\n}\\n\",\"keccak256\":\"0x43f1503ffecc266a421097ee8767227ffdfc1de4960784244ddfad4c133ec65f\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/RoyaltiesV2.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LibPart.sol\\\";\\n\\ninterface RoyaltiesV2 {\\n event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties);\\n\\n function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory);\\n}\\n\",\"keccak256\":\"0x36d5237310b0ca8221837a9689fd750f409215962cd15f50fa8cc67951aceac9\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/impl/AbstractRoyalties.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../LibPart.sol\\\";\\n\\nabstract contract AbstractRoyalties {\\n mapping (uint256 => LibPart.Part[]) public royalties;\\n\\n function _saveRoyalties(uint256 _id, LibPart.Part[] memory _royalties) internal {\\n for (uint i = 0; i < _royalties.length; i++) {\\n require(_royalties[i].account != address(0x0), \\\"Recipient should be present\\\");\\n require(_royalties[i].value != 0, \\\"Royalty value should be positive\\\");\\n royalties[_id].push(_royalties[i]);\\n }\\n _onRoyaltiesSet(_id, _royalties);\\n }\\n\\n function _updateAccount(uint256 _id, address _from, address _to) internal {\\n uint length = royalties[_id].length;\\n for(uint i = 0; i < length; i++) {\\n if (royalties[_id][i].account == _from) {\\n royalties[_id][i].account = payable(address(uint160(_to)));\\n }\\n }\\n }\\n\\n function _onRoyaltiesSet(uint256 _id, LibPart.Part[] memory _royalties) virtual internal;\\n}\\n\",\"keccak256\":\"0x05f63abd974fb21bf0ee76df0bc98c8ecebf81904b45f1c2e3ffd48d9dda02c3\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./AbstractRoyalties.sol\\\";\\nimport \\\"../RoyaltiesV2.sol\\\";\\n\\ncontract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 {\\n function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) {\\n return royalties[id];\\n }\\n\\n function _onRoyaltiesSet(uint256 _id, LibPart.Part[] memory _royalties) override internal {\\n emit RoyaltiesSet(_id, _royalties);\\n }\\n}\\n\",\"keccak256\":\"0x97364b4c2cc76991a8da231ecb08c9ff0fecd834350c40df53d5d62e4e3d2d46\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040516200419538038062004195833981016040819052620000349162000370565b81620000408162000103565b506200004c336200011c565b6003805460ff60a01b191690556012805460ff19168c151590811790915560ff161562000083576012805461ff0019166101001790555b6012805462ff00001916620100008c1515021790556009899055600a889055600b879055600c869055600d859055600e84905560088390558051620000d0906006906020840190620001e7565b508151620000e6906007906020850190620001e7565b50620000f2816200016e565b505050505050505050505062000488565b805162000118906002906020840190620001e7565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200017862000186565b620001838162000103565b50565b6003546001600160a01b03163314620001e55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b565b828054620001f5906200044b565b90600052602060002090601f01602090048101928262000219576000855562000264565b82601f106200023457805160ff191683800117855562000264565b8280016001018555821562000264579182015b828111156200026457825182559160200191906001019062000247565b506200027292915062000276565b5090565b5b8082111562000272576000815560010162000277565b805180151581146200029e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002cb57600080fd5b81516001600160401b0380821115620002e857620002e8620002a3565b604051601f8301601f19908116603f01168101908282118183101715620003135762000313620002a3565b816040528381526020925086838588010111156200033057600080fd5b600091505b8382101562000354578582018301518183018401529082019062000335565b83821115620003665760008385830101525b9695505050505050565b60008060008060008060008060008060006101608c8e0312156200039357600080fd5b6200039e8c6200028d565b9a50620003ae60208d016200028d565b995060408c0151985060608c0151975060808c0151965060a08c0151955060c08c0151945060e08c015193506101008c015192506101208c015160018060401b03811115620003fc57600080fd5b6200040a8e828f01620002b9565b6101408e015190935090506001600160401b038111156200042a57600080fd5b620004388e828f01620002b9565b9150509295989b509295989b9093969950565b600181811c908216806200046057607f821691505b602082108114156200048257634e487b7160e01b600052602260045260246000fd5b50919050565b613cfd80620004986000396000f3fe6080604052600436106103a55760003560e01c8063857aa89a116101e7578063cb5dcaec1161010d578063eb8d2444116100a0578063f4a0a5281161006f578063f4a0a52814610b0b578063f5298aca14610b2b578063f5dc7d5614610b4b578063fb3cc6c214610b6b57600080fd5b8063eb8d244414610a91578063edb2625514610aab578063f242432a14610acb578063f2fde38b14610aeb57600080fd5b8063daaeec86116100dc578063daaeec86146109fe578063db6242c314610a13578063e8a3d48514610a33578063e985e9c514610a4857600080fd5b8063cb5dcaec1461099e578063ccb4807b146109b4578063d111515d146109d4578063d2f7265a146109e957600080fd5b8063a0712d6811610185578063b4d7dbed11610154578063b4d7dbed14610918578063bd85b0391461092e578063bfa0b1331461095b578063cad96cca1461097157600080fd5b8063a0712d68146108a5578063a0bcfc7f146108b8578063a22cb465146108d8578063a65b9926146108f857600080fd5b80638924af74116101c15780638924af74146108025780638da5cb5b1461084957806395d89b411461087b5780639abc83201461089057600080fd5b8063857aa89a1461079f578063857c2985146107bf578063869f7594146107d557600080fd5b80634006ccc5116102cc5780635c975abb1161026a578063715018a611610239578063715018a614610735578063782f08ae1461074a5780637c7810801461076a5780638456cb591461078a57600080fd5b80635c975abb146106c0578063611ef44f146106df5780636817c76c146106ff5780636b20c4541461071557600080fd5b80634f558e79116102a65780634f558e791461063c578063504334c21461066b578063507e094f1461068b5780635c474f9e146106a157600080fd5b80634006ccc5146105d95780634798b851146105ef5780634e1273f41461060f57600080fd5b80632591003311610344578063311aaef511610313578063311aaef51461055757806337da577c1461058457806338d07436146105a45780633f4ba83a146105c457600080fd5b806325910033146104b85780632a55205a146104d85780632eb2c2d61461051757806330027f3b1461053757600080fd5b8063064c6b3811610380578063064c6b381461043657806306fdde03146104565780630e89341c14610478578063143094db1461049857600080fd5b8062fdd58e146103b157806301ffc9a7146103e457806302fe53051461041457600080fd5b366103ac57005b600080fd5b3480156103bd57600080fd5b506103d16103cc366004612f52565b610b8b565b6040519081526020015b60405180910390f35b3480156103f057600080fd5b506104046103ff366004612f94565b610c21565b60405190151581526020016103db565b34801561042057600080fd5b5061043461042f36600461306d565b610c9d565b005b34801561044257600080fd5b506104346104513660046130a9565b610cb1565b34801561046257600080fd5b5061046b610ccb565b6040516103db9190613123565b34801561048457600080fd5b5061046b610493366004613136565b610d59565b3480156104a457600080fd5b506104346104b336600461314f565b610e4e565b3480156104c457600080fd5b506104346104d3366004613136565b610f0a565b3480156104e457600080fd5b506104f86104f33660046130a9565b610f17565b604080516001600160a01b0390931683526020830191909152016103db565b34801561052357600080fd5b50610434610532366004613231565b61101d565b34801561054357600080fd5b506104346105523660046132de565b611069565b34801561056357600080fd5b506103d1610572366004613136565b60146020526000908152604090205481565b34801561059057600080fd5b5061043461059f3660046130a9565b611093565b3480156105b057600080fd5b506104346105bf366004613310565b6110ad565b3480156105d057600080fd5b50610434611192565b3480156105e557600080fd5b506103d1600d5481565b3480156105fb57600080fd5b5061043461060a366004613136565b6111a4565b34801561061b57600080fd5b5061062f61062a36600461333c565b6111b1565b6040516103db9190613443565b34801561064857600080fd5b50610404610657366004613136565b600090815260046020526040902054151590565b34801561067757600080fd5b50610434610686366004613456565b6112da565b34801561069757600080fd5b506103d1600a5481565b3480156106ad57600080fd5b5060125461040490610100900460ff1681565b3480156106cc57600080fd5b50600354600160a01b900460ff16610404565b3480156106eb57600080fd5b506104346106fa366004613136565b61130e565b34801561070b57600080fd5b506103d160095481565b34801561072157600080fd5b506104346107303660046134af565b61131b565b34801561074157600080fd5b5061043461132e565b34801561075657600080fd5b50610434610765366004613524565b611340565b34801561077657600080fd5b50610434610785366004613136565b611390565b34801561079657600080fd5b5061043461139d565b3480156107ab57600080fd5b506104346107ba366004613136565b6113ad565b3480156107cb57600080fd5b506103d1600b5481565b3480156107e157600080fd5b506103d16107f0366004613136565b60136020526000908152604090205481565b34801561080e57600080fd5b5061082261081d3660046130a9565b6113ba565b604080516001600160a01b0390931683526001600160601b039091166020830152016103db565b34801561085557600080fd5b506003546001600160a01b03165b6040516001600160a01b0390911681526020016103db565b34801561088757600080fd5b5061046b611403565b34801561089c57600080fd5b5061046b611410565b6104346108b3366004613136565b61141d565b3480156108c457600080fd5b506104346108d336600461306d565b611842565b3480156108e457600080fd5b506104346108f3366004613560565b6118c2565b34801561090457600080fd5b5061046b610913366004613136565b6118d1565b34801561092457600080fd5b506103d1600c5481565b34801561093a57600080fd5b506103d1610949366004613136565b60009081526004602052604090205490565b34801561096757600080fd5b506103d160085481565b34801561097d57600080fd5b5061099161098c366004613136565b6118ea565b6040516103db91906135d9565b3480156109aa57600080fd5b506103d1600e5481565b3480156109c057600080fd5b506104346109cf36600461306d565b611979565b3480156109e057600080fd5b506104346119bd565b3480156109f557600080fd5b50610434611a01565b348015610a0a57600080fd5b50610434611ad9565b348015610a1f57600080fd5b50610434610a2e366004613136565b611b21565b348015610a3f57600080fd5b5061046b611b2e565b348015610a5457600080fd5b50610404610a633660046135ec565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610a9d57600080fd5b506012546104049060ff1681565b348015610ab757600080fd5b50610434610ac6366004613625565b611b3b565b348015610ad757600080fd5b50610434610ae636600461365a565b611c6d565b348015610af757600080fd5b50610434610b063660046132de565b611cb2565b348015610b1757600080fd5b50610434610b26366004613136565b611d28565b348015610b3757600080fd5b50610434610b46366004613625565b611d35565b348015610b5757600080fd5b50600f54610863906001600160a01b031681565b348015610b7757600080fd5b506012546104049062010000900460ff1681565b60006001600160a01b038316610bfb5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b031982166306fdde0360e01b1480610c5257506001600160e01b031982166395d89b4160e01b145b80610c6d57506001600160e01b03198216631131d2f360e21b145b80610c8857506001600160e01b0319821663152a902d60e11b145b80610c975750610c9782611d48565b92915050565b610ca5611d98565b610cae81611df2565b50565b610cb9611d98565b60009182526014602052604090912055565b60108054610cd8906136c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610d04906136c2565b8015610d515780601f10610d2657610100808354040283529160200191610d51565b820191906000526020600020905b815481529060010190602001808311610d3457829003601f168201915b505050505081565b6000818152601560205260409020805460609190610d76906136c2565b15159050610db0576007610d8983611e05565b604051602001610d9a9291906136fd565b6040516020818303038152906040529050919050565b60008281526015602052604090208054610dc9906136c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610df5906136c2565b8015610e425780601f10610e1757610100808354040283529160200191610e42565b820191906000526020600020905b815481529060010190602001808311610e2557829003601f168201915b50505050509050919050565b610e56611d98565b604080516001808252818301909252600091816020015b6040805180820190915260008082526020820152815260200190600190039081610e6d5790505090508181600081518110610eaa57610eaa613780565b6020026020010151602001906001600160601b031690816001600160601b0316815250508281600081518110610ee257610ee2613780565b60209081029190910101516001600160a01b039091169052610f048482611f2d565b50505050565b610f12611d98565b600c55565b6000828152600560209081526040808320805482518185028101850190935280835284938493929190849084015b82821015610f9457600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610f45565b50505050905060008151111561100d5780600081518110610fb757610fb7613780565b60200260200101516000015161271082600081518110610fd957610fd9613780565b6020026020010151602001516001600160601b031686610ff991906137ac565b61100391906137e1565b9250925050611016565b60008092509250505b9250929050565b6001600160a01b03851633148061103957506110398533610a63565b6110555760405162461bcd60e51b8152600401610bf2906137f5565b61106285858585856120b1565b5050505050565b611071611d98565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b61109b611d98565b60009182526013602052604090912055565b6003546001600160a01b03163314806110d05750600f546001600160a01b031633145b61110b5760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b6044820152606401610bf2565b600081611123576003546001600160a01b0316611130565b600f546001600160a01b03165b90506000816001600160a01b03168460405160006040518083038185875af1925050503d806000811461117f576040519150601f19603f3d011682016040523d82523d6000602084013e611184565b606091505b5050905080610f0457600080fd5b61119a611d98565b6111a261225b565b565b6111ac611d98565b600b55565b606081518351146112165760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610bf2565b600083516001600160401b0381111561123157611231612fb8565b60405190808252806020026020018201604052801561125a578160200160208202803683370190505b50905060005b84518110156112d2576112a585828151811061127e5761127e613780565b602002602001015185838151811061129857611298613780565b6020026020010151610b8b565b8282815181106112b7576112b7613780565b60209081029190910101526112cb81613844565b9050611260565b509392505050565b6112e2611d98565b81516112f5906010906020850190612ea4565b508051611309906011906020840190612ea4565b505050565b611316611d98565b600855565b611323611d98565b6113098383836122b0565b611336611d98565b6111a260006122f3565b611348611d98565b60125462010000900460ff16156113715760405162461bcd60e51b8152600401610bf29061385f565b6000828152601560209081526040909120825161130992840190612ea4565b611398611d98565b600d55565b6113a5611d98565b6111a2612345565b6113b5611d98565b600e55565b600560205281600052604060002081815481106113d657600080fd5b6000918252602090912001546001600160a01b0381169250600160a01b90046001600160601b0316905082565b60118054610cd8906136c2565b60078054610cd8906136c2565b60125460ff166114615760405162461bcd60e51b815260206004820152600f60248201526e73616c65206e6f742061637469766560881b6044820152606401610bf2565b600081116114a35760405162461bcd60e51b815260206004820152600f60248201526e6d696e74696e6720746f6f2066657760881b6044820152606401610bf2565b600a548111156114f55760405162461bcd60e51b815260206004820152601760248201527f657863656564656420706572206d696e74206c696d69740000000000000000006044820152606401610bf2565b348160095461150491906137ac565b11156115495760405162461bcd60e51b81526020600482015260146024820152731a5b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610bf2565b60006009548261155991906137ac565b6115639034613888565b9050801561159a57604051339082156108fc029083906000818181858888f19350505050158015611598573d6000803e3d6000fd5b505b6000806115a933600b54610b8b565b905060006115b933600c54610b8b565b905060006115d5600c5460009081526004602052604090205490565b600c54600090815260136020526040902054909150811080156116085750600c5460009081526014602052604090205482105b1561168b576008546040805160208101929092526bffffffffffffffffffffffff193360601b169082015260548101849052607481018390526000906064906094016040516020818303038152906040528051906020012060001c61166d919061389f565b905086600e5461167d91906137ac565b81101561168957600194505b505b83156116bc5761169c600187613888565b95506116bc33600c54600160405180602001604052806000815250612388565b85156117d757600b546000908152601360209081526040808320546004909252909120546116eb9088906138b3565b11156117445760405162461bcd60e51b815260206004820152602260248201527f7374616e6461726420746f6b656e20737570706c792063617020657863656564604482015261195960f21b6064820152608401610bf2565b600b5460009081526014602052604090205461176087856138b3565b11156117ba5760405162461bcd60e51b8152602060048201526024808201527f7374616e6461726420746f6b656e20706572736f6e616c2063617020657863656044820152631959195960e21b6064820152608401610bf2565b6117d733600b548860405180602001604052806000815250612388565b7fc21f2d8cc46e7ab1c5fa22cd2ed0ab74c24f941f667d240b714b978bcc6bea64600b5487600c548761180b57600061180e565b60015b6040805194855260208501939093529183015260ff16606082015233608082015260a00160405180910390a1505050505050565b61184a611d98565b60125462010000900460ff16156118735760405162461bcd60e51b8152600401610bf29061385f565b8051611886906007906020840190612ea4565b507fafa35f42f46f5052816d7c6a2e9406eca98294b20726677862d83b4a7418d8d560076040516118b791906138cb565b60405180910390a150565b6118cd3383836124ab565b5050565b60156020526000908152604090208054610cd8906136c2565b606060056000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561196e57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b03168183015282526001909201910161191f565b505050509050919050565b60125462010000900460ff16156119a25760405162461bcd60e51b8152600401610bf29061385f565b6119aa611d98565b80516118cd906006906020840190612ea4565b6119c5611d98565b60125462010000900460ff16156119ee5760405162461bcd60e51b8152600401610bf29061385f565b6012805462ff0000191662010000179055565b6000600d5411611a4a5760405162461bcd60e51b8152602060048201526014602482015273195e18da185b99d9481b9bdd08195b98589b195960621b6044820152606401610bf2565b6000611a5833600b54610b8b565b9050600d54811015611aac5760405162461bcd60e51b815260206004820152601760248201527f746f6f20666577207374616e6461726420746f6b656e730000000000000000006044820152606401610bf2565b611abb33600b54600d5461258c565b610cae33600c54600160405180602001604052806000815250612388565b611ae1611d98565b6012805460ff19811660ff91821615908117909255168015611b0b5750601254610100900460ff16155b156111a2576012805461ff001916610100179055565b611b29611d98565b600a55565b60068054610cd8906136c2565b611b43611d98565b6001600160a01b038316611b8b5760405162461bcd60e51b815260206004820152600f60248201526e7a65726f20746f2d6164647265737360881b6044820152606401610bf2565b60008281526013602052604090205415611c0557600082815260136020908152604080832054600490925290912054611bc59083906138b3565b1115611c055760405162461bcd60e51b815260206004820152600f60248201526e1cdd5c1c1b1e48195e18d959591959608a1b6044820152606401610bf2565b611c2083838360405180602001604052806000815250612388565b60408051838152602081018390526001600160a01b0385168183015290517f1daf399549c8b1715feb1d8528ae393bfb7e7b2684f0732357e5a4473422db569181900360600190a1505050565b6001600160a01b038516331480611c895750611c898533610a63565b611ca55760405162461bcd60e51b8152600401610bf2906137f5565b61106285858585856126a4565b611cba611d98565b6001600160a01b038116611d1f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bf2565b610cae816122f3565b611d30611d98565b600955565b611d3d611d98565b6113098383836127dc565b60006001600160e01b03198216636cdb3d1360e11b1480611d7957506001600160e01b031982166303a24d0760e21b145b80610c9757506301ffc9a760e01b6001600160e01b0319831614610c97565b6003546001600160a01b031633146111a25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bf2565b80516118cd906002906020840190612ea4565b606081611e295750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e535780611e3d81613844565b9150611e4c9050600a836137e1565b9150611e2d565b6000816001600160401b03811115611e6d57611e6d612fb8565b6040519080825280601f01601f191660200182016040528015611e97576020820181803683370190505b509050815b8515611f2457611ead600182613888565b90506000611ebc600a886137e1565b611ec790600a6137ac565b611ed19088613888565b611edc906030613950565b905060008160f81b905080848481518110611ef957611ef9613780565b60200101906001600160f81b031916908160001a905350611f1b600a896137e1565b97505050611e9c565b50949350505050565b60005b81518110156120a65760006001600160a01b0316828281518110611f5657611f56613780565b6020026020010151600001516001600160a01b03161415611fb95760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e7400000000006044820152606401610bf2565b818181518110611fcb57611fcb613780565b6020026020010151602001516001600160601b0316600014156120305760405162461bcd60e51b815260206004820181905260248201527f526f79616c74792076616c75652073686f756c6420626520706f7369746976656044820152606401610bf2565b6000838152600560205260409020825183908390811061205257612052613780565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b03909116179101558061209e81613844565b915050611f30565b506118cd828261281f565b81518351146120d25760405162461bcd60e51b8152600401610bf290613975565b6001600160a01b0384166120f85760405162461bcd60e51b8152600401610bf2906139bd565b3361210781878787878761285c565b60005b84518110156121ed57600085828151811061212757612127613780565b60200260200101519050600085838151811061214557612145613780565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156121955760405162461bcd60e51b8152600401610bf290613a02565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906121d29084906138b3565b92505081905550505050806121e690613844565b905061210a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161223d929190613a4c565b60405180910390a4612253818787878787612872565b505050505050565b6122636129dd565b6003805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0383163314806122cc57506122cc8333610a63565b6122e85760405162461bcd60e51b8152600401610bf2906137f5565b611309838383612a2d565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61234d612bc9565b6003805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122933390565b6001600160a01b0384166123e85760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610bf2565b3360006123f485612c16565b9050600061240185612c16565b90506124128360008985858961285c565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906124429084906138b3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46124a283600089898989612c61565b50505050505050565b816001600160a01b0316836001600160a01b0316141561251f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610bf2565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383166125b25760405162461bcd60e51b8152600401610bf290613a7a565b3360006125be84612c16565b905060006125cb84612c16565b90506125eb8387600085856040518060200160405280600081525061285c565b6000858152602081815260408083206001600160a01b038a1684529091529020548481101561262c5760405162461bcd60e51b8152600401610bf290613abd565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526124a2565b6001600160a01b0384166126ca5760405162461bcd60e51b8152600401610bf2906139bd565b3360006126d685612c16565b905060006126e385612c16565b90506126f383898985858961285c565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156127345760405162461bcd60e51b8152600401610bf290613a02565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906127719084906138b3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46127d1848a8a8a8a8a612c61565b505050505050505050565b6001600160a01b0383163314806127f857506127f88333610a63565b6128145760405162461bcd60e51b8152600401610bf2906137f5565b61130983838361258c565b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df8282604051612850929190613b01565b60405180910390a15050565b612864612bc9565b612253868686868686612d2b565b6001600160a01b0384163b156122535760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906128b69089908990889088908890600401613b1a565b602060405180830381600087803b1580156128d057600080fd5b505af1925050508015612900575060408051601f3d908101601f191682019092526128fd91810190613b78565b60015b6129ad5761290c613b95565b806308c379a014156129465750612921613bb1565b8061292c5750612948565b8060405162461bcd60e51b8152600401610bf29190613123565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610bf2565b6001600160e01b0319811663bc197c8160e01b146124a25760405162461bcd60e51b8152600401610bf290613c3a565b600354600160a01b900460ff166111a25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610bf2565b6001600160a01b038316612a535760405162461bcd60e51b8152600401610bf290613a7a565b8051825114612a745760405162461bcd60e51b8152600401610bf290613975565b6000339050612a978185600086866040518060200160405280600081525061285c565b60005b8351811015612b5c576000848281518110612ab757612ab7613780565b602002602001015190506000848381518110612ad557612ad5613780565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015612b255760405162461bcd60e51b8152600401610bf290613abd565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580612b5481613844565b915050612a9a565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612bad929190613a4c565b60405180910390a4604080516020810190915260009052610f04565b600354600160a01b900460ff16156111a25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bf2565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612c5057612c50613780565b602090810291909101015292915050565b6001600160a01b0384163b156122535760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612ca59089908990889088908890600401613c82565b602060405180830381600087803b158015612cbf57600080fd5b505af1925050508015612cef575060408051601f3d908101601f19168201909252612cec91810190613b78565b60015b612cfb5761290c613b95565b6001600160e01b0319811663f23a6e6160e01b146124a25760405162461bcd60e51b8152600401610bf290613c3a565b6001600160a01b038516612db25760005b8351811015612db057828181518110612d5757612d57613780565b602002602001015160046000868481518110612d7557612d75613780565b602002602001015181526020019081526020016000206000828254612d9a91906138b3565b90915550612da9905081613844565b9050612d3c565b505b6001600160a01b0384166122535760005b83518110156124a2576000848281518110612de057612de0613780565b602002602001015190506000848381518110612dfe57612dfe613780565b6020026020010151905060006004600084815260200190815260200160002054905081811015612e815760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610bf2565b60009283526004602052604090922091039055612e9d81613844565b9050612dc3565b828054612eb0906136c2565b90600052602060002090601f016020900481019282612ed25760008555612f18565b82601f10612eeb57805160ff1916838001178555612f18565b82800160010185558215612f18579182015b82811115612f18578251825591602001919060010190612efd565b50612f24929150612f28565b5090565b5b80821115612f245760008155600101612f29565b6001600160a01b0381168114610cae57600080fd5b60008060408385031215612f6557600080fd5b8235612f7081612f3d565b946020939093013593505050565b6001600160e01b031981168114610cae57600080fd5b600060208284031215612fa657600080fd5b8135612fb181612f7e565b9392505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612ff357612ff3612fb8565b6040525050565b600082601f83011261300b57600080fd5b81356001600160401b0381111561302457613024612fb8565b60405161303b601f8301601f191660200182612fce565b81815284602083860101111561305057600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561307f57600080fd5b81356001600160401b0381111561309557600080fd5b6130a184828501612ffa565b949350505050565b600080604083850312156130bc57600080fd5b50508035926020909101359150565b60005b838110156130e65781810151838201526020016130ce565b83811115610f045750506000910152565b6000815180845261310f8160208601602086016130cb565b601f01601f19169290920160200192915050565b602081526000612fb160208301846130f7565b60006020828403121561314857600080fd5b5035919050565b60008060006060848603121561316457600080fd5b83359250602084013561317681612f3d565b915060408401356001600160601b038116811461319257600080fd5b809150509250925092565b60006001600160401b038211156131b6576131b6612fb8565b5060051b60200190565b600082601f8301126131d157600080fd5b813560206131de8261319d565b6040516131eb8282612fce565b83815260059390931b850182019282810191508684111561320b57600080fd5b8286015b84811015613226578035835291830191830161320f565b509695505050505050565b600080600080600060a0868803121561324957600080fd5b853561325481612f3d565b9450602086013561326481612f3d565b935060408601356001600160401b038082111561328057600080fd5b61328c89838a016131c0565b945060608801359150808211156132a257600080fd5b6132ae89838a016131c0565b935060808801359150808211156132c457600080fd5b506132d188828901612ffa565b9150509295509295909350565b6000602082840312156132f057600080fd5b8135612fb181612f3d565b8035801515811461330b57600080fd5b919050565b6000806040838503121561332357600080fd5b82359150613333602084016132fb565b90509250929050565b6000806040838503121561334f57600080fd5b82356001600160401b038082111561336657600080fd5b818501915085601f83011261337a57600080fd5b813560206133878261319d565b6040516133948282612fce565b83815260059390931b85018201928281019150898411156133b457600080fd5b948201945b838610156133db5785356133cc81612f3d565b825294820194908201906133b9565b965050860135925050808211156133f157600080fd5b506133fe858286016131c0565b9150509250929050565b600081518084526020808501945080840160005b838110156134385781518752958201959082019060010161341c565b509495945050505050565b602081526000612fb16020830184613408565b6000806040838503121561346957600080fd5b82356001600160401b038082111561348057600080fd5b61348c86838701612ffa565b935060208501359150808211156134a257600080fd5b506133fe85828601612ffa565b6000806000606084860312156134c457600080fd5b83356134cf81612f3d565b925060208401356001600160401b03808211156134eb57600080fd5b6134f7878388016131c0565b9350604086013591508082111561350d57600080fd5b5061351a868287016131c0565b9150509250925092565b6000806040838503121561353757600080fd5b8235915060208301356001600160401b0381111561355457600080fd5b6133fe85828601612ffa565b6000806040838503121561357357600080fd5b823561357e81612f3d565b9150613333602084016132fb565b600081518084526020808501945080840160005b8381101561343857815180516001600160a01b031688528301516001600160601b031683880152604090960195908201906001016135a0565b602081526000612fb1602083018461358c565b600080604083850312156135ff57600080fd5b823561360a81612f3d565b9150602083013561361a81612f3d565b809150509250929050565b60008060006060848603121561363a57600080fd5b833561364581612f3d565b95602085013595506040909401359392505050565b600080600080600060a0868803121561367257600080fd5b853561367d81612f3d565b9450602086013561368d81612f3d565b9350604086013592506060860135915060808601356001600160401b038111156136b657600080fd5b6132d188828901612ffa565b600181811c908216806136d657607f821691505b602082108114156136f757634e487b7160e01b600052602260045260246000fd5b50919050565b600080845461370b816136c2565b60018281168015613723576001811461373457613763565b60ff19841687528287019450613763565b8860005260208060002060005b8581101561375a5781548a820152908401908201613741565b50505082870194505b5050505083516137778183602088016130cb565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156137c6576137c6613796565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826137f0576137f06137cb565b500490565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b600060001982141561385857613858613796565b5060010190565b6020808252600f908201526e36b2ba30b230ba3090333937bd32b760891b604082015260600190565b60008282101561389a5761389a613796565b500390565b6000826138ae576138ae6137cb565b500690565b600082198211156138c6576138c6613796565b500190565b60006020808352600084546138df816136c2565b80848701526040600180841660008114613900576001811461391457613942565b60ff19851689840152606089019550613942565b896000528660002060005b8581101561393a5781548b820186015290830190880161391f565b8a0184019650505b509398975050505050505050565b600060ff821660ff84168060ff0382111561396d5761396d613796565b019392505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000613a5f6040830185613408565b8281036020840152613a718185613408565b95945050505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b8281526040602082015260006130a1604083018461358c565b6001600160a01b0386811682528516602082015260a060408201819052600090613b4690830186613408565b8281036060840152613b588186613408565b90508281036080840152613b6c81856130f7565b98975050505050505050565b600060208284031215613b8a57600080fd5b8151612fb181612f7e565b600060033d1115613bae5760046000803e5060005160e01c5b90565b600060443d1015613bbf5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715613bee57505050505090565b8285019150815181811115613c065750505050505090565b843d8701016020828501011115613c205750505050505090565b613c2f60208286010187612fce565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613cbc908301846130f7565b97965050505050505056fea26469706673582212209f1a3d6ed1fdfa130a8ceed56d75851b914cf9de9be1dc3b024ca6c426d7a63764736f6c63430008090033", + "deployedBytecode": "0x6080604052600436106103a55760003560e01c8063857aa89a116101e7578063cb5dcaec1161010d578063eb8d2444116100a0578063f4a0a5281161006f578063f4a0a52814610b0b578063f5298aca14610b2b578063f5dc7d5614610b4b578063fb3cc6c214610b6b57600080fd5b8063eb8d244414610a91578063edb2625514610aab578063f242432a14610acb578063f2fde38b14610aeb57600080fd5b8063daaeec86116100dc578063daaeec86146109fe578063db6242c314610a13578063e8a3d48514610a33578063e985e9c514610a4857600080fd5b8063cb5dcaec1461099e578063ccb4807b146109b4578063d111515d146109d4578063d2f7265a146109e957600080fd5b8063a0712d6811610185578063b4d7dbed11610154578063b4d7dbed14610918578063bd85b0391461092e578063bfa0b1331461095b578063cad96cca1461097157600080fd5b8063a0712d68146108a5578063a0bcfc7f146108b8578063a22cb465146108d8578063a65b9926146108f857600080fd5b80638924af74116101c15780638924af74146108025780638da5cb5b1461084957806395d89b411461087b5780639abc83201461089057600080fd5b8063857aa89a1461079f578063857c2985146107bf578063869f7594146107d557600080fd5b80634006ccc5116102cc5780635c975abb1161026a578063715018a611610239578063715018a614610735578063782f08ae1461074a5780637c7810801461076a5780638456cb591461078a57600080fd5b80635c975abb146106c0578063611ef44f146106df5780636817c76c146106ff5780636b20c4541461071557600080fd5b80634f558e79116102a65780634f558e791461063c578063504334c21461066b578063507e094f1461068b5780635c474f9e146106a157600080fd5b80634006ccc5146105d95780634798b851146105ef5780634e1273f41461060f57600080fd5b80632591003311610344578063311aaef511610313578063311aaef51461055757806337da577c1461058457806338d07436146105a45780633f4ba83a146105c457600080fd5b806325910033146104b85780632a55205a146104d85780632eb2c2d61461051757806330027f3b1461053757600080fd5b8063064c6b3811610380578063064c6b381461043657806306fdde03146104565780630e89341c14610478578063143094db1461049857600080fd5b8062fdd58e146103b157806301ffc9a7146103e457806302fe53051461041457600080fd5b366103ac57005b600080fd5b3480156103bd57600080fd5b506103d16103cc366004612f52565b610b8b565b6040519081526020015b60405180910390f35b3480156103f057600080fd5b506104046103ff366004612f94565b610c21565b60405190151581526020016103db565b34801561042057600080fd5b5061043461042f36600461306d565b610c9d565b005b34801561044257600080fd5b506104346104513660046130a9565b610cb1565b34801561046257600080fd5b5061046b610ccb565b6040516103db9190613123565b34801561048457600080fd5b5061046b610493366004613136565b610d59565b3480156104a457600080fd5b506104346104b336600461314f565b610e4e565b3480156104c457600080fd5b506104346104d3366004613136565b610f0a565b3480156104e457600080fd5b506104f86104f33660046130a9565b610f17565b604080516001600160a01b0390931683526020830191909152016103db565b34801561052357600080fd5b50610434610532366004613231565b61101d565b34801561054357600080fd5b506104346105523660046132de565b611069565b34801561056357600080fd5b506103d1610572366004613136565b60146020526000908152604090205481565b34801561059057600080fd5b5061043461059f3660046130a9565b611093565b3480156105b057600080fd5b506104346105bf366004613310565b6110ad565b3480156105d057600080fd5b50610434611192565b3480156105e557600080fd5b506103d1600d5481565b3480156105fb57600080fd5b5061043461060a366004613136565b6111a4565b34801561061b57600080fd5b5061062f61062a36600461333c565b6111b1565b6040516103db9190613443565b34801561064857600080fd5b50610404610657366004613136565b600090815260046020526040902054151590565b34801561067757600080fd5b50610434610686366004613456565b6112da565b34801561069757600080fd5b506103d1600a5481565b3480156106ad57600080fd5b5060125461040490610100900460ff1681565b3480156106cc57600080fd5b50600354600160a01b900460ff16610404565b3480156106eb57600080fd5b506104346106fa366004613136565b61130e565b34801561070b57600080fd5b506103d160095481565b34801561072157600080fd5b506104346107303660046134af565b61131b565b34801561074157600080fd5b5061043461132e565b34801561075657600080fd5b50610434610765366004613524565b611340565b34801561077657600080fd5b50610434610785366004613136565b611390565b34801561079657600080fd5b5061043461139d565b3480156107ab57600080fd5b506104346107ba366004613136565b6113ad565b3480156107cb57600080fd5b506103d1600b5481565b3480156107e157600080fd5b506103d16107f0366004613136565b60136020526000908152604090205481565b34801561080e57600080fd5b5061082261081d3660046130a9565b6113ba565b604080516001600160a01b0390931683526001600160601b039091166020830152016103db565b34801561085557600080fd5b506003546001600160a01b03165b6040516001600160a01b0390911681526020016103db565b34801561088757600080fd5b5061046b611403565b34801561089c57600080fd5b5061046b611410565b6104346108b3366004613136565b61141d565b3480156108c457600080fd5b506104346108d336600461306d565b611842565b3480156108e457600080fd5b506104346108f3366004613560565b6118c2565b34801561090457600080fd5b5061046b610913366004613136565b6118d1565b34801561092457600080fd5b506103d1600c5481565b34801561093a57600080fd5b506103d1610949366004613136565b60009081526004602052604090205490565b34801561096757600080fd5b506103d160085481565b34801561097d57600080fd5b5061099161098c366004613136565b6118ea565b6040516103db91906135d9565b3480156109aa57600080fd5b506103d1600e5481565b3480156109c057600080fd5b506104346109cf36600461306d565b611979565b3480156109e057600080fd5b506104346119bd565b3480156109f557600080fd5b50610434611a01565b348015610a0a57600080fd5b50610434611ad9565b348015610a1f57600080fd5b50610434610a2e366004613136565b611b21565b348015610a3f57600080fd5b5061046b611b2e565b348015610a5457600080fd5b50610404610a633660046135ec565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610a9d57600080fd5b506012546104049060ff1681565b348015610ab757600080fd5b50610434610ac6366004613625565b611b3b565b348015610ad757600080fd5b50610434610ae636600461365a565b611c6d565b348015610af757600080fd5b50610434610b063660046132de565b611cb2565b348015610b1757600080fd5b50610434610b26366004613136565b611d28565b348015610b3757600080fd5b50610434610b46366004613625565b611d35565b348015610b5757600080fd5b50600f54610863906001600160a01b031681565b348015610b7757600080fd5b506012546104049062010000900460ff1681565b60006001600160a01b038316610bfb5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b031982166306fdde0360e01b1480610c5257506001600160e01b031982166395d89b4160e01b145b80610c6d57506001600160e01b03198216631131d2f360e21b145b80610c8857506001600160e01b0319821663152a902d60e11b145b80610c975750610c9782611d48565b92915050565b610ca5611d98565b610cae81611df2565b50565b610cb9611d98565b60009182526014602052604090912055565b60108054610cd8906136c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610d04906136c2565b8015610d515780601f10610d2657610100808354040283529160200191610d51565b820191906000526020600020905b815481529060010190602001808311610d3457829003601f168201915b505050505081565b6000818152601560205260409020805460609190610d76906136c2565b15159050610db0576007610d8983611e05565b604051602001610d9a9291906136fd565b6040516020818303038152906040529050919050565b60008281526015602052604090208054610dc9906136c2565b80601f0160208091040260200160405190810160405280929190818152602001828054610df5906136c2565b8015610e425780601f10610e1757610100808354040283529160200191610e42565b820191906000526020600020905b815481529060010190602001808311610e2557829003601f168201915b50505050509050919050565b610e56611d98565b604080516001808252818301909252600091816020015b6040805180820190915260008082526020820152815260200190600190039081610e6d5790505090508181600081518110610eaa57610eaa613780565b6020026020010151602001906001600160601b031690816001600160601b0316815250508281600081518110610ee257610ee2613780565b60209081029190910101516001600160a01b039091169052610f048482611f2d565b50505050565b610f12611d98565b600c55565b6000828152600560209081526040808320805482518185028101850190935280835284938493929190849084015b82821015610f9457600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610f45565b50505050905060008151111561100d5780600081518110610fb757610fb7613780565b60200260200101516000015161271082600081518110610fd957610fd9613780565b6020026020010151602001516001600160601b031686610ff991906137ac565b61100391906137e1565b9250925050611016565b60008092509250505b9250929050565b6001600160a01b03851633148061103957506110398533610a63565b6110555760405162461bcd60e51b8152600401610bf2906137f5565b61106285858585856120b1565b5050505050565b611071611d98565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b61109b611d98565b60009182526013602052604090912055565b6003546001600160a01b03163314806110d05750600f546001600160a01b031633145b61110b5760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b6044820152606401610bf2565b600081611123576003546001600160a01b0316611130565b600f546001600160a01b03165b90506000816001600160a01b03168460405160006040518083038185875af1925050503d806000811461117f576040519150601f19603f3d011682016040523d82523d6000602084013e611184565b606091505b5050905080610f0457600080fd5b61119a611d98565b6111a261225b565b565b6111ac611d98565b600b55565b606081518351146112165760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610bf2565b600083516001600160401b0381111561123157611231612fb8565b60405190808252806020026020018201604052801561125a578160200160208202803683370190505b50905060005b84518110156112d2576112a585828151811061127e5761127e613780565b602002602001015185838151811061129857611298613780565b6020026020010151610b8b565b8282815181106112b7576112b7613780565b60209081029190910101526112cb81613844565b9050611260565b509392505050565b6112e2611d98565b81516112f5906010906020850190612ea4565b508051611309906011906020840190612ea4565b505050565b611316611d98565b600855565b611323611d98565b6113098383836122b0565b611336611d98565b6111a260006122f3565b611348611d98565b60125462010000900460ff16156113715760405162461bcd60e51b8152600401610bf29061385f565b6000828152601560209081526040909120825161130992840190612ea4565b611398611d98565b600d55565b6113a5611d98565b6111a2612345565b6113b5611d98565b600e55565b600560205281600052604060002081815481106113d657600080fd5b6000918252602090912001546001600160a01b0381169250600160a01b90046001600160601b0316905082565b60118054610cd8906136c2565b60078054610cd8906136c2565b60125460ff166114615760405162461bcd60e51b815260206004820152600f60248201526e73616c65206e6f742061637469766560881b6044820152606401610bf2565b600081116114a35760405162461bcd60e51b815260206004820152600f60248201526e6d696e74696e6720746f6f2066657760881b6044820152606401610bf2565b600a548111156114f55760405162461bcd60e51b815260206004820152601760248201527f657863656564656420706572206d696e74206c696d69740000000000000000006044820152606401610bf2565b348160095461150491906137ac565b11156115495760405162461bcd60e51b81526020600482015260146024820152731a5b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610bf2565b60006009548261155991906137ac565b6115639034613888565b9050801561159a57604051339082156108fc029083906000818181858888f19350505050158015611598573d6000803e3d6000fd5b505b6000806115a933600b54610b8b565b905060006115b933600c54610b8b565b905060006115d5600c5460009081526004602052604090205490565b600c54600090815260136020526040902054909150811080156116085750600c5460009081526014602052604090205482105b1561168b576008546040805160208101929092526bffffffffffffffffffffffff193360601b169082015260548101849052607481018390526000906064906094016040516020818303038152906040528051906020012060001c61166d919061389f565b905086600e5461167d91906137ac565b81101561168957600194505b505b83156116bc5761169c600187613888565b95506116bc33600c54600160405180602001604052806000815250612388565b85156117d757600b546000908152601360209081526040808320546004909252909120546116eb9088906138b3565b11156117445760405162461bcd60e51b815260206004820152602260248201527f7374616e6461726420746f6b656e20737570706c792063617020657863656564604482015261195960f21b6064820152608401610bf2565b600b5460009081526014602052604090205461176087856138b3565b11156117ba5760405162461bcd60e51b8152602060048201526024808201527f7374616e6461726420746f6b656e20706572736f6e616c2063617020657863656044820152631959195960e21b6064820152608401610bf2565b6117d733600b548860405180602001604052806000815250612388565b7fc21f2d8cc46e7ab1c5fa22cd2ed0ab74c24f941f667d240b714b978bcc6bea64600b5487600c548761180b57600061180e565b60015b6040805194855260208501939093529183015260ff16606082015233608082015260a00160405180910390a1505050505050565b61184a611d98565b60125462010000900460ff16156118735760405162461bcd60e51b8152600401610bf29061385f565b8051611886906007906020840190612ea4565b507fafa35f42f46f5052816d7c6a2e9406eca98294b20726677862d83b4a7418d8d560076040516118b791906138cb565b60405180910390a150565b6118cd3383836124ab565b5050565b60156020526000908152604090208054610cd8906136c2565b606060056000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561196e57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b03168183015282526001909201910161191f565b505050509050919050565b60125462010000900460ff16156119a25760405162461bcd60e51b8152600401610bf29061385f565b6119aa611d98565b80516118cd906006906020840190612ea4565b6119c5611d98565b60125462010000900460ff16156119ee5760405162461bcd60e51b8152600401610bf29061385f565b6012805462ff0000191662010000179055565b6000600d5411611a4a5760405162461bcd60e51b8152602060048201526014602482015273195e18da185b99d9481b9bdd08195b98589b195960621b6044820152606401610bf2565b6000611a5833600b54610b8b565b9050600d54811015611aac5760405162461bcd60e51b815260206004820152601760248201527f746f6f20666577207374616e6461726420746f6b656e730000000000000000006044820152606401610bf2565b611abb33600b54600d5461258c565b610cae33600c54600160405180602001604052806000815250612388565b611ae1611d98565b6012805460ff19811660ff91821615908117909255168015611b0b5750601254610100900460ff16155b156111a2576012805461ff001916610100179055565b611b29611d98565b600a55565b60068054610cd8906136c2565b611b43611d98565b6001600160a01b038316611b8b5760405162461bcd60e51b815260206004820152600f60248201526e7a65726f20746f2d6164647265737360881b6044820152606401610bf2565b60008281526013602052604090205415611c0557600082815260136020908152604080832054600490925290912054611bc59083906138b3565b1115611c055760405162461bcd60e51b815260206004820152600f60248201526e1cdd5c1c1b1e48195e18d959591959608a1b6044820152606401610bf2565b611c2083838360405180602001604052806000815250612388565b60408051838152602081018390526001600160a01b0385168183015290517f1daf399549c8b1715feb1d8528ae393bfb7e7b2684f0732357e5a4473422db569181900360600190a1505050565b6001600160a01b038516331480611c895750611c898533610a63565b611ca55760405162461bcd60e51b8152600401610bf2906137f5565b61106285858585856126a4565b611cba611d98565b6001600160a01b038116611d1f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bf2565b610cae816122f3565b611d30611d98565b600955565b611d3d611d98565b6113098383836127dc565b60006001600160e01b03198216636cdb3d1360e11b1480611d7957506001600160e01b031982166303a24d0760e21b145b80610c9757506301ffc9a760e01b6001600160e01b0319831614610c97565b6003546001600160a01b031633146111a25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bf2565b80516118cd906002906020840190612ea4565b606081611e295750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e535780611e3d81613844565b9150611e4c9050600a836137e1565b9150611e2d565b6000816001600160401b03811115611e6d57611e6d612fb8565b6040519080825280601f01601f191660200182016040528015611e97576020820181803683370190505b509050815b8515611f2457611ead600182613888565b90506000611ebc600a886137e1565b611ec790600a6137ac565b611ed19088613888565b611edc906030613950565b905060008160f81b905080848481518110611ef957611ef9613780565b60200101906001600160f81b031916908160001a905350611f1b600a896137e1565b97505050611e9c565b50949350505050565b60005b81518110156120a65760006001600160a01b0316828281518110611f5657611f56613780565b6020026020010151600001516001600160a01b03161415611fb95760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e7400000000006044820152606401610bf2565b818181518110611fcb57611fcb613780565b6020026020010151602001516001600160601b0316600014156120305760405162461bcd60e51b815260206004820181905260248201527f526f79616c74792076616c75652073686f756c6420626520706f7369746976656044820152606401610bf2565b6000838152600560205260409020825183908390811061205257612052613780565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b03909116179101558061209e81613844565b915050611f30565b506118cd828261281f565b81518351146120d25760405162461bcd60e51b8152600401610bf290613975565b6001600160a01b0384166120f85760405162461bcd60e51b8152600401610bf2906139bd565b3361210781878787878761285c565b60005b84518110156121ed57600085828151811061212757612127613780565b60200260200101519050600085838151811061214557612145613780565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156121955760405162461bcd60e51b8152600401610bf290613a02565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906121d29084906138b3565b92505081905550505050806121e690613844565b905061210a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161223d929190613a4c565b60405180910390a4612253818787878787612872565b505050505050565b6122636129dd565b6003805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b0383163314806122cc57506122cc8333610a63565b6122e85760405162461bcd60e51b8152600401610bf2906137f5565b611309838383612a2d565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61234d612bc9565b6003805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122933390565b6001600160a01b0384166123e85760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610bf2565b3360006123f485612c16565b9050600061240185612c16565b90506124128360008985858961285c565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906124429084906138b3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46124a283600089898989612c61565b50505050505050565b816001600160a01b0316836001600160a01b0316141561251f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610bf2565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0383166125b25760405162461bcd60e51b8152600401610bf290613a7a565b3360006125be84612c16565b905060006125cb84612c16565b90506125eb8387600085856040518060200160405280600081525061285c565b6000858152602081815260408083206001600160a01b038a1684529091529020548481101561262c5760405162461bcd60e51b8152600401610bf290613abd565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526124a2565b6001600160a01b0384166126ca5760405162461bcd60e51b8152600401610bf2906139bd565b3360006126d685612c16565b905060006126e385612c16565b90506126f383898985858961285c565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156127345760405162461bcd60e51b8152600401610bf290613a02565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906127719084906138b3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46127d1848a8a8a8a8a612c61565b505050505050505050565b6001600160a01b0383163314806127f857506127f88333610a63565b6128145760405162461bcd60e51b8152600401610bf2906137f5565b61130983838361258c565b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df8282604051612850929190613b01565b60405180910390a15050565b612864612bc9565b612253868686868686612d2b565b6001600160a01b0384163b156122535760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906128b69089908990889088908890600401613b1a565b602060405180830381600087803b1580156128d057600080fd5b505af1925050508015612900575060408051601f3d908101601f191682019092526128fd91810190613b78565b60015b6129ad5761290c613b95565b806308c379a014156129465750612921613bb1565b8061292c5750612948565b8060405162461bcd60e51b8152600401610bf29190613123565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610bf2565b6001600160e01b0319811663bc197c8160e01b146124a25760405162461bcd60e51b8152600401610bf290613c3a565b600354600160a01b900460ff166111a25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610bf2565b6001600160a01b038316612a535760405162461bcd60e51b8152600401610bf290613a7a565b8051825114612a745760405162461bcd60e51b8152600401610bf290613975565b6000339050612a978185600086866040518060200160405280600081525061285c565b60005b8351811015612b5c576000848281518110612ab757612ab7613780565b602002602001015190506000848381518110612ad557612ad5613780565b602090810291909101810151600084815280835260408082206001600160a01b038c168352909352919091205490915081811015612b255760405162461bcd60e51b8152600401610bf290613abd565b6000928352602083815260408085206001600160a01b038b1686529091529092209103905580612b5481613844565b915050612a9a565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612bad929190613a4c565b60405180910390a4604080516020810190915260009052610f04565b600354600160a01b900460ff16156111a25760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610bf2565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612c5057612c50613780565b602090810291909101015292915050565b6001600160a01b0384163b156122535760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612ca59089908990889088908890600401613c82565b602060405180830381600087803b158015612cbf57600080fd5b505af1925050508015612cef575060408051601f3d908101601f19168201909252612cec91810190613b78565b60015b612cfb5761290c613b95565b6001600160e01b0319811663f23a6e6160e01b146124a25760405162461bcd60e51b8152600401610bf290613c3a565b6001600160a01b038516612db25760005b8351811015612db057828181518110612d5757612d57613780565b602002602001015160046000868481518110612d7557612d75613780565b602002602001015181526020019081526020016000206000828254612d9a91906138b3565b90915550612da9905081613844565b9050612d3c565b505b6001600160a01b0384166122535760005b83518110156124a2576000848281518110612de057612de0613780565b602002602001015190506000848381518110612dfe57612dfe613780565b6020026020010151905060006004600084815260200190815260200160002054905081811015612e815760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610bf2565b60009283526004602052604090922091039055612e9d81613844565b9050612dc3565b828054612eb0906136c2565b90600052602060002090601f016020900481019282612ed25760008555612f18565b82601f10612eeb57805160ff1916838001178555612f18565b82800160010185558215612f18579182015b82811115612f18578251825591602001919060010190612efd565b50612f24929150612f28565b5090565b5b80821115612f245760008155600101612f29565b6001600160a01b0381168114610cae57600080fd5b60008060408385031215612f6557600080fd5b8235612f7081612f3d565b946020939093013593505050565b6001600160e01b031981168114610cae57600080fd5b600060208284031215612fa657600080fd5b8135612fb181612f7e565b9392505050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612ff357612ff3612fb8565b6040525050565b600082601f83011261300b57600080fd5b81356001600160401b0381111561302457613024612fb8565b60405161303b601f8301601f191660200182612fce565b81815284602083860101111561305057600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561307f57600080fd5b81356001600160401b0381111561309557600080fd5b6130a184828501612ffa565b949350505050565b600080604083850312156130bc57600080fd5b50508035926020909101359150565b60005b838110156130e65781810151838201526020016130ce565b83811115610f045750506000910152565b6000815180845261310f8160208601602086016130cb565b601f01601f19169290920160200192915050565b602081526000612fb160208301846130f7565b60006020828403121561314857600080fd5b5035919050565b60008060006060848603121561316457600080fd5b83359250602084013561317681612f3d565b915060408401356001600160601b038116811461319257600080fd5b809150509250925092565b60006001600160401b038211156131b6576131b6612fb8565b5060051b60200190565b600082601f8301126131d157600080fd5b813560206131de8261319d565b6040516131eb8282612fce565b83815260059390931b850182019282810191508684111561320b57600080fd5b8286015b84811015613226578035835291830191830161320f565b509695505050505050565b600080600080600060a0868803121561324957600080fd5b853561325481612f3d565b9450602086013561326481612f3d565b935060408601356001600160401b038082111561328057600080fd5b61328c89838a016131c0565b945060608801359150808211156132a257600080fd5b6132ae89838a016131c0565b935060808801359150808211156132c457600080fd5b506132d188828901612ffa565b9150509295509295909350565b6000602082840312156132f057600080fd5b8135612fb181612f3d565b8035801515811461330b57600080fd5b919050565b6000806040838503121561332357600080fd5b82359150613333602084016132fb565b90509250929050565b6000806040838503121561334f57600080fd5b82356001600160401b038082111561336657600080fd5b818501915085601f83011261337a57600080fd5b813560206133878261319d565b6040516133948282612fce565b83815260059390931b85018201928281019150898411156133b457600080fd5b948201945b838610156133db5785356133cc81612f3d565b825294820194908201906133b9565b965050860135925050808211156133f157600080fd5b506133fe858286016131c0565b9150509250929050565b600081518084526020808501945080840160005b838110156134385781518752958201959082019060010161341c565b509495945050505050565b602081526000612fb16020830184613408565b6000806040838503121561346957600080fd5b82356001600160401b038082111561348057600080fd5b61348c86838701612ffa565b935060208501359150808211156134a257600080fd5b506133fe85828601612ffa565b6000806000606084860312156134c457600080fd5b83356134cf81612f3d565b925060208401356001600160401b03808211156134eb57600080fd5b6134f7878388016131c0565b9350604086013591508082111561350d57600080fd5b5061351a868287016131c0565b9150509250925092565b6000806040838503121561353757600080fd5b8235915060208301356001600160401b0381111561355457600080fd5b6133fe85828601612ffa565b6000806040838503121561357357600080fd5b823561357e81612f3d565b9150613333602084016132fb565b600081518084526020808501945080840160005b8381101561343857815180516001600160a01b031688528301516001600160601b031683880152604090960195908201906001016135a0565b602081526000612fb1602083018461358c565b600080604083850312156135ff57600080fd5b823561360a81612f3d565b9150602083013561361a81612f3d565b809150509250929050565b60008060006060848603121561363a57600080fd5b833561364581612f3d565b95602085013595506040909401359392505050565b600080600080600060a0868803121561367257600080fd5b853561367d81612f3d565b9450602086013561368d81612f3d565b9350604086013592506060860135915060808601356001600160401b038111156136b657600080fd5b6132d188828901612ffa565b600181811c908216806136d657607f821691505b602082108114156136f757634e487b7160e01b600052602260045260246000fd5b50919050565b600080845461370b816136c2565b60018281168015613723576001811461373457613763565b60ff19841687528287019450613763565b8860005260208060002060005b8581101561375a5781548a820152908401908201613741565b50505082870194505b5050505083516137778183602088016130cb565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156137c6576137c6613796565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826137f0576137f06137cb565b500490565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b600060001982141561385857613858613796565b5060010190565b6020808252600f908201526e36b2ba30b230ba3090333937bd32b760891b604082015260600190565b60008282101561389a5761389a613796565b500390565b6000826138ae576138ae6137cb565b500690565b600082198211156138c6576138c6613796565b500190565b60006020808352600084546138df816136c2565b80848701526040600180841660008114613900576001811461391457613942565b60ff19851689840152606089019550613942565b896000528660002060005b8581101561393a5781548b820186015290830190880161391f565b8a0184019650505b509398975050505050505050565b600060ff821660ff84168060ff0382111561396d5761396d613796565b019392505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081526000613a5f6040830185613408565b8281036020840152613a718185613408565b95945050505050565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b8281526040602082015260006130a1604083018461358c565b6001600160a01b0386811682528516602082015260a060408201819052600090613b4690830186613408565b8281036060840152613b588186613408565b90508281036080840152613b6c81856130f7565b98975050505050505050565b600060208284031215613b8a57600080fd5b8151612fb181612f7e565b600060033d1115613bae5760046000803e5060005160e01c5b90565b600060443d1015613bbf5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715613bee57505050505090565b8285019150815181811115613c065750505050505090565b843d8701016020828501011115613c205750505050505090565b613c2f60208286010187612fce565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613cbc908301846130f7565b97965050505050505056fea26469706673582212209f1a3d6ed1fdfa130a8ceed56d75851b914cf9de9be1dc3b024ca6c426d7a63764736f6c63430008090033", + "devdoc": { + "kind": "dev", + "methods": { + "balanceOf(address,uint256)": { + "details": "See {IERC1155-balanceOf}. Requirements: - `account` cannot be the zero address." + }, + "balanceOfBatch(address[],uint256[])": { + "details": "See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length." + }, + "exists(uint256)": { + "details": "Indicates whether any token exist with a given id, or not." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC1155-isApprovedForAll}." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { + "details": "See {IERC1155-safeBatchTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,uint256,bytes)": { + "details": "See {IERC1155-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC1155-setApprovalForAll}." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "totalSupply(uint256)": { + "details": "Total amount of tokens in with a given id." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Developed by: John Whitton (github: johnwhittton), Aaron Li (github: polymorpher)", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 8630, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))" + }, + { + "astId": 8636, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "_operatorApprovals", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 8638, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "_uri", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 8391, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "_owner", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 8514, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "_paused", + "offset": 20, + "slot": "3", + "type": "t_bool" + }, + { + "astId": 10069, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "_totalSupply", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 16689, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "royalties", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint256,t_array(t_struct(Part)16632_storage)dyn_storage)" + }, + { + "astId": 14413, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "contractURI", + "offset": 0, + "slot": "6", + "type": "t_string_storage" + }, + { + "astId": 14415, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "baseUri", + "offset": 0, + "slot": "7", + "type": "t_string_storage" + }, + { + "astId": 14417, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "salt", + "offset": 0, + "slot": "8", + "type": "t_bytes32" + }, + { + "astId": 14419, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "mintPrice", + "offset": 0, + "slot": "9", + "type": "t_uint256" + }, + { + "astId": 14421, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "maxPerMint", + "offset": 0, + "slot": "10", + "type": "t_uint256" + }, + { + "astId": 14423, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "standardTokenId", + "offset": 0, + "slot": "11", + "type": "t_uint256" + }, + { + "astId": 14425, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "rareTokenId", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 14427, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "exchangeRatio", + "offset": 0, + "slot": "13", + "type": "t_uint256" + }, + { + "astId": 14429, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "rareProbabilityPercentage", + "offset": 0, + "slot": "14", + "type": "t_uint256" + }, + { + "astId": 14431, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "revenueAccount", + "offset": 0, + "slot": "15", + "type": "t_address" + }, + { + "astId": 14433, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "name", + "offset": 0, + "slot": "16", + "type": "t_string_storage" + }, + { + "astId": 14435, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "symbol", + "offset": 0, + "slot": "17", + "type": "t_string_storage" + }, + { + "astId": 14437, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "saleIsActive", + "offset": 0, + "slot": "18", + "type": "t_bool" + }, + { + "astId": 14439, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "saleStarted", + "offset": 1, + "slot": "18", + "type": "t_bool" + }, + { + "astId": 14441, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "metadataFrozen", + "offset": 2, + "slot": "18", + "type": "t_bool" + }, + { + "astId": 14445, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "maxSupply", + "offset": 0, + "slot": "19", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 14449, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "maxPersonalCap", + "offset": 0, + "slot": "20", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 14453, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "metadataUris", + "offset": 0, + "slot": "21", + "type": "t_mapping(t_uint256,t_string_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_struct(Part)16632_storage)dyn_storage": { + "base": "t_struct(Part)16632_storage", + "encoding": "dynamic_array", + "label": "struct LibPart.Part[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_array(t_struct(Part)16632_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LibPart.Part[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(Part)16632_storage)dyn_storage" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Part)16632_storage": { + "encoding": "inplace", + "label": "struct LibPart.Part", + "members": [ + { + "astId": 16629, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "account", + "offset": 0, + "slot": "0", + "type": "t_address_payable" + }, + { + "astId": 16631, + "contract": "contracts/miniNFTs/Mini1155.sol:Mini1155", + "label": "value", + "offset": 20, + "slot": "0", + "type": "t_uint96" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint96": { + "encoding": "inplace", + "label": "uint96", + "numberOfBytes": "12" + } + } + } +} \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/Mini721.json b/miniwallet/deployments/ethLocal/Mini721.json new file mode 100644 index 0000000..efef048 --- /dev/null +++ b/miniwallet/deployments/ethLocal/Mini721.json @@ -0,0 +1,1801 @@ +{ + "address": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "abi": [ + { + "inputs": [ + { + "internalType": "bool", + "name": "_saleIsActive", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_metadataFrozen", + "type": "bool" + }, + { + "internalType": "bool", + "name": "_provenanceFrozen", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "_maxMiniTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_mintPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxPerMint", + "type": "uint256" + }, + { + "internalType": "string", + "name": "_baseUri", + "type": "string" + }, + { + "internalType": "string", + "name": "contractUri_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ApprovalCallerNotOwnerNorApproved", + "type": "error" + }, + { + "inputs": [], + "name": "ApprovalQueryForNonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "ApprovalToCurrentOwner", + "type": "error" + }, + { + "inputs": [], + "name": "ApproveToCaller", + "type": "error" + }, + { + "inputs": [], + "name": "BalanceQueryForZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "MintToZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "MintZeroQuantity", + "type": "error" + }, + { + "inputs": [], + "name": "OwnerIndexOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "OwnerQueryForNonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "TokenIndexOutOfBounds", + "type": "error" + }, + { + "inputs": [], + "name": "TransferCallerNotOwnerNorApproved", + "type": "error" + }, + { + "inputs": [], + "name": "TransferFromIncorrectOwner", + "type": "error" + }, + { + "inputs": [], + "name": "TransferToNonERC721ReceiverImplementer", + "type": "error" + }, + { + "inputs": [], + "name": "TransferToZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "URIQueryForNonexistentToken", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "MiniBatchBurn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "MiniBurn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "lastTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "MiniMint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "lastTokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "numTokens", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "initialOwner", + "type": "address" + } + ], + "name": "MiniMintCommunity", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint32", + "name": "coolingPeriod_", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "shipNumber_", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "string", + "name": "contractUri", + "type": "string" + } + ], + "name": "MiniSetup", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "MiniTransfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "value", + "type": "uint96" + } + ], + "indexed": false, + "internalType": "struct LibPart.Part[]", + "name": "royalties", + "type": "tuple[]" + } + ], + "name": "RoyaltiesSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "baseUri", + "type": "string" + } + ], + "name": "SetBaseUri", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "SetStartIndex", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "batchBurn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "contractURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + } + ], + "name": "exists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "freezeMetadata", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "freezeProvenance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getRaribleV2Royalties", + "outputs": [ + { + "components": [ + { + "internalType": "address payable", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "value", + "type": "uint96" + } + ], + "internalType": "struct LibPart.Part[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxMiniTokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxPerMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "metadataFrozen", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_numberOfTokens", + "type": "uint256" + } + ], + "name": "mintForCommunity", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mintMini", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "mintPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "offsetValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "provenanceFrozen", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "provenanceHash", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "royalties", + "outputs": [ + { + "internalType": "address payable", + "name": "account", + "type": "address" + }, + { + "internalType": "uint96", + "name": "value", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_salePrice", + "type": "uint256" + } + ], + "name": "royaltyInfo", + "outputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "royaltyAmount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "saleIsActive", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "saleStarted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_baseUri", + "type": "string" + } + ], + "name": "setBaseUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "uri_", + "type": "string" + } + ], + "name": "setContractUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxPerMint", + "type": "uint256" + } + ], + "name": "setMaxPerMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_mintPrice", + "type": "uint256" + } + ], + "name": "setMintPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_offsetValue", + "type": "uint256" + } + ], + "name": "setOffsetValue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_provenanceHash", + "type": "string" + } + ], + "name": "setProvenanceHash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "setRevenueAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_royaltiesReceipientAddress", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_percentageBasisPoints", + "type": "uint96" + } + ], + "name": "setRoyalties", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "setStartIndex", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "uri", + "type": "string" + } + ], + "name": "setTemporaryTokenUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "string", + "name": "uri_", + "type": "string" + } + ], + "name": "setUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "temporaryTokenUri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "toggleSaleState", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "tokensOfOwner", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "shouldUseRevenueAccount", + "type": "bool" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x279006a890c05817a5551392de0e3c7f19f9b9c16c86003ff24c9d746a8456b9", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "transactionIndex": 0, + "gasUsed": "3323050", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000010000000010000000000000000000000020000000000000100000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x3446e8c2145f07c7d0d24a564c526e935403f7c3f27d09c24f143f15d4e96873", + "transactionHash": "0x279006a890c05817a5551392de0e3c7f19f9b9c16c86003ff24c9d746a8456b9", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 8, + "transactionHash": "0x279006a890c05817a5551392de0e3c7f19f9b9c16c86003ff24c9d746a8456b9", + "address": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x3446e8c2145f07c7d0d24a564c526e935403f7c3f27d09c24f143f15d4e96873" + } + ], + "blockNumber": 8, + "cumulativeGasUsed": "3323050", + "status": 1, + "byzantium": true + }, + "args": [ + "false", + "false", + "false", + "1000000000000", + "0", + "1", + "ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini721/", + "ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini721/contract.json" + ], + "numDeployments": 1, + "solcInputHash": "eb67976a27a158fcc5c575ed68d95e39", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_saleIsActive\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_metadataFrozen\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"_provenanceFrozen\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_maxMiniTokens\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_mintPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxPerMint\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_baseUri\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"contractUri_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ApprovalCallerNotOwnerNorApproved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ApprovalQueryForNonexistentToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ApprovalToCurrentOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ApproveToCaller\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BalanceQueryForZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintToZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintZeroQuantity\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerIndexOutOfBounds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerQueryForNonexistentToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenIndexOutOfBounds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferCallerNotOwnerNorApproved\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFromIncorrectOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferToNonERC721ReceiverImplementer\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferToZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"URIQueryForNonexistentToken\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"MiniBatchBurn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"MiniBurn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"}],\"name\":\"MiniMint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastTokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"numTokens\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"}],\"name\":\"MiniMintCommunity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"coolingPeriod_\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"shipNumber_\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"contractUri\",\"type\":\"string\"}],\"name\":\"MiniSetup\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"MiniTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"indexed\":false,\"internalType\":\"struct LibPart.Part[]\",\"name\":\"royalties\",\"type\":\"tuple[]\"}],\"name\":\"RoyaltiesSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"baseUri\",\"type\":\"string\"}],\"name\":\"SetBaseUri\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"SetStartIndex\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"batchBurn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"contractURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"}],\"name\":\"exists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeMetadata\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"freezeProvenance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getRaribleV2Royalties\",\"outputs\":[{\"components\":[{\"internalType\":\"address payable\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"internalType\":\"struct LibPart.Part[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMiniTokens\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxPerMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"metadataFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_numberOfTokens\",\"type\":\"uint256\"}],\"name\":\"mintForCommunity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mintMini\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mintPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"offsetValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"provenanceFrozen\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"provenanceHash\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"royalties\",\"outputs\":[{\"internalType\":\"address payable\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"value\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_salePrice\",\"type\":\"uint256\"}],\"name\":\"royaltyInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"royaltyAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saleIsActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"saleStarted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_baseUri\",\"type\":\"string\"}],\"name\":\"setBaseUri\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri_\",\"type\":\"string\"}],\"name\":\"setContractUri\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxPerMint\",\"type\":\"uint256\"}],\"name\":\"setMaxPerMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_mintPrice\",\"type\":\"uint256\"}],\"name\":\"setMintPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_offsetValue\",\"type\":\"uint256\"}],\"name\":\"setOffsetValue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_provenanceHash\",\"type\":\"string\"}],\"name\":\"setProvenanceHash\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"setRevenueAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_royaltiesReceipientAddress\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"_percentageBasisPoints\",\"type\":\"uint96\"}],\"name\":\"setRoyalties\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"setStartIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"setTemporaryTokenUri\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"uri_\",\"type\":\"string\"}],\"name\":\"setUri\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"temporaryTokenUri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"toggleSaleState\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"tokensOfOwner\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"shouldUseRevenueAccount\",\"type\":\"bool\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}. This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}. This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/miniNFTs/Mini721.sol\":\"Mini721\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.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 IERC721Receiver {\\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\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Enumerable is IERC721 {\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xd1556954440b31c97a142c6ba07d5cade45f96fafd52091d33a14ebe365aecbf\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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}\\n\",\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"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/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\"},\"contracts/miniNFTs/ERC721M/ERC721M.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n// Creator: Chiru Labs\\n// Feb 23rd 2022, Modification for sms-wallet by John Whitton\\n\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Context.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nerror ApprovalCallerNotOwnerNorApproved();\\nerror ApprovalQueryForNonexistentToken();\\nerror ApproveToCaller();\\nerror ApprovalToCurrentOwner();\\nerror BalanceQueryForZeroAddress();\\nerror MintedQueryForZeroAddress();\\nerror BurnedQueryForZeroAddress();\\nerror MintToZeroAddress();\\nerror MintZeroQuantity();\\nerror OwnerIndexOutOfBounds();\\nerror OwnerQueryForNonexistentToken();\\nerror TokenIndexOutOfBounds();\\nerror TransferCallerNotOwnerNorApproved();\\nerror TransferFromIncorrectOwner();\\nerror TransferToNonERC721ReceiverImplementer();\\nerror TransferToZeroAddress();\\nerror URIQueryForNonexistentToken();\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.\\n *\\n * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).\\n *\\n * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.\\n *\\n * Assumes that the maximum token id cannot exceed 2**128 - 1 (max value of uint128).\\n */\\ncontract ERC721M is\\n Context,\\n ERC165,\\n IERC721,\\n IERC721Metadata,\\n IERC721Enumerable\\n{\\n using Address for address;\\n using Strings for uint256;\\n\\n // Compiler will pack this into a single 256bit word.\\n struct TokenOwnership {\\n // The address of the owner.\\n address addr;\\n // Keeps track of the start time of ownership with minimal overhead for tokenomics.\\n uint64 startTimestamp;\\n // Whether the token has been burned.\\n bool burned;\\n }\\n\\n // Compiler will pack this into a single 256bit word.\\n struct AddressData {\\n // Realistically, 2**64-1 is more than enough.\\n uint64 balance;\\n // Keeps track of mint count with minimal overhead for tokenomics.\\n uint64 numberMinted;\\n // Keeps track of burn count with minimal overhead for tokenomics.\\n uint64 numberBurned;\\n }\\n\\n // Compiler will pack the following\\n // _currentIndex and _burnCounter into a single 256bit word.\\n\\n // The tokenId of the next token to be minted.\\n uint128 internal _currentIndex;\\n\\n // The number of tokens burned.\\n uint128 internal _burnCounter;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to ownership details\\n // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.\\n mapping(uint256 => TokenOwnership) internal _ownerships;\\n\\n // Mapping owner address to address data\\n mapping(address => AddressData) private _addressData;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view override returns (uint256) {\\n // Counter underflow is impossible as _burnCounter cannot be incremented\\n // more than _currentIndex times\\n unchecked {\\n return _currentIndex - _burnCounter;\\n }\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.\\n * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.\\n */\\n function tokenByIndex(uint256 index)\\n public\\n view\\n override\\n returns (uint256)\\n {\\n uint256 numMintedSoFar = _currentIndex;\\n uint256 tokenIdsIdx;\\n\\n // Counter overflow is impossible as the loop breaks when\\n // uint256 i is equal to another uint256 numMintedSoFar.\\n unchecked {\\n for (uint256 i; i < numMintedSoFar; i++) {\\n TokenOwnership memory ownership = _ownerships[i];\\n if (!ownership.burned) {\\n if (tokenIdsIdx == index) {\\n return i;\\n }\\n tokenIdsIdx++;\\n }\\n }\\n }\\n revert TokenIndexOutOfBounds();\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.\\n * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index)\\n public\\n view\\n override\\n returns (uint256)\\n {\\n if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds();\\n uint256 numMintedSoFar = _currentIndex;\\n uint256 tokenIdsIdx;\\n address currOwnershipAddr;\\n\\n // Counter overflow is impossible as the loop breaks when\\n // uint256 i is equal to another uint256 numMintedSoFar.\\n unchecked {\\n for (uint256 i; i < numMintedSoFar; i++) {\\n TokenOwnership memory ownership = _ownerships[i];\\n if (ownership.burned) {\\n continue;\\n }\\n if (ownership.addr != address(0)) {\\n currOwnershipAddr = ownership.addr;\\n }\\n if (currOwnershipAddr == owner) {\\n if (tokenIdsIdx == index) {\\n return i;\\n }\\n tokenIdsIdx++;\\n }\\n }\\n }\\n\\n // Execution should never reach this point.\\n revert();\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(ERC165, IERC165)\\n returns (bool)\\n {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n interfaceId == type(IERC721Enumerable).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view override returns (uint256) {\\n if (owner == address(0)) revert BalanceQueryForZeroAddress();\\n return uint256(_addressData[owner].balance);\\n }\\n\\n function _numberMinted(address owner) internal view returns (uint256) {\\n if (owner == address(0)) revert MintedQueryForZeroAddress();\\n return uint256(_addressData[owner].numberMinted);\\n }\\n\\n function _numberBurned(address owner) internal view returns (uint256) {\\n if (owner == address(0)) revert BurnedQueryForZeroAddress();\\n return uint256(_addressData[owner].numberBurned);\\n }\\n\\n /**\\n * Gas spent here starts off proportional to the maximum mint batch size.\\n * It gradually moves to O(1) as tokens get transferred around in the collection over time.\\n */\\n function ownershipOf(uint256 tokenId)\\n internal\\n view\\n returns (TokenOwnership memory)\\n {\\n uint256 curr = tokenId;\\n\\n unchecked {\\n if (curr < _currentIndex) {\\n TokenOwnership memory ownership = _ownerships[curr];\\n if (!ownership.burned) {\\n if (ownership.addr != address(0)) {\\n return ownership;\\n }\\n // Invariant:\\n // There will always be an ownership that has an address and is not burned\\n // before an ownership that does not have an address and is not burned.\\n // Hence, curr will not underflow.\\n while (true) {\\n curr--;\\n ownership = _ownerships[curr];\\n if (ownership.addr != address(0)) {\\n return ownership;\\n }\\n }\\n }\\n }\\n }\\n revert OwnerQueryForNonexistentToken();\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view override returns (address) {\\n return ownershipOf(tokenId).addr;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId)\\n public\\n view\\n virtual\\n override\\n returns (string memory)\\n {\\n if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\\n\\n string memory baseURI = _baseURI();\\n return\\n bytes(baseURI).length != 0\\n ? string(abi.encodePacked(baseURI, tokenId.toString()))\\n : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overriden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public override {\\n address owner = ERC721M.ownerOf(tokenId);\\n if (to == owner) revert ApprovalToCurrentOwner();\\n\\n if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {\\n revert ApprovalCallerNotOwnerNorApproved();\\n }\\n\\n _approve(to, tokenId, owner);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId)\\n public\\n view\\n override\\n returns (address)\\n {\\n if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved)\\n public\\n override\\n {\\n if (operator == _msgSender()) revert ApproveToCaller();\\n\\n _operatorApprovals[_msgSender()][operator] = approved;\\n emit ApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator)\\n public\\n view\\n virtual\\n override\\n returns (bool)\\n {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory _data\\n ) public virtual override {\\n _transfer(from, to, tokenId);\\n if (!_checkOnERC721Received(from, to, tokenId, _data)) {\\n revert TransferToNonERC721ReceiverImplementer();\\n }\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n */\\n function _exists(uint256 tokenId) internal view returns (bool) {\\n return tokenId < _currentIndex && !_ownerships[tokenId].burned;\\n }\\n\\n function _safeMint(address to, uint256 quantity) internal {\\n _safeMint(to, quantity, \\\"\\\");\\n }\\n\\n /**\\n * @dev Safely mints `quantity` tokens and transfers them to `to`.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.\\n * - `quantity` must be greater than 0.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(\\n address to,\\n uint256 quantity,\\n bytes memory _data\\n ) internal {\\n _mint(to, quantity, _data, true);\\n }\\n\\n /**\\n * @dev Mints `quantity` tokens and transfers them to `to`.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `quantity` must be greater than 0.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(\\n address to,\\n uint256 quantity,\\n bytes memory _data,\\n bool safe\\n ) internal {\\n uint256 startTokenId = _currentIndex;\\n if (to == address(0)) revert MintToZeroAddress();\\n if (quantity == 0) revert MintZeroQuantity();\\n\\n _beforeTokenTransfers(address(0), to, startTokenId, quantity);\\n\\n // Overflows are incredibly unrealistic.\\n // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1\\n // updatedIndex overflows if _currentIndex + quantity > 3.4e38 (2**128) - 1\\n unchecked {\\n _addressData[to].balance += uint64(quantity);\\n _addressData[to].numberMinted += uint64(quantity);\\n\\n _ownerships[startTokenId].addr = to;\\n _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);\\n\\n uint256 updatedIndex = startTokenId;\\n\\n for (uint256 i; i < quantity; i++) {\\n emit Transfer(address(0), to, updatedIndex);\\n if (\\n safe &&\\n !_checkOnERC721Received(address(0), to, updatedIndex, _data)\\n ) {\\n revert TransferToNonERC721ReceiverImplementer();\\n }\\n updatedIndex++;\\n }\\n\\n _currentIndex = uint128(updatedIndex);\\n }\\n _afterTokenTransfers(address(0), to, startTokenId, quantity);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) private {\\n TokenOwnership memory prevOwnership = ownershipOf(tokenId);\\n\\n bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||\\n isApprovedForAll(prevOwnership.addr, _msgSender()) ||\\n getApproved(tokenId) == _msgSender());\\n\\n if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();\\n if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();\\n if (to == address(0)) revert TransferToZeroAddress();\\n\\n _beforeTokenTransfers(from, to, tokenId, 1);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId, prevOwnership.addr);\\n\\n // Underflow of the sender's balance is impossible because we check for\\n // ownership above and the recipient's balance can't realistically overflow.\\n // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128.\\n unchecked {\\n _addressData[from].balance -= 1;\\n _addressData[to].balance += 1;\\n\\n _ownerships[tokenId].addr = to;\\n _ownerships[tokenId].startTimestamp = uint64(block.timestamp);\\n\\n // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.\\n // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.\\n uint256 nextTokenId = tokenId + 1;\\n if (_ownerships[nextTokenId].addr == address(0)) {\\n // This will suffice for checking _exists(nextTokenId),\\n // as a burned slot cannot contain the zero address.\\n if (nextTokenId < _currentIndex) {\\n _ownerships[nextTokenId].addr = prevOwnership.addr;\\n _ownerships[nextTokenId].startTimestamp = prevOwnership\\n .startTimestamp;\\n }\\n }\\n }\\n\\n emit Transfer(from, to, tokenId);\\n _afterTokenTransfers(from, to, tokenId, 1);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n TokenOwnership memory prevOwnership = ownershipOf(tokenId);\\n\\n _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId, prevOwnership.addr);\\n\\n // Underflow of the sender's balance is impossible because we check for\\n // ownership above and the recipient's balance can't realistically overflow.\\n // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128.\\n unchecked {\\n _addressData[prevOwnership.addr].balance -= 1;\\n _addressData[prevOwnership.addr].numberBurned += 1;\\n\\n // Keep track of who burned the token, and the timestamp of burning.\\n _ownerships[tokenId].addr = prevOwnership.addr;\\n _ownerships[tokenId].startTimestamp = uint64(block.timestamp);\\n _ownerships[tokenId].burned = true;\\n\\n // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.\\n // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.\\n uint256 nextTokenId = tokenId + 1;\\n if (_ownerships[nextTokenId].addr == address(0)) {\\n // This will suffice for checking _exists(nextTokenId),\\n // as a burned slot cannot contain the zero address.\\n if (nextTokenId < _currentIndex) {\\n _ownerships[nextTokenId].addr = prevOwnership.addr;\\n _ownerships[nextTokenId].startTimestamp = prevOwnership\\n .startTimestamp;\\n }\\n }\\n }\\n\\n emit Transfer(prevOwnership.addr, address(0), tokenId);\\n _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);\\n\\n // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.\\n unchecked {\\n _burnCounter++;\\n }\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits a {Approval} event.\\n */\\n function _approve(\\n address to,\\n uint256 tokenId,\\n address owner\\n ) private {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(owner, to, tokenId);\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param _data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory _data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try\\n IERC721Receiver(to).onERC721Received(\\n _msgSender(),\\n from,\\n tokenId,\\n _data\\n )\\n returns (bytes4 retval) {\\n return retval == IERC721Receiver(to).onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert TransferToNonERC721ReceiverImplementer();\\n } else {\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.\\n * And also called before burning one token.\\n *\\n * startTokenId - the first token id to be transferred\\n * quantity - the amount to be transferred\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, `tokenId` will be burned by `from`.\\n * - `from` and `to` are never both zero.\\n */\\n function _beforeTokenTransfers(\\n address from,\\n address to,\\n uint256 startTokenId,\\n uint256 quantity\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes\\n * minting.\\n * And also called after one token has been burned.\\n *\\n * startTokenId - the first token id to be transferred\\n * quantity - the amount to be transferred\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` has been minted for `to`.\\n * - When `to` is zero, `tokenId` has been burned by `from`.\\n * - `from` and `to` are never both zero.\\n */\\n function _afterTokenTransfers(\\n address from,\\n address to,\\n uint256 startTokenId,\\n uint256 quantity\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xbe2042f85837c9fd78dbabdb559e6cb2001ebdcdd01f98d24f69bcde46cfd659\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/Mini721.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.4;\\n\\nimport \\\"./ERC721M/ERC721M.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol\\\";\\nimport \\\"./rarible/royalties/contracts/LibPart.sol\\\";\\nimport \\\"./rarible/royalties/contracts/LibRoyaltiesV2.sol\\\";\\n\\ncontract Mini721 is ERC721M, Ownable, RoyaltiesV2Impl {\\n bytes32 internal salt;\\n uint256 public maxMiniTokens;\\n uint256 public mintPrice;\\n uint256 public maxPerMint;\\n uint256 public startIndex;\\n\\n string public provenanceHash = \\\"\\\";\\n uint256 public offsetValue;\\n\\n bool public metadataFrozen;\\n bool public provenanceFrozen;\\n bool public saleIsActive;\\n bool public saleStarted;\\n\\n mapping(uint256 => string) internal metadataUris;\\n string internal _contractUri;\\n string public temporaryTokenUri;\\n string internal baseUri;\\n address internal revenueAccount;\\n\\n bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;\\n\\n event SetBaseUri(string baseUri);\\n event SetStartIndex(uint256 index);\\n event MiniMint(\\n uint256 lastTokenId,\\n uint256 numTokens,\\n address initialOwner\\n );\\n event MiniMintCommunity(\\n uint256 lastTokenId,\\n uint256 numTokens,\\n address initialOwner\\n );\\n event MiniBurn(uint256 id);\\n event MiniBatchBurn(uint256[] ids);\\n event MiniTransfer(uint256 id, address from, address to, address operator);\\n event MiniSetup(\\n uint32 coolingPeriod_,\\n uint32 shipNumber_,\\n string contractUri\\n );\\n\\n constructor(\\n bool _saleIsActive,\\n bool _metadataFrozen,\\n bool _provenanceFrozen,\\n uint256 _maxMiniTokens,\\n uint256 _mintPrice,\\n uint256 _maxPerMint,\\n string memory _baseUri,\\n string memory contractUri_\\n ) ERC721M(\\\"MiniWallet NFT\\\", \\\"Mini721\\\") {\\n saleIsActive = _saleIsActive;\\n if (saleIsActive) {\\n saleStarted = true;\\n }\\n // false\\n metadataFrozen = _metadataFrozen;\\n //false\\n provenanceFrozen = _provenanceFrozen;\\n //false\\n maxMiniTokens = _maxMiniTokens;\\n // 10000\\n mintPrice = _mintPrice;\\n // 100000000000000000 = 0.01 ETH\\n maxPerMint = _maxPerMint;\\n // 10;\\n baseUri = _baseUri;\\n // \\\"ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/\\\";\\n _contractUri = contractUri_;\\n //\\\"ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/contract.json\\\"; //TODO review URI\\n }\\n\\n modifier whenSaleActive() {\\n require(saleIsActive, \\\"Mini721: Sale is not active\\\");\\n _;\\n }\\n\\n modifier whenMetadataNotFrozen() {\\n require(!metadataFrozen, \\\"Mini721: Metadata is frozen\\\");\\n _;\\n }\\n\\n modifier whenProvenanceNotFrozen() {\\n require(!provenanceFrozen, \\\"Mini721: Provenance is frozen\\\");\\n _;\\n }\\n\\n // ------------------\\n // Explicit overrides\\n // ------------------\\n\\n function _burn(uint256 tokenId) internal virtual override(ERC721M) {\\n super._burn(tokenId);\\n }\\n\\n function setTemporaryTokenUri(string memory uri) public onlyOwner {\\n temporaryTokenUri = uri;\\n }\\n\\n function tokenURI(uint256 tokenId)\\n public\\n view\\n virtual\\n override(ERC721M)\\n returns (string memory)\\n {\\n if (!metadataFrozen && bytes(temporaryTokenUri).length > 0) {\\n return temporaryTokenUri;\\n }\\n if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\\n uint256 tid = tokenId;\\n if (tid >= offsetValue) {\\n tid =\\n ((startIndex + tid - offsetValue) %\\n (maxMiniTokens - offsetValue)) +\\n offsetValue;\\n }\\n\\n if (bytes(metadataUris[tokenId]).length == 0) {\\n return\\n bytes(baseUri).length != 0\\n ? string(abi.encodePacked(baseUri, uint2str(tid)))\\n : \\\"\\\";\\n }\\n return metadataUris[tokenId];\\n }\\n\\n function setStartIndex() external onlyOwner {\\n startIndex =\\n uint256(\\n keccak256(\\n abi.encodePacked(\\n blockhash(block.number - 2),\\n bytes20(msg.sender),\\n bytes32(totalSupply())\\n )\\n )\\n ) %\\n (maxMiniTokens - offsetValue);\\n emit SetStartIndex(startIndex);\\n }\\n\\n function _baseURI() internal view override returns (string memory) {\\n return baseUri;\\n }\\n\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n override\\n returns (bool)\\n {\\n return\\n interfaceId == this.name.selector ||\\n interfaceId == this.symbol.selector ||\\n interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES ||\\n interfaceId == _INTERFACE_ID_ERC2981 ||\\n ERC721M.supportsInterface(interfaceId);\\n }\\n\\n // ------------------\\n // Utility view functions\\n // ------------------\\n\\n function exists(uint256 _tokenId) public view returns (bool) {\\n return _exists(_tokenId);\\n }\\n\\n //TODO review if we need to override the contractURI\\n function contractURI() public view returns (string memory) {\\n return _contractUri;\\n }\\n\\n // ------------------\\n // Functions for external (user) minting\\n // ------------------\\n\\n function mintMini(uint256 amount) external payable whenSaleActive {\\n require(\\n totalSupply() + amount < maxMiniTokens,\\n \\\"Mini721: Purchase would exceed cap\\\"\\n );\\n require(amount <= maxPerMint, \\\"Mini721: Amount exceeds max per mint\\\");\\n require(\\n mintPrice * amount <= msg.value,\\n \\\"Mini721: Ether value sent is not correct\\\"\\n );\\n uint256 excess = msg.value - (amount * mintPrice);\\n if (excess > 0) {\\n payable(msg.sender).transfer(excess);\\n }\\n _safeMint(msg.sender, amount);\\n emit MiniMint(totalSupply(), amount, msg.sender);\\n }\\n\\n function burn(uint256 id) public onlyOwner whenMetadataNotFrozen {\\n ERC721M._burn(id);\\n emit MiniBurn(id);\\n }\\n\\n function batchBurn(uint256[] memory ids)\\n public\\n onlyOwner\\n whenMetadataNotFrozen\\n {\\n for (uint32 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n ERC721M._burn(id);\\n }\\n emit MiniBatchBurn(ids);\\n }\\n\\n // ------------------\\n // Functions for the owner (Mini minting contracts)\\n // ------------------\\n\\n function freezeMetadata() external onlyOwner whenMetadataNotFrozen {\\n metadataFrozen = true;\\n }\\n\\n function freezeProvenance() external onlyOwner whenProvenanceNotFrozen {\\n provenanceFrozen = true;\\n }\\n\\n function toggleSaleState() external onlyOwner {\\n require(\\n (saleIsActive || (offsetValue != 0)),\\n \\\"cannot start sale until airdrop is complete and offset set\\\"\\n );\\n saleIsActive = !saleIsActive;\\n if (saleIsActive && !saleStarted) {\\n saleStarted = true;\\n }\\n }\\n\\n function setContractUri(string memory uri_) public onlyOwner {\\n _contractUri = uri_;\\n }\\n\\n function setProvenanceHash(string memory _provenanceHash)\\n external\\n onlyOwner\\n whenProvenanceNotFrozen\\n {\\n provenanceHash = _provenanceHash;\\n }\\n\\n function setOffsetValue(uint256 _offsetValue) external onlyOwner {\\n require(!saleStarted, \\\"sale already begun\\\");\\n offsetValue = _offsetValue;\\n }\\n\\n function setMaxPerMint(uint256 _maxPerMint) external onlyOwner {\\n maxPerMint = _maxPerMint;\\n }\\n\\n function setMintPrice(uint256 _mintPrice) external onlyOwner {\\n mintPrice = _mintPrice;\\n }\\n\\n function setBaseUri(string memory _baseUri)\\n external\\n onlyOwner\\n whenMetadataNotFrozen\\n {\\n baseUri = _baseUri;\\n emit SetBaseUri(baseUri);\\n }\\n\\n function mintForCommunity(address _to, uint256 _numberOfTokens)\\n external\\n onlyOwner\\n {\\n require(_to != address(0), \\\"Mini721: Cannot mint to zero address.\\\");\\n require(\\n totalSupply() + _numberOfTokens < maxMiniTokens,\\n \\\"Mini721: Minting would exceed cap\\\"\\n );\\n _safeMint(_to, _numberOfTokens);\\n emit MiniMintCommunity(totalSupply(), _numberOfTokens, _to);\\n }\\n\\n function withdraw(uint256 amount, bool shouldUseRevenueAccount) public {\\n require(\\n msg.sender == Ownable.owner() || msg.sender == revenueAccount,\\n \\\"unauthorized\\\"\\n );\\n address a = shouldUseRevenueAccount ? revenueAccount : Ownable.owner();\\n (bool success, ) = a.call{value: amount}(\\\"\\\");\\n require(success);\\n }\\n\\n function setUri(uint256 id, string memory uri_)\\n public\\n onlyOwner\\n whenMetadataNotFrozen\\n {\\n metadataUris[id] = uri_;\\n }\\n\\n function uint2str(uint256 _i)\\n internal\\n pure\\n returns (string memory _uintAsString)\\n {\\n if (_i == 0) {\\n return \\\"0\\\";\\n }\\n uint256 j = _i;\\n uint256 len;\\n while (j != 0) {\\n len++;\\n j /= 10;\\n }\\n bytes memory bstr = new bytes(len);\\n uint256 k = len;\\n while (_i != 0) {\\n k = k - 1;\\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\\n bytes1 b1 = bytes1(temp);\\n bstr[k] = b1;\\n _i /= 10;\\n }\\n return string(bstr);\\n }\\n\\n function setRevenueAccount(address account) public onlyOwner {\\n revenueAccount = account;\\n }\\n\\n function setRoyalties(\\n uint256 _tokenId,\\n address payable _royaltiesReceipientAddress,\\n uint96 _percentageBasisPoints\\n ) public onlyOwner {\\n LibPart.Part[] memory _royalties = new LibPart.Part[](1);\\n _royalties[0].value = _percentageBasisPoints;\\n _royalties[0].account = _royaltiesReceipientAddress;\\n _saveRoyalties(_tokenId, _royalties);\\n }\\n\\n function royaltyInfo(uint256 _tokenId, uint256 _salePrice)\\n external\\n view\\n returns (address receiver, uint256 royaltyAmount)\\n {\\n LibPart.Part[] memory _royalties = royalties[_tokenId];\\n if (_royalties.length > 0) {\\n return (\\n _royalties[0].account,\\n (_salePrice * _royalties[0].value) / 10000\\n );\\n }\\n return (address(0), 0);\\n }\\n\\n receive() external payable {}\\n\\n // ------------------\\n // Utility function for getting the tokens of a certain address\\n // ------------------\\n\\n function tokensOfOwner(address _owner)\\n external\\n view\\n returns (uint256[] memory)\\n {\\n uint256 tokenCount = balanceOf(_owner);\\n if (tokenCount == 0) {\\n return new uint256[](0);\\n } else {\\n uint256[] memory result = new uint256[](tokenCount);\\n for (uint256 index; index < tokenCount; index++) {\\n result[index] = tokenOfOwnerByIndex(_owner, index);\\n }\\n return result;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x90f027851e88d499a15f71132239b8f20f4b17c961d972733ee243ff31eabfd8\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/LibPart.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nlibrary LibPart {\\n bytes32 public constant TYPE_HASH = keccak256(\\\"Part(address account,uint96 value)\\\");\\n\\n struct Part {\\n address payable account;\\n uint96 value;\\n }\\n\\n function hash(Part memory part) internal pure returns (bytes32) {\\n return keccak256(abi.encode(TYPE_HASH, part.account, part.value));\\n }\\n}\\n\",\"keccak256\":\"0xdd349a780718d549e742a2a6e10fda27fcbb989717ef352c6643b3bce70b9351\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/LibRoyaltiesV2.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nlibrary LibRoyaltiesV2 {\\n /*\\n * bytes4(keccak256('getRoyalties(LibAsset.AssetType)')) == 0x44c74bcc\\n */\\n bytes4 constant _INTERFACE_ID_ROYALTIES = 0x44c74bcc;\\n}\\n\",\"keccak256\":\"0x43f1503ffecc266a421097ee8767227ffdfc1de4960784244ddfad4c133ec65f\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/RoyaltiesV2.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LibPart.sol\\\";\\n\\ninterface RoyaltiesV2 {\\n event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties);\\n\\n function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory);\\n}\\n\",\"keccak256\":\"0x36d5237310b0ca8221837a9689fd750f409215962cd15f50fa8cc67951aceac9\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/impl/AbstractRoyalties.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../LibPart.sol\\\";\\n\\nabstract contract AbstractRoyalties {\\n mapping (uint256 => LibPart.Part[]) public royalties;\\n\\n function _saveRoyalties(uint256 _id, LibPart.Part[] memory _royalties) internal {\\n for (uint i = 0; i < _royalties.length; i++) {\\n require(_royalties[i].account != address(0x0), \\\"Recipient should be present\\\");\\n require(_royalties[i].value != 0, \\\"Royalty value should be positive\\\");\\n royalties[_id].push(_royalties[i]);\\n }\\n _onRoyaltiesSet(_id, _royalties);\\n }\\n\\n function _updateAccount(uint256 _id, address _from, address _to) internal {\\n uint length = royalties[_id].length;\\n for(uint i = 0; i < length; i++) {\\n if (royalties[_id][i].account == _from) {\\n royalties[_id][i].account = payable(address(uint160(_to)));\\n }\\n }\\n }\\n\\n function _onRoyaltiesSet(uint256 _id, LibPart.Part[] memory _royalties) virtual internal;\\n}\\n\",\"keccak256\":\"0x05f63abd974fb21bf0ee76df0bc98c8ecebf81904b45f1c2e3ffd48d9dda02c3\",\"license\":\"Apache-2.0\"},\"contracts/miniNFTs/rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./AbstractRoyalties.sol\\\";\\nimport \\\"../RoyaltiesV2.sol\\\";\\n\\ncontract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 {\\n function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) {\\n return royalties[id];\\n }\\n\\n function _onRoyaltiesSet(uint256 _id, LibPart.Part[] memory _royalties) override internal {\\n emit RoyaltiesSet(_id, _royalties);\\n }\\n}\\n\",\"keccak256\":\"0x97364b4c2cc76991a8da231ecb08c9ff0fecd834350c40df53d5d62e4e3d2d46\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60a06040819052600060808190526200001b91600e91620001c9565b503480156200002957600080fd5b50604051620039c6380380620039c68339810160408190526200004c9162000352565b604080518082018252600e81526d135a5b9a55d85b1b195d0813919560921b6020808301918252835180850190945260078452664d696e6937323160c81b908401528151919291620000a191600191620001c9565b508051620000b7906002906020840190620001c9565b505050620000d4620000ce6200017360201b60201c565b62000177565b6010805462ff00001916620100008a15158102919091179182905560ff910416156200010e576010805463ff000000191663010000001790555b6010805461ffff191688151561ff0019161761010088151502179055600a859055600b849055600c83905581516200014e906014906020850190620001c9565b50805162000164906012906020840190620001c9565b50505050505050505062000450565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001d79062000413565b90600052602060002090601f016020900481019282620001fb576000855562000246565b82601f106200021657805160ff191683800117855562000246565b8280016001018555821562000246579182015b828111156200024657825182559160200191906001019062000229565b506200025492915062000258565b5090565b5b8082111562000254576000815560010162000259565b805180151581146200028057600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002ad57600080fd5b81516001600160401b0380821115620002ca57620002ca62000285565b604051601f8301601f19908116603f01168101908282118183101715620002f557620002f562000285565b816040528381526020925086838588010111156200031257600080fd5b600091505b8382101562000336578582018301518183018401529082019062000317565b83821115620003485760008385830101525b9695505050505050565b600080600080600080600080610100898b0312156200037057600080fd5b6200037b896200026f565b97506200038b60208a016200026f565b96506200039b60408a016200026f565b60608a015160808b015160a08c015160c08d0151939950919750955093506001600160401b0380821115620003cf57600080fd5b620003dd8c838d016200029b565b935060e08b0151915080821115620003f457600080fd5b50620004038b828c016200029b565b9150509295985092959890939650565b600181811c908216806200042857607f821691505b602082108114156200044a57634e487b7160e01b600052602260045260246000fd5b50919050565b61356680620004606000396000f3fe6080604052600436106103545760003560e01c8063782f08ae116101c6578063cad96cca116100f7578063e8a3d48511610095578063eb8d24441161006f578063eb8d2444146109d9578063f2fde38b146109f9578063f4a0a52814610a19578063fb3cc6c214610a3957600080fd5b8063e8a3d48514610966578063e8db53951461097b578063e985e9c51461099057600080fd5b8063daaeec86116100d1578063daaeec86146108fc578063db6242c314610911578063dc8e92ea14610931578063e7d773a01461095157600080fd5b8063cad96cca1461089a578063ccb4807b146108c7578063d111515d146108e757600080fd5b8063a0bcfc7f11610164578063b88d4fde1161013e578063b88d4fde1461082f578063b991b0fe1461084f578063c6ab67a314610865578063c87b56dd1461087a57600080fd5b8063a0bcfc7f146107da578063a22cb465146107fa578063a2cdbd071461081a57600080fd5b806384d5f97b116101a057806384d5f97b146107405780638924af74146107605780638da5cb5b146107a757806395d89b41146107c557600080fd5b8063782f08ae146106dd57806381335a95146106fd5780638462151c1461071357600080fd5b806338d07436116102a05780634f6ccce71161023e5780636352211e116102185780636352211e146106725780636817c76c1461069257806370a08231146106a8578063715018a6146106c857600080fd5b80634f6ccce71461061b578063507e094f1461063b5780635c474f9e1461065157600080fd5b806342842e0e1161027a57806342842e0e1461059b57806342966c68146105bb5780634e114e19146105db5780634f558e79146105fb57600080fd5b806338d07436146105525780633d870b40146105725780633e0e828b1461058557600080fd5b8063143094db1161030d57806323b872dd116102e757806323b872dd146104b35780632a55205a146104d35780632f745c591461051257806330027f3b1461053257600080fd5b8063143094db1461045157806314ea928a1461047157806318160ddd1461049057600080fd5b806301ffc9a71461036057806306fdde0314610395578063081812fc146103b7578063095ea7b3146103ef5780630b1244d214610411578063109695231461043157600080fd5b3661035b57005b600080fd5b34801561036c57600080fd5b5061038061037b366004612ccd565b610a53565b60405190151581526020015b60405180910390f35b3480156103a157600080fd5b506103aa610acf565b60405161038c9190612d42565b3480156103c357600080fd5b506103d76103d2366004612d55565b610b61565b6040516001600160a01b03909116815260200161038c565b3480156103fb57600080fd5b5061040f61040a366004612d83565b610ba5565b005b34801561041d57600080fd5b5061040f61042c366004612e6c565b610c33565b34801561043d57600080fd5b5061040f61044c366004612e6c565b610c52565b34801561045d57600080fd5b5061040f61046c366004612ea0565b610cca565b34801561047d57600080fd5b5060105461038090610100900460ff1681565b34801561049c57600080fd5b506104a5610d86565b60405190815260200161038c565b3480156104bf57600080fd5b5061040f6104ce366004612eee565b610da5565b3480156104df57600080fd5b506104f36104ee366004612f2f565b610db0565b604080516001600160a01b03909316835260208301919091520161038c565b34801561051e57600080fd5b506104a561052d366004612d83565b610eb6565b34801561053e57600080fd5b5061040f61054d366004612f51565b610fb2565b34801561055e57600080fd5b5061040f61056d366004612f83565b610fdc565b61040f610580366004612d55565b6110c1565b34801561059157600080fd5b506104a5600d5481565b3480156105a757600080fd5b5061040f6105b6366004612eee565b6112fa565b3480156105c757600080fd5b5061040f6105d6366004612d55565b611315565b3480156105e757600080fd5b5061040f6105f6366004612d83565b611380565b34801561060757600080fd5b50610380610616366004612d55565b6114b0565b34801561062757600080fd5b506104a5610636366004612d55565b6114bb565b34801561064757600080fd5b506104a5600c5481565b34801561065d57600080fd5b50601054610380906301000000900460ff1681565b34801561067e57600080fd5b506103d761068d366004612d55565b611565565b34801561069e57600080fd5b506104a5600b5481565b3480156106b457600080fd5b506104a56106c3366004612f51565b611577565b3480156106d457600080fd5b5061040f6115c5565b3480156106e957600080fd5b5061040f6106f8366004612faf565b6115d9565b34801561070957600080fd5b506104a5600a5481565b34801561071f57600080fd5b5061073361072e366004612f51565b611623565b60405161038c9190612ff5565b34801561074c57600080fd5b5061040f61075b366004612d55565b6116e1565b34801561076c57600080fd5b5061078061077b366004612f2f565b61173d565b604080516001600160a01b0390931683526001600160601b0390911660208301520161038c565b3480156107b357600080fd5b506007546001600160a01b03166103d7565b3480156107d157600080fd5b506103aa611786565b3480156107e657600080fd5b5061040f6107f5366004612e6c565b611795565b34801561080657600080fd5b5061040f610815366004613039565b611804565b34801561082657600080fd5b5061040f61189a565b34801561083b57600080fd5b5061040f61084a366004613065565b611959565b34801561085b57600080fd5b506104a5600f5481565b34801561087157600080fd5b506103aa61198d565b34801561088657600080fd5b506103aa610895366004612d55565b611a1b565b3480156108a657600080fd5b506108ba6108b5366004612d55565b611c67565b60405161038c919061313c565b3480156108d357600080fd5b5061040f6108e2366004612e6c565b611cf6565b3480156108f357600080fd5b5061040f611d11565b34801561090857600080fd5b5061040f611d4b565b34801561091d57600080fd5b5061040f61092c366004612d55565b611e32565b34801561093d57600080fd5b5061040f61094c36600461314f565b611e3f565b34801561095d57600080fd5b5061040f611eec565b34801561097257600080fd5b506103aa611f5d565b34801561098757600080fd5b506103aa611f6c565b34801561099c57600080fd5b506103806109ab3660046131f4565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156109e557600080fd5b506010546103809062010000900460ff1681565b348015610a0557600080fd5b5061040f610a14366004612f51565b611f79565b348015610a2557600080fd5b5061040f610a34366004612d55565b611ff2565b348015610a4557600080fd5b506010546103809060ff1681565b60006001600160e01b031982166306fdde0360e01b1480610a8457506001600160e01b031982166395d89b4160e01b145b80610a9f57506001600160e01b03198216631131d2f360e21b145b80610aba57506001600160e01b0319821663152a902d60e11b145b80610ac95750610ac982611fff565b92915050565b606060018054610ade9061322d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0a9061322d565b8015610b575780601f10610b2c57610100808354040283529160200191610b57565b820191906000526020600020905b815481529060010190602001808311610b3a57829003601f168201915b5050505050905090565b6000610b6c8261206a565b610b89576040516333d1c03960e21b815260040160405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610bb082611565565b9050806001600160a01b0316836001600160a01b03161415610be55760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610c055750610c0381336109ab565b155b15610c23576040516367d9dca160e11b815260040160405180910390fd5b610c2e83838361209e565b505050565b610c3b6120fa565b8051610c4e906013906020840190612c1e565b5050565b610c5a6120fa565b601054610100900460ff1615610cb75760405162461bcd60e51b815260206004820152601d60248201527f4d696e693732313a2050726f76656e616e63652069732066726f7a656e00000060448201526064015b60405180910390fd5b8051610c4e90600e906020840190612c1e565b610cd26120fa565b604080516001808252818301909252600091816020015b6040805180820190915260008082526020820152815260200190600190039081610ce95790505090508181600081518110610d2657610d26613262565b6020026020010151602001906001600160601b031690816001600160601b0316815250508281600081518110610d5e57610d5e613262565b60209081029190910101516001600160a01b039091169052610d808482612154565b50505050565b6000546001600160801b03600160801b82048116918116919091031690565b610c2e8383836122d8565b6000828152600860209081526040808320805482518185028101850190935280835284938493929190849084015b82821015610e2d57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610dde565b505050509050600081511115610ea65780600081518110610e5057610e50613262565b60200260200101516000015161271082600081518110610e7257610e72613262565b6020026020010151602001516001600160601b031686610e92919061328e565b610e9c91906132c3565b9250925050610eaf565b60008092509250505b9250929050565b6000610ec183611577565b8210610ee0576040516306ed618760e11b815260040160405180910390fd5b600080546001600160801b03169080805b83811015610fac57600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925290610f585750610fa4565b80516001600160a01b031615610f6d57805192505b876001600160a01b0316836001600160a01b03161415610fa25786841415610f9b57509350610ac992505050565b6001909301925b505b600101610ef1565b50600080fd5b610fba6120fa565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b0316331480610fff57506015546001600160a01b031633145b61103a5760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b6044820152606401610cae565b600081611052576007546001600160a01b031661105f565b6015546001600160a01b03165b90506000816001600160a01b03168460405160006040518083038185875af1925050503d80600081146110ae576040519150601f19603f3d011682016040523d82523d6000602084013e6110b3565b606091505b5050905080610d8057600080fd5b60105462010000900460ff166111195760405162461bcd60e51b815260206004820152601b60248201527f4d696e693732313a2053616c65206973206e6f742061637469766500000000006044820152606401610cae565b600a5481611125610d86565b61112f91906132d7565b106111875760405162461bcd60e51b815260206004820152602260248201527f4d696e693732313a20507572636861736520776f756c64206578636565642063604482015261061760f41b6064820152608401610cae565b600c548111156111e55760405162461bcd60e51b8152602060048201526024808201527f4d696e693732313a20416d6f756e742065786365656473206d617820706572206044820152631b5a5b9d60e21b6064820152608401610cae565b3481600b546111f4919061328e565b11156112535760405162461bcd60e51b815260206004820152602860248201527f4d696e693732313a2045746865722076616c75652073656e74206973206e6f746044820152670818dbdc9c9958dd60c21b6064820152608401610cae565b6000600b5482611263919061328e565b61126d90346132ef565b905080156112a457604051339082156108fc029083906000818181858888f193505050501580156112a2573d6000803e3d6000fd5b505b6112ae33836124f5565b7faf1a3bfaf9f2f81bd4d04ab44032922f4c2efeb6eca5511aeadf6ca110ed4d236112d7610d86565b604080519182526020820185905233908201526060015b60405180910390a15050565b610c2e83838360405180602001604052806000815250611959565b61131d6120fa565b60105460ff16156113405760405162461bcd60e51b8152600401610cae90613306565b6113498161250f565b6040518181527f9683912f9dc252f5dd0b0a235bf73c509fcdef5896a21314dac6cf8361959d56906020015b60405180910390a150565b6113886120fa565b6001600160a01b0382166113ec5760405162461bcd60e51b815260206004820152602560248201527f4d696e693732313a2043616e6e6f74206d696e7420746f207a65726f206164646044820152643932b9b99760d91b6064820152608401610cae565b600a54816113f8610d86565b61140291906132d7565b106114595760405162461bcd60e51b815260206004820152602160248201527f4d696e693732313a204d696e74696e6720776f756c64206578636565642063616044820152600760fc1b6064820152608401610cae565b61146382826124f5565b7f3dcaefd8f2213bd148d6b92e75136d9bfbf4251377fdc35d8fa9981a8225e2fd61148c610d86565b60408051918252602082018490526001600160a01b038516908201526060016112ee565b6000610ac98261206a565b600080546001600160801b031681805b8281101561154b57600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611542578583141561153b5750949350505050565b6001909201915b506001016114cb565b506040516329c8c00760e21b815260040160405180910390fd5b6000611570826126b2565b5192915050565b60006001600160a01b0382166115a0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600460205260409020546001600160401b031690565b6115cd6120fa565b6115d760006127d4565b565b6115e16120fa565b60105460ff16156116045760405162461bcd60e51b8152600401610cae90613306565b60008281526011602090815260409091208251610c2e92840190612c1e565b6060600061163083611577565b9050806116515760408051600080825260208201909252905b509392505050565b6000816001600160401b0381111561166b5761166b612daf565b604051908082528060200260200182016040528015611694578160200160208202803683370190505b50905060005b82811015611649576116ac8582610eb6565b8282815181106116be576116be613262565b6020908102919091010152806116d38161333d565b91505061169a565b50919050565b6116e96120fa565b6010546301000000900460ff16156117385760405162461bcd60e51b815260206004820152601260248201527139b0b6329030b63932b0b23c903132b3bab760711b6044820152606401610cae565b600f55565b6008602052816000526040600020818154811061175957600080fd5b6000918252602090912001546001600160a01b0381169250600160a01b90046001600160601b0316905082565b606060028054610ade9061322d565b61179d6120fa565b60105460ff16156117c05760405162461bcd60e51b8152600401610cae90613306565b80516117d3906014906020840190612c1e565b507fafa35f42f46f5052816d7c6a2e9406eca98294b20726677862d83b4a7418d8d560146040516113759190613358565b6001600160a01b03821633141561182e5760405163b06307db60e01b815260040160405180910390fd5b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6118a26120fa565b600f54600a546118b291906132ef565b6118bd6002436132ef565b403360601b6118ca610d86565b6040516118fc939291906020019283526bffffffffffffffffffffffff19919091166020830152603482015260540190565b6040516020818303038152906040528051906020012060001c61191f91906133dd565b600d8190556040519081527ffb0b2459ef0b436ea50d577db242217edfa1e86a7404361aaae9b6bb406b7e2f9060200160405180910390a1565b6119648484846122d8565b61197084848484612826565b610d80576040516368d2bf6b60e11b815260040160405180910390fd5b600e805461199a9061322d565b80601f01602080910402602001604051908101604052809291908181526020018280546119c69061322d565b8015611a135780601f106119e857610100808354040283529160200191611a13565b820191906000526020600020905b8154815290600101906020018083116119f657829003601f168201915b505050505081565b60105460609060ff16158015611a3f5750600060138054611a3b9061322d565b9050115b15611ad65760138054611a519061322d565b80601f0160208091040260200160405190810160405280929190818152602001828054611a7d9061322d565b8015611aca5780601f10611a9f57610100808354040283529160200191611aca565b820191906000526020600020905b815481529060010190602001808311611aad57829003601f168201915b50505050509050919050565b611adf8261206a565b611afc57604051630a14c4b560e41b815260040160405180910390fd5b600f5482908110611b4a57600f54600a54611b189082906132ef565b600f5483600d54611b2991906132d7565b611b3391906132ef565b611b3d91906133dd565b611b4791906132d7565b90505b60008381526011602052604090208054611b639061322d565b15159050611bc85760148054611b789061322d565b15159050611b955760405180602001604052806000815250611bc1565b6014611ba082612935565b604051602001611bb19291906133f1565b6040516020818303038152906040525b9392505050565b60008381526011602052604090208054611be19061322d565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0d9061322d565b8015611c5a5780601f10611c2f57610100808354040283529160200191611c5a565b820191906000526020600020905b815481529060010190602001808311611c3d57829003601f168201915b5050505050915050919050565b606060086000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015611ceb57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101611c9c565b505050509050919050565b611cfe6120fa565b8051610c4e906012906020840190612c1e565b611d196120fa565b60105460ff1615611d3c5760405162461bcd60e51b8152600401610cae90613306565b6010805460ff19166001179055565b611d536120fa565b60105462010000900460ff1680611d6b5750600f5415155b611ddd5760405162461bcd60e51b815260206004820152603a60248201527f63616e6e6f742073746172742073616c6520756e74696c2061697264726f702060448201527f697320636f6d706c65746520616e64206f6666736574207365740000000000006064820152608401610cae565b6010805460ff62010000808304821615810262ff00001990931692909217928390559104168015611e1857506010546301000000900460ff16155b156115d7576010805463ff00000019166301000000179055565b611e3a6120fa565b600c55565b611e476120fa565b60105460ff1615611e6a5760405162461bcd60e51b8152600401610cae90613306565b60005b81518163ffffffff161015611ebc576000828263ffffffff1681518110611e9657611e96613262565b60200260200101519050611ea98161250f565b5080611eb481613474565b915050611e6d565b507f83087850e779d40510df74fdf887213102c56b5f759ccc0681b416be2a789aab816040516113759190612ff5565b611ef46120fa565b601054610100900460ff1615611f4c5760405162461bcd60e51b815260206004820152601d60248201527f4d696e693732313a2050726f76656e616e63652069732066726f7a656e0000006044820152606401610cae565b6010805461ff001916610100179055565b606060128054610ade9061322d565b6013805461199a9061322d565b611f816120fa565b6001600160a01b038116611fe65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cae565b611fef816127d4565b50565b611ffa6120fa565b600b55565b60006001600160e01b031982166380ac58cd60e01b148061203057506001600160e01b03198216635b5e139f60e01b145b8061204b57506001600160e01b0319821663780e9d6360e01b145b80610ac957506301ffc9a760e01b6001600160e01b0319831614610ac9565b600080546001600160801b031682108015610ac9575050600090815260036020526040902054600160e01b900460ff161590565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6007546001600160a01b031633146115d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cae565b60005b81518110156122cd5760006001600160a01b031682828151811061217d5761217d613262565b6020026020010151600001516001600160a01b031614156121e05760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e7400000000006044820152606401610cae565b8181815181106121f2576121f2613262565b6020026020010151602001516001600160601b0316600014156122575760405162461bcd60e51b815260206004820181905260248201527f526f79616c74792076616c75652073686f756c6420626520706f7369746976656044820152606401610cae565b6000838152600860205260409020825183908390811061227957612279613262565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b0390911617910155806122c58161333d565b915050612157565b50610c4e8282612a5d565b60006122e3826126b2565b80519091506000906001600160a01b0316336001600160a01b031614806123115750815161231190336109ab565b8061232c57503361232184610b61565b6001600160a01b0316145b90508061234c57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146123815760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166123a857604051633a954ecd60e21b815260040160405180910390fd5b6123b8600084846000015161209e565b6001600160a01b038581166000908152600460209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600390945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166124ab576000546001600160801b03168110156124ab57825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b610c4e828260405180602001604052806000815250612a8e565b600061251a826126b2565b905061252c600083836000015161209e565b80516001600160a01b039081166000908152600460209081526040808320805467ffffffffffffffff1981166001600160401b0391821660001901821617909155855185168452818420805467ffffffffffffffff60801b198116600160801b9182900484166001908101851690920217909155865188865260039094528285208054600160e01b9588166001600160e01b031990911617600160a01b42909416939093029290921760ff60e01b191693909317905590850180835291205490911661264c576000546001600160801b031681101561264c57815160008281526003602090815260409091208054918501516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b03909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450506000805460016001600160801b03600160801b80840482169290920181169091029116179055565b60408051606081018252600080825260208201819052918101829052905482906001600160801b03168110156127bb57600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906127b95780516001600160a01b031615612750579392505050565b5060001901600081815260036020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156127b4579392505050565b612750565b505b604051636f96cda160e11b815260040160405180910390fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160a01b0384163b1561292957604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061286a903390899088908890600401613498565b602060405180830381600087803b15801561288457600080fd5b505af19250505080156128b4575060408051601f3d908101601f191682019092526128b1918101906134d5565b60015b61290f573d8080156128e2576040519150601f19603f3d011682016040523d82523d6000602084013e6128e7565b606091505b508051612907576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061292d565b5060015b949350505050565b6060816129595750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612983578061296d8161333d565b915061297c9050600a836132c3565b915061295d565b6000816001600160401b0381111561299d5761299d612daf565b6040519080825280601f01601f1916602001820160405280156129c7576020820181803683370190505b509050815b8515612a54576129dd6001826132ef565b905060006129ec600a886132c3565b6129f790600a61328e565b612a0190886132ef565b612a0c9060306134f2565b905060008160f81b905080848481518110612a2957612a29613262565b60200101906001600160f81b031916908160001a905350612a4b600a896132c3565b975050506129cc565b50949350505050565b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df82826040516112ee929190613517565b610c2e83838360016000546001600160801b03166001600160a01b038516612ac857604051622e076360e81b815260040160405180910390fd5b83612ae65760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260046020908152604080832080546001600160801b031981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526003909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b85811015612bf85760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838015612bce5750612bcc6000888488612826565b155b15612bec576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101612b77565b50600080546001600160801b0319166001600160801b03929092169190911790556124ee565b828054612c2a9061322d565b90600052602060002090601f016020900481019282612c4c5760008555612c92565b82601f10612c6557805160ff1916838001178555612c92565b82800160010185558215612c92579182015b82811115612c92578251825591602001919060010190612c77565b50612c9e929150612ca2565b5090565b5b80821115612c9e5760008155600101612ca3565b6001600160e01b031981168114611fef57600080fd5b600060208284031215612cdf57600080fd5b8135611bc181612cb7565b60005b83811015612d05578181015183820152602001612ced565b83811115610d805750506000910152565b60008151808452612d2e816020860160208601612cea565b601f01601f19169290920160200192915050565b602081526000611bc16020830184612d16565b600060208284031215612d6757600080fd5b5035919050565b6001600160a01b0381168114611fef57600080fd5b60008060408385031215612d9657600080fd5b8235612da181612d6e565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612ded57612ded612daf565b604052919050565b60006001600160401b03831115612e0e57612e0e612daf565b612e21601f8401601f1916602001612dc5565b9050828152838383011115612e3557600080fd5b828260208301376000602084830101529392505050565b600082601f830112612e5d57600080fd5b611bc183833560208501612df5565b600060208284031215612e7e57600080fd5b81356001600160401b03811115612e9457600080fd5b61292d84828501612e4c565b600080600060608486031215612eb557600080fd5b833592506020840135612ec781612d6e565b915060408401356001600160601b0381168114612ee357600080fd5b809150509250925092565b600080600060608486031215612f0357600080fd5b8335612f0e81612d6e565b92506020840135612f1e81612d6e565b929592945050506040919091013590565b60008060408385031215612f4257600080fd5b50508035926020909101359150565b600060208284031215612f6357600080fd5b8135611bc181612d6e565b80358015158114612f7e57600080fd5b919050565b60008060408385031215612f9657600080fd5b82359150612fa660208401612f6e565b90509250929050565b60008060408385031215612fc257600080fd5b8235915060208301356001600160401b03811115612fdf57600080fd5b612feb85828601612e4c565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561302d57835183529284019291840191600101613011565b50909695505050505050565b6000806040838503121561304c57600080fd5b823561305781612d6e565b9150612fa660208401612f6e565b6000806000806080858703121561307b57600080fd5b843561308681612d6e565b9350602085013561309681612d6e565b92506040850135915060608501356001600160401b038111156130b857600080fd5b8501601f810187136130c957600080fd5b6130d887823560208401612df5565b91505092959194509250565b600081518084526020808501945080840160005b8381101561313157815180516001600160a01b031688528301516001600160601b031683880152604090960195908201906001016130f8565b509495945050505050565b602081526000611bc160208301846130e4565b6000602080838503121561316257600080fd5b82356001600160401b038082111561317957600080fd5b818501915085601f83011261318d57600080fd5b81358181111561319f5761319f612daf565b8060051b91506131b0848301612dc5565b81815291830184019184810190888411156131ca57600080fd5b938501935b838510156131e8578435825293850193908501906131cf565b98975050505050505050565b6000806040838503121561320757600080fd5b823561321281612d6e565b9150602083013561322281612d6e565b809150509250929050565b600181811c9082168061324157607f821691505b602082108114156116db57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156132a8576132a8613278565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826132d2576132d26132ad565b500490565b600082198211156132ea576132ea613278565b500190565b60008282101561330157613301613278565b500390565b6020808252601b908201527f4d696e693732313a204d657461646174612069732066726f7a656e0000000000604082015260600190565b600060001982141561335157613351613278565b5060010190565b600060208083526000845461336c8161322d565b8084870152604060018084166000811461338d57600181146133a1576133cf565b60ff198516898401526060890195506133cf565b896000528660002060005b858110156133c75781548b82018601529083019088016133ac565b8a0184019650505b509398975050505050505050565b6000826133ec576133ec6132ad565b500690565b60008084546133ff8161322d565b60018281168015613417576001811461342857613457565b60ff19841687528287019450613457565b8860005260208060002060005b8581101561344e5781548a820152908401908201613435565b50505082870194505b50505050835161346b818360208801612cea565b01949350505050565b600063ffffffff8083168181141561348e5761348e613278565b6001019392505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906134cb90830184612d16565b9695505050505050565b6000602082840312156134e757600080fd5b8151611bc181612cb7565b600060ff821660ff84168060ff0382111561350f5761350f613278565b019392505050565b82815260406020820152600061292d60408301846130e456fea264697066735822122050ba5fd62e86b51ae06724d4ed16622dd97d6fdf3e7f6886f0680d324447bb7b64736f6c63430008090033", + "deployedBytecode": "0x6080604052600436106103545760003560e01c8063782f08ae116101c6578063cad96cca116100f7578063e8a3d48511610095578063eb8d24441161006f578063eb8d2444146109d9578063f2fde38b146109f9578063f4a0a52814610a19578063fb3cc6c214610a3957600080fd5b8063e8a3d48514610966578063e8db53951461097b578063e985e9c51461099057600080fd5b8063daaeec86116100d1578063daaeec86146108fc578063db6242c314610911578063dc8e92ea14610931578063e7d773a01461095157600080fd5b8063cad96cca1461089a578063ccb4807b146108c7578063d111515d146108e757600080fd5b8063a0bcfc7f11610164578063b88d4fde1161013e578063b88d4fde1461082f578063b991b0fe1461084f578063c6ab67a314610865578063c87b56dd1461087a57600080fd5b8063a0bcfc7f146107da578063a22cb465146107fa578063a2cdbd071461081a57600080fd5b806384d5f97b116101a057806384d5f97b146107405780638924af74146107605780638da5cb5b146107a757806395d89b41146107c557600080fd5b8063782f08ae146106dd57806381335a95146106fd5780638462151c1461071357600080fd5b806338d07436116102a05780634f6ccce71161023e5780636352211e116102185780636352211e146106725780636817c76c1461069257806370a08231146106a8578063715018a6146106c857600080fd5b80634f6ccce71461061b578063507e094f1461063b5780635c474f9e1461065157600080fd5b806342842e0e1161027a57806342842e0e1461059b57806342966c68146105bb5780634e114e19146105db5780634f558e79146105fb57600080fd5b806338d07436146105525780633d870b40146105725780633e0e828b1461058557600080fd5b8063143094db1161030d57806323b872dd116102e757806323b872dd146104b35780632a55205a146104d35780632f745c591461051257806330027f3b1461053257600080fd5b8063143094db1461045157806314ea928a1461047157806318160ddd1461049057600080fd5b806301ffc9a71461036057806306fdde0314610395578063081812fc146103b7578063095ea7b3146103ef5780630b1244d214610411578063109695231461043157600080fd5b3661035b57005b600080fd5b34801561036c57600080fd5b5061038061037b366004612ccd565b610a53565b60405190151581526020015b60405180910390f35b3480156103a157600080fd5b506103aa610acf565b60405161038c9190612d42565b3480156103c357600080fd5b506103d76103d2366004612d55565b610b61565b6040516001600160a01b03909116815260200161038c565b3480156103fb57600080fd5b5061040f61040a366004612d83565b610ba5565b005b34801561041d57600080fd5b5061040f61042c366004612e6c565b610c33565b34801561043d57600080fd5b5061040f61044c366004612e6c565b610c52565b34801561045d57600080fd5b5061040f61046c366004612ea0565b610cca565b34801561047d57600080fd5b5060105461038090610100900460ff1681565b34801561049c57600080fd5b506104a5610d86565b60405190815260200161038c565b3480156104bf57600080fd5b5061040f6104ce366004612eee565b610da5565b3480156104df57600080fd5b506104f36104ee366004612f2f565b610db0565b604080516001600160a01b03909316835260208301919091520161038c565b34801561051e57600080fd5b506104a561052d366004612d83565b610eb6565b34801561053e57600080fd5b5061040f61054d366004612f51565b610fb2565b34801561055e57600080fd5b5061040f61056d366004612f83565b610fdc565b61040f610580366004612d55565b6110c1565b34801561059157600080fd5b506104a5600d5481565b3480156105a757600080fd5b5061040f6105b6366004612eee565b6112fa565b3480156105c757600080fd5b5061040f6105d6366004612d55565b611315565b3480156105e757600080fd5b5061040f6105f6366004612d83565b611380565b34801561060757600080fd5b50610380610616366004612d55565b6114b0565b34801561062757600080fd5b506104a5610636366004612d55565b6114bb565b34801561064757600080fd5b506104a5600c5481565b34801561065d57600080fd5b50601054610380906301000000900460ff1681565b34801561067e57600080fd5b506103d761068d366004612d55565b611565565b34801561069e57600080fd5b506104a5600b5481565b3480156106b457600080fd5b506104a56106c3366004612f51565b611577565b3480156106d457600080fd5b5061040f6115c5565b3480156106e957600080fd5b5061040f6106f8366004612faf565b6115d9565b34801561070957600080fd5b506104a5600a5481565b34801561071f57600080fd5b5061073361072e366004612f51565b611623565b60405161038c9190612ff5565b34801561074c57600080fd5b5061040f61075b366004612d55565b6116e1565b34801561076c57600080fd5b5061078061077b366004612f2f565b61173d565b604080516001600160a01b0390931683526001600160601b0390911660208301520161038c565b3480156107b357600080fd5b506007546001600160a01b03166103d7565b3480156107d157600080fd5b506103aa611786565b3480156107e657600080fd5b5061040f6107f5366004612e6c565b611795565b34801561080657600080fd5b5061040f610815366004613039565b611804565b34801561082657600080fd5b5061040f61189a565b34801561083b57600080fd5b5061040f61084a366004613065565b611959565b34801561085b57600080fd5b506104a5600f5481565b34801561087157600080fd5b506103aa61198d565b34801561088657600080fd5b506103aa610895366004612d55565b611a1b565b3480156108a657600080fd5b506108ba6108b5366004612d55565b611c67565b60405161038c919061313c565b3480156108d357600080fd5b5061040f6108e2366004612e6c565b611cf6565b3480156108f357600080fd5b5061040f611d11565b34801561090857600080fd5b5061040f611d4b565b34801561091d57600080fd5b5061040f61092c366004612d55565b611e32565b34801561093d57600080fd5b5061040f61094c36600461314f565b611e3f565b34801561095d57600080fd5b5061040f611eec565b34801561097257600080fd5b506103aa611f5d565b34801561098757600080fd5b506103aa611f6c565b34801561099c57600080fd5b506103806109ab3660046131f4565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156109e557600080fd5b506010546103809062010000900460ff1681565b348015610a0557600080fd5b5061040f610a14366004612f51565b611f79565b348015610a2557600080fd5b5061040f610a34366004612d55565b611ff2565b348015610a4557600080fd5b506010546103809060ff1681565b60006001600160e01b031982166306fdde0360e01b1480610a8457506001600160e01b031982166395d89b4160e01b145b80610a9f57506001600160e01b03198216631131d2f360e21b145b80610aba57506001600160e01b0319821663152a902d60e11b145b80610ac95750610ac982611fff565b92915050565b606060018054610ade9061322d565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0a9061322d565b8015610b575780601f10610b2c57610100808354040283529160200191610b57565b820191906000526020600020905b815481529060010190602001808311610b3a57829003601f168201915b5050505050905090565b6000610b6c8261206a565b610b89576040516333d1c03960e21b815260040160405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610bb082611565565b9050806001600160a01b0316836001600160a01b03161415610be55760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610c055750610c0381336109ab565b155b15610c23576040516367d9dca160e11b815260040160405180910390fd5b610c2e83838361209e565b505050565b610c3b6120fa565b8051610c4e906013906020840190612c1e565b5050565b610c5a6120fa565b601054610100900460ff1615610cb75760405162461bcd60e51b815260206004820152601d60248201527f4d696e693732313a2050726f76656e616e63652069732066726f7a656e00000060448201526064015b60405180910390fd5b8051610c4e90600e906020840190612c1e565b610cd26120fa565b604080516001808252818301909252600091816020015b6040805180820190915260008082526020820152815260200190600190039081610ce95790505090508181600081518110610d2657610d26613262565b6020026020010151602001906001600160601b031690816001600160601b0316815250508281600081518110610d5e57610d5e613262565b60209081029190910101516001600160a01b039091169052610d808482612154565b50505050565b6000546001600160801b03600160801b82048116918116919091031690565b610c2e8383836122d8565b6000828152600860209081526040808320805482518185028101850190935280835284938493929190849084015b82821015610e2d57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610dde565b505050509050600081511115610ea65780600081518110610e5057610e50613262565b60200260200101516000015161271082600081518110610e7257610e72613262565b6020026020010151602001516001600160601b031686610e92919061328e565b610e9c91906132c3565b9250925050610eaf565b60008092509250505b9250929050565b6000610ec183611577565b8210610ee0576040516306ed618760e11b815260040160405180910390fd5b600080546001600160801b03169080805b83811015610fac57600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925290610f585750610fa4565b80516001600160a01b031615610f6d57805192505b876001600160a01b0316836001600160a01b03161415610fa25786841415610f9b57509350610ac992505050565b6001909301925b505b600101610ef1565b50600080fd5b610fba6120fa565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b0316331480610fff57506015546001600160a01b031633145b61103a5760405162461bcd60e51b815260206004820152600c60248201526b1d5b985d5d1a1bdc9a5e995960a21b6044820152606401610cae565b600081611052576007546001600160a01b031661105f565b6015546001600160a01b03165b90506000816001600160a01b03168460405160006040518083038185875af1925050503d80600081146110ae576040519150601f19603f3d011682016040523d82523d6000602084013e6110b3565b606091505b5050905080610d8057600080fd5b60105462010000900460ff166111195760405162461bcd60e51b815260206004820152601b60248201527f4d696e693732313a2053616c65206973206e6f742061637469766500000000006044820152606401610cae565b600a5481611125610d86565b61112f91906132d7565b106111875760405162461bcd60e51b815260206004820152602260248201527f4d696e693732313a20507572636861736520776f756c64206578636565642063604482015261061760f41b6064820152608401610cae565b600c548111156111e55760405162461bcd60e51b8152602060048201526024808201527f4d696e693732313a20416d6f756e742065786365656473206d617820706572206044820152631b5a5b9d60e21b6064820152608401610cae565b3481600b546111f4919061328e565b11156112535760405162461bcd60e51b815260206004820152602860248201527f4d696e693732313a2045746865722076616c75652073656e74206973206e6f746044820152670818dbdc9c9958dd60c21b6064820152608401610cae565b6000600b5482611263919061328e565b61126d90346132ef565b905080156112a457604051339082156108fc029083906000818181858888f193505050501580156112a2573d6000803e3d6000fd5b505b6112ae33836124f5565b7faf1a3bfaf9f2f81bd4d04ab44032922f4c2efeb6eca5511aeadf6ca110ed4d236112d7610d86565b604080519182526020820185905233908201526060015b60405180910390a15050565b610c2e83838360405180602001604052806000815250611959565b61131d6120fa565b60105460ff16156113405760405162461bcd60e51b8152600401610cae90613306565b6113498161250f565b6040518181527f9683912f9dc252f5dd0b0a235bf73c509fcdef5896a21314dac6cf8361959d56906020015b60405180910390a150565b6113886120fa565b6001600160a01b0382166113ec5760405162461bcd60e51b815260206004820152602560248201527f4d696e693732313a2043616e6e6f74206d696e7420746f207a65726f206164646044820152643932b9b99760d91b6064820152608401610cae565b600a54816113f8610d86565b61140291906132d7565b106114595760405162461bcd60e51b815260206004820152602160248201527f4d696e693732313a204d696e74696e6720776f756c64206578636565642063616044820152600760fc1b6064820152608401610cae565b61146382826124f5565b7f3dcaefd8f2213bd148d6b92e75136d9bfbf4251377fdc35d8fa9981a8225e2fd61148c610d86565b60408051918252602082018490526001600160a01b038516908201526060016112ee565b6000610ac98261206a565b600080546001600160801b031681805b8281101561154b57600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611542578583141561153b5750949350505050565b6001909201915b506001016114cb565b506040516329c8c00760e21b815260040160405180910390fd5b6000611570826126b2565b5192915050565b60006001600160a01b0382166115a0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600460205260409020546001600160401b031690565b6115cd6120fa565b6115d760006127d4565b565b6115e16120fa565b60105460ff16156116045760405162461bcd60e51b8152600401610cae90613306565b60008281526011602090815260409091208251610c2e92840190612c1e565b6060600061163083611577565b9050806116515760408051600080825260208201909252905b509392505050565b6000816001600160401b0381111561166b5761166b612daf565b604051908082528060200260200182016040528015611694578160200160208202803683370190505b50905060005b82811015611649576116ac8582610eb6565b8282815181106116be576116be613262565b6020908102919091010152806116d38161333d565b91505061169a565b50919050565b6116e96120fa565b6010546301000000900460ff16156117385760405162461bcd60e51b815260206004820152601260248201527139b0b6329030b63932b0b23c903132b3bab760711b6044820152606401610cae565b600f55565b6008602052816000526040600020818154811061175957600080fd5b6000918252602090912001546001600160a01b0381169250600160a01b90046001600160601b0316905082565b606060028054610ade9061322d565b61179d6120fa565b60105460ff16156117c05760405162461bcd60e51b8152600401610cae90613306565b80516117d3906014906020840190612c1e565b507fafa35f42f46f5052816d7c6a2e9406eca98294b20726677862d83b4a7418d8d560146040516113759190613358565b6001600160a01b03821633141561182e5760405163b06307db60e01b815260040160405180910390fd5b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6118a26120fa565b600f54600a546118b291906132ef565b6118bd6002436132ef565b403360601b6118ca610d86565b6040516118fc939291906020019283526bffffffffffffffffffffffff19919091166020830152603482015260540190565b6040516020818303038152906040528051906020012060001c61191f91906133dd565b600d8190556040519081527ffb0b2459ef0b436ea50d577db242217edfa1e86a7404361aaae9b6bb406b7e2f9060200160405180910390a1565b6119648484846122d8565b61197084848484612826565b610d80576040516368d2bf6b60e11b815260040160405180910390fd5b600e805461199a9061322d565b80601f01602080910402602001604051908101604052809291908181526020018280546119c69061322d565b8015611a135780601f106119e857610100808354040283529160200191611a13565b820191906000526020600020905b8154815290600101906020018083116119f657829003601f168201915b505050505081565b60105460609060ff16158015611a3f5750600060138054611a3b9061322d565b9050115b15611ad65760138054611a519061322d565b80601f0160208091040260200160405190810160405280929190818152602001828054611a7d9061322d565b8015611aca5780601f10611a9f57610100808354040283529160200191611aca565b820191906000526020600020905b815481529060010190602001808311611aad57829003601f168201915b50505050509050919050565b611adf8261206a565b611afc57604051630a14c4b560e41b815260040160405180910390fd5b600f5482908110611b4a57600f54600a54611b189082906132ef565b600f5483600d54611b2991906132d7565b611b3391906132ef565b611b3d91906133dd565b611b4791906132d7565b90505b60008381526011602052604090208054611b639061322d565b15159050611bc85760148054611b789061322d565b15159050611b955760405180602001604052806000815250611bc1565b6014611ba082612935565b604051602001611bb19291906133f1565b6040516020818303038152906040525b9392505050565b60008381526011602052604090208054611be19061322d565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0d9061322d565b8015611c5a5780601f10611c2f57610100808354040283529160200191611c5a565b820191906000526020600020905b815481529060010190602001808311611c3d57829003601f168201915b5050505050915050919050565b606060086000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015611ceb57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101611c9c565b505050509050919050565b611cfe6120fa565b8051610c4e906012906020840190612c1e565b611d196120fa565b60105460ff1615611d3c5760405162461bcd60e51b8152600401610cae90613306565b6010805460ff19166001179055565b611d536120fa565b60105462010000900460ff1680611d6b5750600f5415155b611ddd5760405162461bcd60e51b815260206004820152603a60248201527f63616e6e6f742073746172742073616c6520756e74696c2061697264726f702060448201527f697320636f6d706c65746520616e64206f6666736574207365740000000000006064820152608401610cae565b6010805460ff62010000808304821615810262ff00001990931692909217928390559104168015611e1857506010546301000000900460ff16155b156115d7576010805463ff00000019166301000000179055565b611e3a6120fa565b600c55565b611e476120fa565b60105460ff1615611e6a5760405162461bcd60e51b8152600401610cae90613306565b60005b81518163ffffffff161015611ebc576000828263ffffffff1681518110611e9657611e96613262565b60200260200101519050611ea98161250f565b5080611eb481613474565b915050611e6d565b507f83087850e779d40510df74fdf887213102c56b5f759ccc0681b416be2a789aab816040516113759190612ff5565b611ef46120fa565b601054610100900460ff1615611f4c5760405162461bcd60e51b815260206004820152601d60248201527f4d696e693732313a2050726f76656e616e63652069732066726f7a656e0000006044820152606401610cae565b6010805461ff001916610100179055565b606060128054610ade9061322d565b6013805461199a9061322d565b611f816120fa565b6001600160a01b038116611fe65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610cae565b611fef816127d4565b50565b611ffa6120fa565b600b55565b60006001600160e01b031982166380ac58cd60e01b148061203057506001600160e01b03198216635b5e139f60e01b145b8061204b57506001600160e01b0319821663780e9d6360e01b145b80610ac957506301ffc9a760e01b6001600160e01b0319831614610ac9565b600080546001600160801b031682108015610ac9575050600090815260036020526040902054600160e01b900460ff161590565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6007546001600160a01b031633146115d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610cae565b60005b81518110156122cd5760006001600160a01b031682828151811061217d5761217d613262565b6020026020010151600001516001600160a01b031614156121e05760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e7400000000006044820152606401610cae565b8181815181106121f2576121f2613262565b6020026020010151602001516001600160601b0316600014156122575760405162461bcd60e51b815260206004820181905260248201527f526f79616c74792076616c75652073686f756c6420626520706f7369746976656044820152606401610cae565b6000838152600860205260409020825183908390811061227957612279613262565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b0390911617910155806122c58161333d565b915050612157565b50610c4e8282612a5d565b60006122e3826126b2565b80519091506000906001600160a01b0316336001600160a01b031614806123115750815161231190336109ab565b8061232c57503361232184610b61565b6001600160a01b0316145b90508061234c57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146123815760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166123a857604051633a954ecd60e21b815260040160405180910390fd5b6123b8600084846000015161209e565b6001600160a01b038581166000908152600460209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600390945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166124ab576000546001600160801b03168110156124ab57825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b610c4e828260405180602001604052806000815250612a8e565b600061251a826126b2565b905061252c600083836000015161209e565b80516001600160a01b039081166000908152600460209081526040808320805467ffffffffffffffff1981166001600160401b0391821660001901821617909155855185168452818420805467ffffffffffffffff60801b198116600160801b9182900484166001908101851690920217909155865188865260039094528285208054600160e01b9588166001600160e01b031990911617600160a01b42909416939093029290921760ff60e01b191693909317905590850180835291205490911661264c576000546001600160801b031681101561264c57815160008281526003602090815260409091208054918501516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b03909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450506000805460016001600160801b03600160801b80840482169290920181169091029116179055565b60408051606081018252600080825260208201819052918101829052905482906001600160801b03168110156127bb57600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906127b95780516001600160a01b031615612750579392505050565b5060001901600081815260036020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156127b4579392505050565b612750565b505b604051636f96cda160e11b815260040160405180910390fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160a01b0384163b1561292957604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061286a903390899088908890600401613498565b602060405180830381600087803b15801561288457600080fd5b505af19250505080156128b4575060408051601f3d908101601f191682019092526128b1918101906134d5565b60015b61290f573d8080156128e2576040519150601f19603f3d011682016040523d82523d6000602084013e6128e7565b606091505b508051612907576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061292d565b5060015b949350505050565b6060816129595750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612983578061296d8161333d565b915061297c9050600a836132c3565b915061295d565b6000816001600160401b0381111561299d5761299d612daf565b6040519080825280601f01601f1916602001820160405280156129c7576020820181803683370190505b509050815b8515612a54576129dd6001826132ef565b905060006129ec600a886132c3565b6129f790600a61328e565b612a0190886132ef565b612a0c9060306134f2565b905060008160f81b905080848481518110612a2957612a29613262565b60200101906001600160f81b031916908160001a905350612a4b600a896132c3565b975050506129cc565b50949350505050565b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df82826040516112ee929190613517565b610c2e83838360016000546001600160801b03166001600160a01b038516612ac857604051622e076360e81b815260040160405180910390fd5b83612ae65760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260046020908152604080832080546001600160801b031981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526003909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b85811015612bf85760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838015612bce5750612bcc6000888488612826565b155b15612bec576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101612b77565b50600080546001600160801b0319166001600160801b03929092169190911790556124ee565b828054612c2a9061322d565b90600052602060002090601f016020900481019282612c4c5760008555612c92565b82601f10612c6557805160ff1916838001178555612c92565b82800160010185558215612c92579182015b82811115612c92578251825591602001919060010190612c77565b50612c9e929150612ca2565b5090565b5b80821115612c9e5760008155600101612ca3565b6001600160e01b031981168114611fef57600080fd5b600060208284031215612cdf57600080fd5b8135611bc181612cb7565b60005b83811015612d05578181015183820152602001612ced565b83811115610d805750506000910152565b60008151808452612d2e816020860160208601612cea565b601f01601f19169290920160200192915050565b602081526000611bc16020830184612d16565b600060208284031215612d6757600080fd5b5035919050565b6001600160a01b0381168114611fef57600080fd5b60008060408385031215612d9657600080fd5b8235612da181612d6e565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612ded57612ded612daf565b604052919050565b60006001600160401b03831115612e0e57612e0e612daf565b612e21601f8401601f1916602001612dc5565b9050828152838383011115612e3557600080fd5b828260208301376000602084830101529392505050565b600082601f830112612e5d57600080fd5b611bc183833560208501612df5565b600060208284031215612e7e57600080fd5b81356001600160401b03811115612e9457600080fd5b61292d84828501612e4c565b600080600060608486031215612eb557600080fd5b833592506020840135612ec781612d6e565b915060408401356001600160601b0381168114612ee357600080fd5b809150509250925092565b600080600060608486031215612f0357600080fd5b8335612f0e81612d6e565b92506020840135612f1e81612d6e565b929592945050506040919091013590565b60008060408385031215612f4257600080fd5b50508035926020909101359150565b600060208284031215612f6357600080fd5b8135611bc181612d6e565b80358015158114612f7e57600080fd5b919050565b60008060408385031215612f9657600080fd5b82359150612fa660208401612f6e565b90509250929050565b60008060408385031215612fc257600080fd5b8235915060208301356001600160401b03811115612fdf57600080fd5b612feb85828601612e4c565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561302d57835183529284019291840191600101613011565b50909695505050505050565b6000806040838503121561304c57600080fd5b823561305781612d6e565b9150612fa660208401612f6e565b6000806000806080858703121561307b57600080fd5b843561308681612d6e565b9350602085013561309681612d6e565b92506040850135915060608501356001600160401b038111156130b857600080fd5b8501601f810187136130c957600080fd5b6130d887823560208401612df5565b91505092959194509250565b600081518084526020808501945080840160005b8381101561313157815180516001600160a01b031688528301516001600160601b031683880152604090960195908201906001016130f8565b509495945050505050565b602081526000611bc160208301846130e4565b6000602080838503121561316257600080fd5b82356001600160401b038082111561317957600080fd5b818501915085601f83011261318d57600080fd5b81358181111561319f5761319f612daf565b8060051b91506131b0848301612dc5565b81815291830184019184810190888411156131ca57600080fd5b938501935b838510156131e8578435825293850193908501906131cf565b98975050505050505050565b6000806040838503121561320757600080fd5b823561321281612d6e565b9150602083013561322281612d6e565b809150509250929050565b600181811c9082168061324157607f821691505b602082108114156116db57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156132a8576132a8613278565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826132d2576132d26132ad565b500490565b600082198211156132ea576132ea613278565b500190565b60008282101561330157613301613278565b500390565b6020808252601b908201527f4d696e693732313a204d657461646174612069732066726f7a656e0000000000604082015260600190565b600060001982141561335157613351613278565b5060010190565b600060208083526000845461336c8161322d565b8084870152604060018084166000811461338d57600181146133a1576133cf565b60ff198516898401526060890195506133cf565b896000528660002060005b858110156133c75781548b82018601529083019088016133ac565b8a0184019650505b509398975050505050505050565b6000826133ec576133ec6132ad565b500690565b60008084546133ff8161322d565b60018281168015613417576001811461342857613457565b60ff19841687528287019450613457565b8860005260208060002060005b8581101561344e5781548a820152908401908201613435565b50505082870194505b50505050835161346b818360208801612cea565b01949350505050565b600063ffffffff8083168181141561348e5761348e613278565b6001019392505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906134cb90830184612d16565b9695505050505050565b6000602082840312156134e757600080fd5b8151611bc181612cb7565b600060ff821660ff84168060ff0382111561350f5761350f613278565b019392505050565b82815260406020820152600061292d60408301846130e456fea264697066735822122050ba5fd62e86b51ae06724d4ed16622dd97d6fdf3e7f6886f0680d324447bb7b64736f6c63430008090033", + "devdoc": { + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-ownerOf}." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenByIndex(uint256)": { + "details": "See {IERC721Enumerable-tokenByIndex}. This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case." + }, + "tokenOfOwnerByIndex(address,uint256)": { + "details": "See {IERC721Enumerable-tokenOfOwnerByIndex}. This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case." + }, + "tokenURI(uint256)": { + "details": "See {IERC721Metadata-tokenURI}." + }, + "totalSupply()": { + "details": "See {IERC721Enumerable-totalSupply}." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC721-transferFrom}." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 12930, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_currentIndex", + "offset": 0, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 12932, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_burnCounter", + "offset": 16, + "slot": "0", + "type": "t_uint128" + }, + { + "astId": 12934, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_name", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 12936, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_symbol", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 12941, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_ownerships", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_struct(TokenOwnership)12921_storage)" + }, + { + "astId": 12946, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_addressData", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_struct(AddressData)12928_storage)" + }, + { + "astId": 12950, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_tokenApprovals", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 12956, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_operatorApprovals", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 8391, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_owner", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 16689, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "royalties", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint256,t_array(t_struct(Part)16632_storage)dyn_storage)" + }, + { + "astId": 15555, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "salt", + "offset": 0, + "slot": "9", + "type": "t_bytes32" + }, + { + "astId": 15557, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "maxMiniTokens", + "offset": 0, + "slot": "10", + "type": "t_uint256" + }, + { + "astId": 15559, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "mintPrice", + "offset": 0, + "slot": "11", + "type": "t_uint256" + }, + { + "astId": 15561, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "maxPerMint", + "offset": 0, + "slot": "12", + "type": "t_uint256" + }, + { + "astId": 15563, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "startIndex", + "offset": 0, + "slot": "13", + "type": "t_uint256" + }, + { + "astId": 15566, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "provenanceHash", + "offset": 0, + "slot": "14", + "type": "t_string_storage" + }, + { + "astId": 15568, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "offsetValue", + "offset": 0, + "slot": "15", + "type": "t_uint256" + }, + { + "astId": 15570, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "metadataFrozen", + "offset": 0, + "slot": "16", + "type": "t_bool" + }, + { + "astId": 15572, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "provenanceFrozen", + "offset": 1, + "slot": "16", + "type": "t_bool" + }, + { + "astId": 15574, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "saleIsActive", + "offset": 2, + "slot": "16", + "type": "t_bool" + }, + { + "astId": 15576, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "saleStarted", + "offset": 3, + "slot": "16", + "type": "t_bool" + }, + { + "astId": 15580, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "metadataUris", + "offset": 0, + "slot": "17", + "type": "t_mapping(t_uint256,t_string_storage)" + }, + { + "astId": 15582, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "_contractUri", + "offset": 0, + "slot": "18", + "type": "t_string_storage" + }, + { + "astId": 15584, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "temporaryTokenUri", + "offset": 0, + "slot": "19", + "type": "t_string_storage" + }, + { + "astId": 15586, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "baseUri", + "offset": 0, + "slot": "20", + "type": "t_string_storage" + }, + { + "astId": 15588, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "revenueAccount", + "offset": 0, + "slot": "21", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_address_payable": { + "encoding": "inplace", + "label": "address payable", + "numberOfBytes": "20" + }, + "t_array(t_struct(Part)16632_storage)dyn_storage": { + "base": "t_struct(Part)16632_storage", + "encoding": "dynamic_array", + "label": "struct LibPart.Part[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_struct(AddressData)12928_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ERC721M.AddressData)", + "numberOfBytes": "32", + "value": "t_struct(AddressData)12928_storage" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_array(t_struct(Part)16632_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct LibPart.Part[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(Part)16632_storage)dyn_storage" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint256,t_struct(TokenOwnership)12921_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct ERC721M.TokenOwnership)", + "numberOfBytes": "32", + "value": "t_struct(TokenOwnership)12921_storage" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressData)12928_storage": { + "encoding": "inplace", + "label": "struct ERC721M.AddressData", + "members": [ + { + "astId": 12923, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "balance", + "offset": 0, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 12925, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "numberMinted", + "offset": 8, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 12927, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "numberBurned", + "offset": 16, + "slot": "0", + "type": "t_uint64" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Part)16632_storage": { + "encoding": "inplace", + "label": "struct LibPart.Part", + "members": [ + { + "astId": 16629, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "account", + "offset": 0, + "slot": "0", + "type": "t_address_payable" + }, + { + "astId": 16631, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "value", + "offset": 20, + "slot": "0", + "type": "t_uint96" + } + ], + "numberOfBytes": "32" + }, + "t_struct(TokenOwnership)12921_storage": { + "encoding": "inplace", + "label": "struct ERC721M.TokenOwnership", + "members": [ + { + "astId": 12916, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "addr", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 12918, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "startTimestamp", + "offset": 20, + "slot": "0", + "type": "t_uint64" + }, + { + "astId": 12920, + "contract": "contracts/miniNFTs/Mini721.sol:Mini721", + "label": "burned", + "offset": 28, + "slot": "0", + "type": "t_bool" + } + ], + "numberOfBytes": "32" + }, + "t_uint128": { + "encoding": "inplace", + "label": "uint128", + "numberOfBytes": "16" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint96": { + "encoding": "inplace", + "label": "uint96", + "numberOfBytes": "12" + } + } + } +} \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/MiniID.json b/miniwallet/deployments/ethLocal/MiniID.json new file mode 100644 index 0000000..4000002 --- /dev/null +++ b/miniwallet/deployments/ethLocal/MiniID.json @@ -0,0 +1,1181 @@ +{ + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "string", + "name": "uri", + "type": "string" + } + ], + "name": "safeMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "transactionIndex": 0, + "gasUsed": "490552", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000000000000000000000000000000000400008000084000400000000000000000000000000001000000000000000000000000000002000000000000000000000000000000400000000000020000000000000100000800000000000000000000010000001000000000000008000000000000000000008000000000000080000000000000000000000000000000000000000000000400000000000000000000001000000000000000000020000000200000000000040000001000002000000100002000000020000080000000000000000000000000000000000400000000000000000000000000", + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41", + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000009fe46736679d2d9a65f0992f2272de9f3c7fa6e0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 5, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + } + ], + "blockNumber": 4, + "cumulativeGasUsed": "490552", + "status": 1, + "byzantium": true + }, + "args": [ + "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "3f42b7d9d73f23a1948bbe290f0342fd", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployments/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/deployments/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\\\";\\nimport \\\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/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 initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(\\n _IMPLEMENTATION_SLOT ==\\n bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1)\\n );\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation()\\n internal\\n view\\n virtual\\n override\\n returns (address impl)\\n {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xe30c5227e56edd12e96ce4c6dd2f90c10e311a2a15b427f3f69cf6349d263690\",\"license\":\"Apache-2.0\"},\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\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 Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual 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 Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\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(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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 overriden 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 internall 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 overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/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\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n 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 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 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 assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040526040516107b13803806107b183398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b60008051602061076a833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610117838360405180606001604052806027815260200161078a602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061076a83398151915260001b6102cb60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b6102ba806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205fe505fef2a45cf1b87780512f76c7a0d89e24f83aace3a7f881bc132f0a21b864736f6c63430008090033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205fe505fef2a45cf1b87780512f76c7a0d89e24f83aace3a7f881bc132f0a21b864736f6c63430008090033", + "execute": { + "methodName": "initialize", + "args": [] + }, + "implementation": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/MiniID_Implementation.json b/miniwallet/deployments/ethLocal/MiniID_Implementation.json new file mode 100644 index 0000000..625c66f --- /dev/null +++ b/miniwallet/deployments/ethLocal/MiniID_Implementation.json @@ -0,0 +1,1688 @@ +{ + "address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "fromDelegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "toDelegate", + "type": "address" + } + ], + "name": "DelegateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "previousBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + } + ], + "name": "DelegateVotesChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MINTER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PAUSER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegatee", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "delegateBySig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "delegates", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getPastVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getVotes", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "string", + "name": "uri", + "type": "string" + } + ], + "name": "safeMint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "tokenOfOwnerByIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0x8aba5482bac625855a463142db701455a8d09f094d75bd742633372cd535c7b5", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + "transactionIndex": 0, + "gasUsed": "3595349", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000", + "blockHash": "0xc61f65851e16aa3d3075c317ee3da4d1674b3bd0d25677f608b56099f70e8ca7", + "transactionHash": "0x8aba5482bac625855a463142db701455a8d09f094d75bd742633372cd535c7b5", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 3, + "transactionHash": "0x8aba5482bac625855a463142db701455a8d09f094d75bd742633372cd535c7b5", + "address": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000ff", + "logIndex": 0, + "blockHash": "0xc61f65851e16aa3d3075c317ee3da4d1674b3bd0d25677f608b56099f70e8ca7" + } + ], + "blockNumber": 3, + "cumulativeGasUsed": "3595349", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "eb67976a27a158fcc5c575ed68d95e39", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fromDelegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"toDelegate\",\"type\":\"address\"}],\"name\":\"DelegateChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"DelegateVotesChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expiry\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"delegateBySig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"delegates\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"getPastVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getVotes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"tokenOfOwnerByIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"custom:security-contact\":\"john@johnwhitton.com\",\"kind\":\"dev\",\"methods\":{\"DOMAIN_SEPARATOR()\":{\"details\":\"Returns the contract's {EIP712} domain separator.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"burn(uint256)\":{\"details\":\"Burns `tokenId`. See {ERC721-_burn}. Requirements: - The caller must own `tokenId` or be an approved operator.\"},\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"delegate(address)\":{\"details\":\"Delegates votes from the sender to `delegatee`.\"},\"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)\":{\"details\":\"Delegates votes from signer to `delegatee`.\"},\"delegates(address)\":{\"details\":\"Returns the delegate that `account` has chosen.\"},\"getApproved(uint256)\":{\"details\":\"See {IERC721-getApproved}.\"},\"getPastTotalSupply(uint256)\":{\"details\":\"Returns the total supply of votes available at the end of a past block (`blockNumber`). NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. Votes that have not been delegated are still part of total supply, even though they would not participate in a vote. Requirements: - `blockNumber` must have been already mined\"},\"getPastVotes(address,uint256)\":{\"details\":\"Returns the amount of votes that `account` had at the end of a past block (`blockNumber`). Requirements: - `blockNumber` must have been already mined\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getVotes(address)\":{\"details\":\"Returns the current amount of votes that `account` has.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC721-isApprovedForAll}.\"},\"name()\":{\"details\":\"See {IERC721Metadata-name}.\"},\"nonces(address)\":{\"details\":\"Returns an address nonce.\"},\"ownerOf(uint256)\":{\"details\":\"See {IERC721-ownerOf}.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate that the this implementation remains valid after an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"safeTransferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,bytes)\":{\"details\":\"See {IERC721-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenByIndex(uint256)\":{\"details\":\"See {IERC721Enumerable-tokenByIndex}.\"},\"tokenOfOwnerByIndex(address,uint256)\":{\"details\":\"See {IERC721Enumerable-tokenOfOwnerByIndex}.\"},\"totalSupply()\":{\"details\":\"See {IERC721Enumerable-totalSupply}.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC721-transferFrom}.\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/miniID/MiniID.sol\":\"MiniID\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\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\",\"keccak256\":\"0x2ea9f206854c98b67dd228f8cad22bfe90ba7b1c2295315672f2e1e244623fc3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (governance/utils/IVotes.sol)\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.\\n *\\n * _Available since v4.5._\\n */\\ninterface IVotesUpgradeable {\\n /**\\n * @dev Emitted when an account changes their delegate.\\n */\\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\\n\\n /**\\n * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.\\n */\\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\\n\\n /**\\n * @dev Returns the current amount of votes that `account` has.\\n */\\n function getVotes(address account) external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).\\n */\\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\\n\\n /**\\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\\n *\\n * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.\\n * Votes that have not been delegated are still part of total supply, even though they would not participate in a\\n * vote.\\n */\\n function getPastTotalSupply(uint256 blockNumber) external view returns (uint256);\\n\\n /**\\n * @dev Returns the delegate that `account` has chosen.\\n */\\n function delegates(address account) external view returns (address);\\n\\n /**\\n * @dev Delegates votes from the sender to `delegatee`.\\n */\\n function delegate(address delegatee) external;\\n\\n /**\\n * @dev Delegates votes from signer to `delegatee`.\\n */\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n}\\n\",\"keccak256\":\"0xe8e2d2f70db1913260634f710cc057d669b06eccf4dca27e18b79c3bbb101da6\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/governance/utils/VotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (governance/utils/Votes.sol)\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../utils/CountersUpgradeable.sol\\\";\\nimport \\\"../../utils/CheckpointsUpgradeable.sol\\\";\\nimport \\\"../../utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"./IVotesUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be\\n * transferred, and provides a system of vote delegation, where an account can delegate its voting units to a sort of\\n * \\\"representative\\\" that will pool delegated voting units from different accounts and can then use it to vote in\\n * decisions. In fact, voting units _must_ be delegated in order to count as actual votes, and an account has to\\n * delegate those votes to itself if it wishes to participate in decisions and does not have a trusted representative.\\n *\\n * This contract is often combined with a token contract such that voting units correspond to token units. For an\\n * example, see {ERC721Votes}.\\n *\\n * The full history of delegate votes is tracked on-chain so that governance protocols can consider votes as distributed\\n * at a particular block number to protect against flash loans and double voting. The opt-in delegate system makes the\\n * cost of this history tracking optional.\\n *\\n * When using this module the derived contract must implement {_getVotingUnits} (for example, make it return\\n * {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the\\n * previous example, it would be included in {ERC721-_beforeTokenTransfer}).\\n *\\n * _Available since v4.5._\\n */\\nabstract contract VotesUpgradeable is Initializable, IVotesUpgradeable, ContextUpgradeable, EIP712Upgradeable {\\n function __Votes_init() internal onlyInitializing {\\n }\\n\\n function __Votes_init_unchained() internal onlyInitializing {\\n }\\n using CheckpointsUpgradeable for CheckpointsUpgradeable.History;\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n bytes32 private constant _DELEGATION_TYPEHASH =\\n keccak256(\\\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\\\");\\n\\n mapping(address => address) private _delegation;\\n mapping(address => CheckpointsUpgradeable.History) private _delegateCheckpoints;\\n CheckpointsUpgradeable.History private _totalCheckpoints;\\n\\n mapping(address => CountersUpgradeable.Counter) private _nonces;\\n\\n /**\\n * @dev Returns the current amount of votes that `account` has.\\n */\\n function getVotes(address account) public view virtual override returns (uint256) {\\n return _delegateCheckpoints[account].latest();\\n }\\n\\n /**\\n * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\\n return _delegateCheckpoints[account].getAtBlock(blockNumber);\\n }\\n\\n /**\\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\\n *\\n * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.\\n * Votes that have not been delegated are still part of total supply, even though they would not participate in a\\n * vote.\\n *\\n * Requirements:\\n *\\n * - `blockNumber` must have been already mined\\n */\\n function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {\\n require(blockNumber < block.number, \\\"Votes: block not yet mined\\\");\\n return _totalCheckpoints.getAtBlock(blockNumber);\\n }\\n\\n /**\\n * @dev Returns the current total supply of votes.\\n */\\n function _getTotalSupply() internal view virtual returns (uint256) {\\n return _totalCheckpoints.latest();\\n }\\n\\n /**\\n * @dev Returns the delegate that `account` has chosen.\\n */\\n function delegates(address account) public view virtual override returns (address) {\\n return _delegation[account];\\n }\\n\\n /**\\n * @dev Delegates votes from the sender to `delegatee`.\\n */\\n function delegate(address delegatee) public virtual override {\\n address account = _msgSender();\\n _delegate(account, delegatee);\\n }\\n\\n /**\\n * @dev Delegates votes from signer to `delegatee`.\\n */\\n function delegateBySig(\\n address delegatee,\\n uint256 nonce,\\n uint256 expiry,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual override {\\n require(block.timestamp <= expiry, \\\"Votes: signature expired\\\");\\n address signer = ECDSAUpgradeable.recover(\\n _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\\n v,\\n r,\\n s\\n );\\n require(nonce == _useNonce(signer), \\\"Votes: invalid nonce\\\");\\n _delegate(signer, delegatee);\\n }\\n\\n /**\\n * @dev Delegate all of `account`'s voting units to `delegatee`.\\n *\\n * Emits events {DelegateChanged} and {DelegateVotesChanged}.\\n */\\n function _delegate(address account, address delegatee) internal virtual {\\n address oldDelegate = delegates(account);\\n _delegation[account] = delegatee;\\n\\n emit DelegateChanged(account, oldDelegate, delegatee);\\n _moveDelegateVotes(oldDelegate, delegatee, _getVotingUnits(account));\\n }\\n\\n /**\\n * @dev Transfers, mints, or burns voting units. To register a mint, `from` should be zero. To register a burn, `to`\\n * should be zero. Total supply of voting units will be adjusted with mints and burns.\\n */\\n function _transferVotingUnits(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n if (from == address(0)) {\\n _totalCheckpoints.push(_add, amount);\\n }\\n if (to == address(0)) {\\n _totalCheckpoints.push(_subtract, amount);\\n }\\n _moveDelegateVotes(delegates(from), delegates(to), amount);\\n }\\n\\n /**\\n * @dev Moves delegated votes from one delegate to another.\\n */\\n function _moveDelegateVotes(\\n address from,\\n address to,\\n uint256 amount\\n ) private {\\n if (from != to && amount > 0) {\\n if (from != address(0)) {\\n (uint256 oldValue, uint256 newValue) = _delegateCheckpoints[from].push(_subtract, amount);\\n emit DelegateVotesChanged(from, oldValue, newValue);\\n }\\n if (to != address(0)) {\\n (uint256 oldValue, uint256 newValue) = _delegateCheckpoints[to].push(_add, amount);\\n emit DelegateVotesChanged(to, oldValue, newValue);\\n }\\n }\\n }\\n\\n function _add(uint256 a, uint256 b) private pure returns (uint256) {\\n return a + b;\\n }\\n\\n function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Consumes a nonce.\\n *\\n * Returns the current value and increments nonce.\\n */\\n function _useNonce(address owner) internal virtual returns (uint256 current) {\\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\\n current = nonce.current();\\n nonce.increment();\\n }\\n\\n /**\\n * @dev Returns an address nonce.\\n */\\n function nonces(address owner) public view virtual returns (uint256) {\\n return _nonces[owner].current();\\n }\\n\\n /**\\n * @dev Returns the contract's {EIP712} domain separator.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32) {\\n return _domainSeparatorV4();\\n }\\n\\n /**\\n * @dev Must return the voting units held by an account.\\n */\\n function _getVotingUnits(address) internal view virtual returns (uint256);\\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[46] private __gap;\\n}\\n\",\"keccak256\":\"0x8d623fa821514273903a9b6a332b194b9a8374dccc1295cf9ccf882c9c9ba4ba\",\"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.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.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 *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\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 Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\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(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (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 Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\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 Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\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(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\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\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"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.7.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 * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\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. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 that the this implementation remains valid after 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 function upgradeTo(address newImplementation) external 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 function upgradeToAndCall(address newImplementation, bytes memory data) external 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\":\"0x6e36e9b4b71de699c2f3f0d4e4d1aa0b35da99a26e8d5b91ef09ba234b4ef270\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721Upgradeable.sol\\\";\\nimport \\\"./IERC721ReceiverUpgradeable.sol\\\";\\nimport \\\"./extensions/IERC721MetadataUpgradeable.sol\\\";\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\nimport \\\"../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {\\n using AddressUpgradeable for address;\\n using StringsUpgradeable for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\\n __ERC721_init_unchained(name_, symbol_);\\n }\\n\\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\\n return\\n interfaceId == type(IERC721Upgradeable).interfaceId ||\\n interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _owners[tokenId];\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721Upgradeable.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _owners[tokenId] != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721Upgradeable.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721Upgradeable.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n _balances[owner] -= 1;\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual {\\n require(ERC721Upgradeable.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) 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[44] private __gap;\\n}\\n\",\"keccak256\":\"0x5331c8909221d9f9f3851cfadd5959d0873413a2c27e30e0f2fa234158c1c6cf\",\"license\":\"MIT\"},\"@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\",\"keccak256\":\"0xbb2ed8106d94aeae6858e2551a1e7174df73994b77b13ebd120ccaaef80155f5\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165Upgradeable.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721Upgradeable is IERC165Upgradeable {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x016298e66a5810253c6c905e61966bb31c8775c3f3517bf946ff56ee31d6c005\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721Burnable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721Upgradeable.sol\\\";\\nimport \\\"../../../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @title ERC721 Burnable Token\\n * @dev ERC721 Token that can be burned (destroyed).\\n */\\nabstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable {\\n function __ERC721Burnable_init() internal onlyInitializing {\\n }\\n\\n function __ERC721Burnable_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev Burns `tokenId`. See {ERC721-_burn}.\\n *\\n * Requirements:\\n *\\n * - The caller must own `tokenId` or be an approved operator.\\n */\\n function burn(uint256 tokenId) public virtual {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner nor approved\\\");\\n _burn(tokenId);\\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\":\"0xa7dbff7171ac06a023a5ca52c2138ac711037b2146b9197a52e5de4f9183e04d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721Upgradeable.sol\\\";\\nimport \\\"./IERC721EnumerableUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\\n * enumerability of all the token ids in the contract as well as all token ids owned by each\\n * account.\\n */\\nabstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {\\n function __ERC721Enumerable_init() internal onlyInitializing {\\n }\\n\\n function __ERC721Enumerable_init_unchained() internal onlyInitializing {\\n }\\n // Mapping from owner to list of owned token IDs\\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\\n\\n // Mapping from token ID to index of the owner tokens list\\n mapping(uint256 => uint256) private _ownedTokensIndex;\\n\\n // Array with all token ids, used for enumeration\\n uint256[] private _allTokens;\\n\\n // Mapping from token id to position in the allTokens array\\n mapping(uint256 => uint256) private _allTokensIndex;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) {\\n return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\\n require(index < ERC721Upgradeable.balanceOf(owner), \\\"ERC721Enumerable: owner index out of bounds\\\");\\n return _ownedTokens[owner][index];\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _allTokens.length;\\n }\\n\\n /**\\n * @dev See {IERC721Enumerable-tokenByIndex}.\\n */\\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\\n require(index < ERC721EnumerableUpgradeable.totalSupply(), \\\"ERC721Enumerable: global index out of bounds\\\");\\n return _allTokens[index];\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n super._beforeTokenTransfer(from, to, tokenId);\\n\\n if (from == address(0)) {\\n _addTokenToAllTokensEnumeration(tokenId);\\n } else if (from != to) {\\n _removeTokenFromOwnerEnumeration(from, tokenId);\\n }\\n if (to == address(0)) {\\n _removeTokenFromAllTokensEnumeration(tokenId);\\n } else if (to != from) {\\n _addTokenToOwnerEnumeration(to, tokenId);\\n }\\n }\\n\\n /**\\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\\n * @param to address representing the new owner of the given token ID\\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\\n */\\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\\n uint256 length = ERC721Upgradeable.balanceOf(to);\\n _ownedTokens[to][length] = tokenId;\\n _ownedTokensIndex[tokenId] = length;\\n }\\n\\n /**\\n * @dev Private function to add a token to this extension's token tracking data structures.\\n * @param tokenId uint256 ID of the token to be added to the tokens list\\n */\\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\\n _allTokensIndex[tokenId] = _allTokens.length;\\n _allTokens.push(tokenId);\\n }\\n\\n /**\\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\\n * @param from address representing the previous owner of the given token ID\\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\\n */\\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\\n // then delete the last slot (swap and pop).\\n\\n uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;\\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\\n\\n // When the token to delete is the last token, the swap operation is unnecessary\\n if (tokenIndex != lastTokenIndex) {\\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\\n\\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\\n }\\n\\n // This also deletes the contents at the last position of the array\\n delete _ownedTokensIndex[tokenId];\\n delete _ownedTokens[from][lastTokenIndex];\\n }\\n\\n /**\\n * @dev Private function to remove a token from this extension's token tracking data structures.\\n * This has O(1) time complexity, but alters the order of the _allTokens array.\\n * @param tokenId uint256 ID of the token to be removed from the tokens list\\n */\\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\\n // then delete the last slot (swap and pop).\\n\\n uint256 lastTokenIndex = _allTokens.length - 1;\\n uint256 tokenIndex = _allTokensIndex[tokenId];\\n\\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\\n uint256 lastTokenId = _allTokens[lastTokenIndex];\\n\\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\\n\\n // This also deletes the contents at the last position of the array\\n delete _allTokensIndex[tokenId];\\n _allTokens.pop();\\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[46] private __gap;\\n}\\n\",\"keccak256\":\"0x56035505d62f05f5e5040532b749ab25237f6dd87c7a514614acda96af996751\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721Upgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev ERC721 token with storage based token URI management.\\n */\\nabstract contract ERC721URIStorageUpgradeable is Initializable, ERC721Upgradeable {\\n function __ERC721URIStorage_init() internal onlyInitializing {\\n }\\n\\n function __ERC721URIStorage_init_unchained() internal onlyInitializing {\\n }\\n using StringsUpgradeable for uint256;\\n\\n // Optional mapping for token URIs\\n mapping(uint256 => string) private _tokenURIs;\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory _tokenURI = _tokenURIs[tokenId];\\n string memory base = _baseURI();\\n\\n // If there is no base URI, return the token URI.\\n if (bytes(base).length == 0) {\\n return _tokenURI;\\n }\\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\\n if (bytes(_tokenURI).length > 0) {\\n return string(abi.encodePacked(base, _tokenURI));\\n }\\n\\n return super.tokenURI(tokenId);\\n }\\n\\n /**\\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\\n require(_exists(tokenId), \\\"ERC721URIStorage: URI set of nonexistent token\\\");\\n _tokenURIs[tokenId] = _tokenURI;\\n }\\n\\n /**\\n * @dev See {ERC721-_burn}. This override additionally checks to see if a\\n * token-specific URI was set for the token, and if so, it deletes the token URI from\\n * the storage mapping.\\n */\\n function _burn(uint256 tokenId) internal virtual override {\\n super._burn(tokenId);\\n\\n if (bytes(_tokenURIs[tokenId]).length != 0) {\\n delete _tokenURIs[tokenId];\\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[49] private __gap;\\n}\\n\",\"keccak256\":\"0xbd5c6f8268a1d477f6a746ebedaf7fbcf412186f0c1c54ee104547cfb5e18edd\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721Upgradeable.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721EnumerableUpgradeable is IERC721Upgradeable {\\n /**\\n * @dev Returns the total amount of tokens stored by the contract.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\\n */\\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\\n\\n /**\\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\\n * Use along with {totalSupply} to enumerate all tokens.\\n */\\n function tokenByIndex(uint256 index) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xf1870306db8391db9cf14b41be0da76857a88df0e5c623d2b2338fb30a3bd5ff\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721Upgradeable.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721MetadataUpgradeable is IERC721Upgradeable {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x95a471796eb5f030fdc438660bebec121ad5d063763e64d92376ffb4b5ce8b70\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/extensions/draft-ERC721Votes.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC721Upgradeable.sol\\\";\\nimport \\\"../../../governance/utils/VotesUpgradeable.sol\\\";\\nimport \\\"../../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of ERC721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts\\n * as 1 vote unit.\\n *\\n * Tokens do not count as votes until they are delegated, because votes must be tracked which incurs an additional cost\\n * on every transfer. Token holders can either delegate to a trusted representative who will decide how to make use of\\n * the votes in governance decisions, or they can delegate to themselves to be their own representative.\\n *\\n * _Available since v4.5._\\n */\\nabstract contract ERC721VotesUpgradeable is Initializable, ERC721Upgradeable, VotesUpgradeable {\\n function __ERC721Votes_init() internal onlyInitializing {\\n }\\n\\n function __ERC721Votes_init_unchained() internal onlyInitializing {\\n }\\n /**\\n * @dev Adjusts votes when tokens are transferred.\\n *\\n * Emits a {Votes-DelegateVotesChanged} event.\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual override {\\n _transferVotingUnits(from, to, 1);\\n super._afterTokenTransfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Returns the balance of `account`.\\n */\\n function _getVotingUnits(address account) internal view virtual override returns (uint256) {\\n return balanceOf(account);\\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\":\"0x1a7ecaa78a88a0aa6c44d41925398f382eb2d4d4ad184eeaca7b85a4755038b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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 *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/CheckpointsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Checkpoints.sol)\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/MathUpgradeable.sol\\\";\\nimport \\\"./math/SafeCastUpgradeable.sol\\\";\\n\\n/**\\n * @dev This library defines the `History` struct, for checkpointing values as they change at different points in\\n * time, and later looking up past values by block number. See {Votes} as an example.\\n *\\n * To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new\\n * checkpoint for the current transaction block using the {push} function.\\n *\\n * _Available since v4.5._\\n */\\nlibrary CheckpointsUpgradeable {\\n struct Checkpoint {\\n uint32 _blockNumber;\\n uint224 _value;\\n }\\n\\n struct History {\\n Checkpoint[] _checkpoints;\\n }\\n\\n /**\\n * @dev Returns the value in the latest checkpoint, or zero if there are no checkpoints.\\n */\\n function latest(History storage self) internal view returns (uint256) {\\n uint256 pos = self._checkpoints.length;\\n return pos == 0 ? 0 : self._checkpoints[pos - 1]._value;\\n }\\n\\n /**\\n * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one\\n * before it is returned, or zero otherwise.\\n */\\n function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) {\\n require(blockNumber < block.number, \\\"Checkpoints: block not yet mined\\\");\\n\\n uint256 high = self._checkpoints.length;\\n uint256 low = 0;\\n while (low < high) {\\n uint256 mid = MathUpgradeable.average(low, high);\\n if (self._checkpoints[mid]._blockNumber > blockNumber) {\\n high = mid;\\n } else {\\n low = mid + 1;\\n }\\n }\\n return high == 0 ? 0 : self._checkpoints[high - 1]._value;\\n }\\n\\n /**\\n * @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block.\\n *\\n * Returns previous value and new value.\\n */\\n function push(History storage self, uint256 value) internal returns (uint256, uint256) {\\n uint256 pos = self._checkpoints.length;\\n uint256 old = latest(self);\\n if (pos > 0 && self._checkpoints[pos - 1]._blockNumber == block.number) {\\n self._checkpoints[pos - 1]._value = SafeCastUpgradeable.toUint224(value);\\n } else {\\n self._checkpoints.push(\\n Checkpoint({_blockNumber: SafeCastUpgradeable.toUint32(block.number), _value: SafeCastUpgradeable.toUint224(value)})\\n );\\n }\\n return (old, value);\\n }\\n\\n /**\\n * @dev Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will\\n * be set to `op(latest, delta)`.\\n *\\n * Returns previous value and new value.\\n */\\n function push(\\n History storage self,\\n function(uint256, uint256) view returns (uint256) op,\\n uint256 delta\\n ) internal returns (uint256, uint256) {\\n return push(self, op(latest(self), delta));\\n }\\n}\\n\",\"keccak256\":\"0x7fb4716864bc9693785f07ce15f325a44413ad5d2d5685852a9e6112927abd60\",\"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/CountersUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Counters\\n * @author Matt Condon (@shrugs)\\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\\n *\\n * Include with `using Counters for Counters.Counter;`\\n */\\nlibrary CountersUpgradeable {\\n struct Counter {\\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\\n // this feature: see https://github.com/ethereum/solidity/issues/4637\\n uint256 _value; // default: 0\\n }\\n\\n function current(Counter storage counter) internal view returns (uint256) {\\n return counter._value;\\n }\\n\\n function increment(Counter storage counter) internal {\\n unchecked {\\n counter._value += 1;\\n }\\n }\\n\\n function decrement(Counter storage counter) internal {\\n uint256 value = counter._value;\\n require(value > 0, \\\"Counter: decrement overflow\\\");\\n unchecked {\\n counter._value = value - 1;\\n }\\n }\\n\\n function reset(Counter storage counter) internal {\\n counter._value = 0;\\n }\\n}\\n\",\"keccak256\":\"0x798741e231b22b81e2dd2eddaaf8832dee4baf5cd8e2dbaa5c1dd12a1c053c4d\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary 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 /**\\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\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xea5339a7fff0ed42b45be56a88efdd0b2ddde9fa480dc99fef9a6a4c5b776863\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xbf5daf926894541a40a64b43c3746aa1940c5a1b3b8d14a06465eea72a9b90cc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\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\":\"0xaf5a96100f421d61693605349511e43221d3c2e47d4b3efa87af2b936e2567fc\",\"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-upgradeable/utils/math/MathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary MathUpgradeable {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a >= b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. It the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`.\\n // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.\\n // This gives `2**k < a <= 2**(k+1)` \\u2192 `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.\\n // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a\\n // good first aproximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1;\\n uint256 x = a;\\n if (x >> 128 > 0) {\\n x >>= 128;\\n result <<= 64;\\n }\\n if (x >> 64 > 0) {\\n x >>= 64;\\n result <<= 32;\\n }\\n if (x >> 32 > 0) {\\n x >>= 32;\\n result <<= 16;\\n }\\n if (x >> 16 > 0) {\\n x >>= 16;\\n result <<= 8;\\n }\\n if (x >> 8 > 0) {\\n x >>= 8;\\n result <<= 4;\\n }\\n if (x >> 4 > 0) {\\n x >>= 4;\\n result <<= 2;\\n }\\n if (x >> 2 > 0) {\\n result <<= 1;\\n }\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = sqrt(a);\\n if (rounding == Rounding.Up && result * result < a) {\\n result += 1;\\n }\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x3b39e1a87bb94b9145d91007bbd2c964438e99a659b4accc6ec6df6a1c62589a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCastUpgradeable {\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n require(value <= type(uint248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n require(value <= type(uint240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n require(value <= type(uint232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n require(value <= type(uint216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n require(value <= type(uint208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value <= type(uint200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n require(value <= type(uint192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n require(value <= type(uint184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n require(value <= type(uint176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n require(value <= type(uint168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n require(value <= type(uint160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n require(value <= type(uint152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n require(value <= type(uint144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n require(value <= type(uint136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n require(value <= type(uint120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n require(value <= type(uint112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n require(value <= type(uint104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.2._\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n require(value <= type(uint88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n require(value <= type(uint80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n require(value <= type(uint72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n require(value <= type(uint56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n require(value <= type(uint48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value <= type(uint40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n require(value <= type(uint24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v2.5._\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n *\\n * _Available since v3.0._\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt248(int256 value) internal pure returns (int248) {\\n require(value >= type(int248).min && value <= type(int248).max, \\\"SafeCast: value doesn't fit in 248 bits\\\");\\n return int248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt240(int256 value) internal pure returns (int240) {\\n require(value >= type(int240).min && value <= type(int240).max, \\\"SafeCast: value doesn't fit in 240 bits\\\");\\n return int240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt232(int256 value) internal pure returns (int232) {\\n require(value >= type(int232).min && value <= type(int232).max, \\\"SafeCast: value doesn't fit in 232 bits\\\");\\n return int232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt224(int256 value) internal pure returns (int224) {\\n require(value >= type(int224).min && value <= type(int224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return int224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt216(int256 value) internal pure returns (int216) {\\n require(value >= type(int216).min && value <= type(int216).max, \\\"SafeCast: value doesn't fit in 216 bits\\\");\\n return int216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt208(int256 value) internal pure returns (int208) {\\n require(value >= type(int208).min && value <= type(int208).max, \\\"SafeCast: value doesn't fit in 208 bits\\\");\\n return int208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt200(int256 value) internal pure returns (int200) {\\n require(value >= type(int200).min && value <= type(int200).max, \\\"SafeCast: value doesn't fit in 200 bits\\\");\\n return int200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt192(int256 value) internal pure returns (int192) {\\n require(value >= type(int192).min && value <= type(int192).max, \\\"SafeCast: value doesn't fit in 192 bits\\\");\\n return int192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt184(int256 value) internal pure returns (int184) {\\n require(value >= type(int184).min && value <= type(int184).max, \\\"SafeCast: value doesn't fit in 184 bits\\\");\\n return int184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt176(int256 value) internal pure returns (int176) {\\n require(value >= type(int176).min && value <= type(int176).max, \\\"SafeCast: value doesn't fit in 176 bits\\\");\\n return int176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt168(int256 value) internal pure returns (int168) {\\n require(value >= type(int168).min && value <= type(int168).max, \\\"SafeCast: value doesn't fit in 168 bits\\\");\\n return int168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt160(int256 value) internal pure returns (int160) {\\n require(value >= type(int160).min && value <= type(int160).max, \\\"SafeCast: value doesn't fit in 160 bits\\\");\\n return int160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt152(int256 value) internal pure returns (int152) {\\n require(value >= type(int152).min && value <= type(int152).max, \\\"SafeCast: value doesn't fit in 152 bits\\\");\\n return int152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt144(int256 value) internal pure returns (int144) {\\n require(value >= type(int144).min && value <= type(int144).max, \\\"SafeCast: value doesn't fit in 144 bits\\\");\\n return int144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt136(int256 value) internal pure returns (int136) {\\n require(value >= type(int136).min && value <= type(int136).max, \\\"SafeCast: value doesn't fit in 136 bits\\\");\\n return int136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt120(int256 value) internal pure returns (int120) {\\n require(value >= type(int120).min && value <= type(int120).max, \\\"SafeCast: value doesn't fit in 120 bits\\\");\\n return int120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt112(int256 value) internal pure returns (int112) {\\n require(value >= type(int112).min && value <= type(int112).max, \\\"SafeCast: value doesn't fit in 112 bits\\\");\\n return int112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt104(int256 value) internal pure returns (int104) {\\n require(value >= type(int104).min && value <= type(int104).max, \\\"SafeCast: value doesn't fit in 104 bits\\\");\\n return int104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt96(int256 value) internal pure returns (int96) {\\n require(value >= type(int96).min && value <= type(int96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return int96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt88(int256 value) internal pure returns (int88) {\\n require(value >= type(int88).min && value <= type(int88).max, \\\"SafeCast: value doesn't fit in 88 bits\\\");\\n return int88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt80(int256 value) internal pure returns (int80) {\\n require(value >= type(int80).min && value <= type(int80).max, \\\"SafeCast: value doesn't fit in 80 bits\\\");\\n return int80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt72(int256 value) internal pure returns (int72) {\\n require(value >= type(int72).min && value <= type(int72).max, \\\"SafeCast: value doesn't fit in 72 bits\\\");\\n return int72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt56(int256 value) internal pure returns (int56) {\\n require(value >= type(int56).min && value <= type(int56).max, \\\"SafeCast: value doesn't fit in 56 bits\\\");\\n return int56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt48(int256 value) internal pure returns (int48) {\\n require(value >= type(int48).min && value <= type(int48).max, \\\"SafeCast: value doesn't fit in 48 bits\\\");\\n return int48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt40(int256 value) internal pure returns (int40) {\\n require(value >= type(int40).min && value <= type(int40).max, \\\"SafeCast: value doesn't fit in 40 bits\\\");\\n return int40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n *\\n * _Available since v4.7._\\n */\\n function toInt24(int256 value) internal pure returns (int24) {\\n require(value >= type(int24).min && value <= type(int24).max, \\\"SafeCast: value doesn't fit in 24 bits\\\");\\n return int24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n *\\n * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n *\\n * _Available since v3.0._\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0xd7ebe0f80affaa622b9efd95cc8db3e03e70d699176f7457b4a95e34a11f9834\",\"license\":\"MIT\"},\"contracts/miniID/MiniID.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\\\";\\n\\n/// @custom:security-contact john@johnwhitton.com\\ncontract MiniID is\\n Initializable,\\n ERC721Upgradeable,\\n ERC721EnumerableUpgradeable,\\n ERC721URIStorageUpgradeable,\\n PausableUpgradeable,\\n AccessControlUpgradeable,\\n ERC721BurnableUpgradeable,\\n EIP712Upgradeable,\\n ERC721VotesUpgradeable,\\n UUPSUpgradeable\\n{\\n using CountersUpgradeable for CountersUpgradeable.Counter;\\n\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n CountersUpgradeable.Counter private _tokenIdCounter;\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor() {\\n _disableInitializers();\\n }\\n\\n function initialize() public initializer {\\n address owner = msg.sender;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n owner\\n )\\n }\\n\\n __ERC721_init(\\\"MiniID\\\", \\\"MID\\\");\\n __ERC721Enumerable_init();\\n __ERC721URIStorage_init();\\n __Pausable_init();\\n __AccessControl_init();\\n __ERC721Burnable_init();\\n __EIP712_init(\\\"MiniID\\\", \\\"1\\\");\\n __ERC721Votes_init();\\n __UUPSUpgradeable_init();\\n\\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _grantRole(PAUSER_ROLE, msg.sender);\\n _grantRole(MINTER_ROLE, msg.sender);\\n _grantRole(UPGRADER_ROLE, msg.sender);\\n }\\n\\n function _baseURI() internal pure override returns (string memory) {\\n return \\\"ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/MiniID/\\\";\\n }\\n\\n function pause() public onlyRole(PAUSER_ROLE) {\\n _pause();\\n }\\n\\n function unpause() public onlyRole(PAUSER_ROLE) {\\n _unpause();\\n }\\n\\n function safeMint(address to, string memory uri)\\n public\\n onlyRole(MINTER_ROLE)\\n {\\n uint256 tokenId = _tokenIdCounter.current();\\n _tokenIdCounter.increment();\\n _safeMint(to, tokenId);\\n _setTokenURI(tokenId, uri);\\n }\\n\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n )\\n internal\\n override(ERC721Upgradeable, ERC721EnumerableUpgradeable)\\n whenNotPaused\\n {\\n super._beforeTokenTransfer(from, to, tokenId);\\n }\\n\\n function _authorizeUpgrade(address newImplementation)\\n internal\\n override\\n onlyRole(UPGRADER_ROLE)\\n {}\\n\\n // The following functions are overrides required by Solidity.\\n\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal override(ERC721Upgradeable, ERC721VotesUpgradeable) {\\n super._afterTokenTransfer(from, to, tokenId);\\n }\\n\\n function _burn(uint256 tokenId)\\n internal\\n override(ERC721Upgradeable, ERC721URIStorageUpgradeable)\\n {\\n super._burn(tokenId);\\n }\\n\\n function tokenURI(uint256 tokenId)\\n public\\n view\\n override(ERC721Upgradeable, ERC721URIStorageUpgradeable)\\n returns (string memory)\\n {\\n return super.tokenURI(tokenId);\\n }\\n\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n override(\\n ERC721Upgradeable,\\n ERC721EnumerableUpgradeable,\\n AccessControlUpgradeable\\n )\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n}\\n\",\"keccak256\":\"0x9eb9b380116bc25c0f33288faa1a52fe887e8fc29cdc679f9c19c65923e25f3c\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e8565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e6576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051613f9d6200012060003960008181610b4d01528181610b8d01528181610cc001528181610d000152610e220152613f9d6000f3fe6080604052600436106102515760003560e01c80635c975abb11610139578063a217fddf116100b6578063d204c45e1161007a578063d204c45e146106cf578063d5391393146106ef578063d547741f14610723578063e63ab1e914610743578063e985e9c514610765578063f72c0d8b146107ae57600080fd5b8063a217fddf1461063a578063a22cb4651461064f578063b88d4fde1461066f578063c3cda5201461068f578063c87b56dd146106af57600080fd5b80638456cb59116100fd5780638456cb59146105b05780638e539e8c146105c557806391d14854146105e557806395d89b41146106055780639ab24eb01461061a57600080fd5b80635c975abb146105235780636352211e1461053b57806370a082311461055b5780637ecebe001461057b5780638129fc1c1461059b57600080fd5b806336568abe116101d257806342966c681161019657806342966c68146104615780634f1ef286146104815780634f6ccce71461049457806352d1902d146104b4578063587cde1e146104c95780635c19a95c1461050357600080fd5b806336568abe146103cc5780633659cfe6146103ec5780633a46b1a81461040c5780633f4ba83a1461042c57806342842e0e1461044157600080fd5b806323b872dd1161021957806323b872dd14610326578063248a9ca3146103465780632f2ff15d146103775780632f745c59146103975780633644e515146103b757600080fd5b806301ffc9a71461025657806306fdde031461028b578063081812fc146102ad578063095ea7b3146102e557806318160ddd14610307575b600080fd5b34801561026257600080fd5b506102766102713660046136d8565b6107e2565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a06107f3565b604051610282919061374d565b3480156102b957600080fd5b506102cd6102c8366004613760565b610885565b6040516001600160a01b039091168152602001610282565b3480156102f157600080fd5b50610305610300366004613795565b6108ac565b005b34801561031357600080fd5b506099545b604051908152602001610282565b34801561033257600080fd5b506103056103413660046137bf565b6109c7565b34801561035257600080fd5b50610318610361366004613760565b600090815261012d602052604090206001015490565b34801561038357600080fd5b506103056103923660046137fb565b6109f9565b3480156103a357600080fd5b506103186103b2366004613795565b610a1f565b3480156103c357600080fd5b50610318610ab5565b3480156103d857600080fd5b506103056103e73660046137fb565b610ac4565b3480156103f857600080fd5b50610305610407366004613827565b610b42565b34801561041857600080fd5b50610318610427366004613795565b610c22565b34801561043857600080fd5b50610305610c4c565b34801561044d57600080fd5b5061030561045c3660046137bf565b610c6c565b34801561046d57600080fd5b5061030561047c366004613760565b610c87565b61030561048f3660046138ee565b610cb5565b3480156104a057600080fd5b506103186104af366004613760565b610d82565b3480156104c057600080fd5b50610318610e15565b3480156104d557600080fd5b506102cd6104e4366004613827565b6001600160a01b0390811660009081526101c560205260409020541690565b34801561050f57600080fd5b5061030561051e366004613827565b610ec8565b34801561052f57600080fd5b5060fb5460ff16610276565b34801561054757600080fd5b506102cd610556366004613760565b610ed3565b34801561056757600080fd5b50610318610576366004613827565b610f33565b34801561058757600080fd5b50610318610596366004613827565b610fb9565b3480156105a757600080fd5b50610305610fd8565b3480156105bc57600080fd5b5061030561123c565b3480156105d157600080fd5b506103186105e0366004613760565b61125c565b3480156105f157600080fd5b506102766106003660046137fb565b6112b9565b34801561061157600080fd5b506102a06112e5565b34801561062657600080fd5b50610318610635366004613827565b6112f4565b34801561064657600080fd5b50610318600081565b34801561065b57600080fd5b5061030561066a36600461393c565b611316565b34801561067b57600080fd5b5061030561068a366004613978565b611321565b34801561069b57600080fd5b506103056106aa3660046139e0565b611359565b3480156106bb57600080fd5b506102a06106ca366004613760565b611486565b3480156106db57600080fd5b506103056106ea366004613a40565b611491565b3480156106fb57600080fd5b506103187f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561072f57600080fd5b5061030561073e3660046137fb565b6114ec565b34801561074f57600080fd5b50610318600080516020613ee483398151915281565b34801561077157600080fd5b50610276610780366004613a98565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b3480156107ba57600080fd5b506103187f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006107ed82611512565b92915050565b60606065805461080290613ac2565b80601f016020809104026020016040519081016040528092919081815260200182805461082e90613ac2565b801561087b5780601f106108505761010080835404028352916020019161087b565b820191906000526020600020905b81548152906001019060200180831161085e57829003601f168201915b5050505050905090565b600061089082611537565b506000908152606960205260409020546001600160a01b031690565b60006108b782610ed3565b9050806001600160a01b0316836001600160a01b0316141561092a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061094657506109468133610780565b6109b85760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610921565b6109c28383611596565b505050565b6109d2335b82611604565b6109ee5760405162461bcd60e51b815260040161092190613af7565b6109c2838383611683565b600082815261012d6020526040902060010154610a1581611830565b6109c2838361183a565b6000610a2a83610f33565b8210610a8c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610921565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b6000610abf6118c1565b905090565b6001600160a01b0381163314610b345760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610921565b610b3e828261193e565b5050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610b8b5760405162461bcd60e51b815260040161092190613b45565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610bd4600080516020613ec4833981519152546001600160a01b031690565b6001600160a01b031614610bfa5760405162461bcd60e51b815260040161092190613b91565b610c03816119a6565b60408051600080825260208201909252610c1f918391906119d0565b50565b6001600160a01b03821660009081526101c660205260408120610c459083611b4a565b9392505050565b600080516020613ee4833981519152610c6481611830565b610c1f611c59565b6109c283838360405180602001604052806000815250611321565b610c90336109cc565b610cac5760405162461bcd60e51b815260040161092190613af7565b610c1f81611cab565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610cfe5760405162461bcd60e51b815260040161092190613b45565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610d47600080516020613ec4833981519152546001600160a01b031690565b6001600160a01b031614610d6d5760405162461bcd60e51b815260040161092190613b91565b610d76826119a6565b610b3e828260016119d0565b6000610d8d60995490565b8210610df05760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610921565b60998281548110610e0357610e03613bdd565b90600052602060002001549050919050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eb55760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610921565b50600080516020613ec483398151915290565b33610b3e8183611cb4565b6000818152606760205260408120546001600160a01b0316806107ed5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610921565b60006001600160a01b038216610f9d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610921565b506001600160a01b031660009081526068602052604090205490565b6001600160a01b03811660009081526101c860205260408120546107ed565b600054610100900460ff1615808015610ff85750600054600160ff909116105b806110125750303b158015611012575060005460ff166001145b6110755760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610921565b6000805460ff191660011790558015611098576000805461ff0019166101001790555b6000339050807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035561110360405180604001604052806006815260200165135a5b9a525160d21b8152506040518060400160405280600381526020016213525160ea1b815250611d27565b61110b611d58565b611113611d58565b61111b611d81565b611123611d58565b61112b611d58565b61116c60405180604001604052806006815260200165135a5b9a525160d21b815250604051806040016040528060018152602001603160f81b815250611db0565b611174611d58565b61117c611d58565b61118760003361183a565b61119f600080516020613ee48339815191523361183a565b6111c97f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361183a565b6111f37f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e33361183a565b508015610c1f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600080516020613ee483398151915261125481611830565b610c1f611de1565b60004382106112ad5760405162461bcd60e51b815260206004820152601a60248201527f566f7465733a20626c6f636b206e6f7420796574206d696e65640000000000006044820152606401610921565b6107ed6101c783611b4a565b600091825261012d602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606066805461080290613ac2565b6001600160a01b03811660009081526101c6602052604081206107ed90611e1e565b610b3e338383611e7a565b61132b3383611604565b6113475760405162461bcd60e51b815260040161092190613af7565b61135384848484611f49565b50505050565b834211156113a95760405162461bcd60e51b815260206004820152601860248201527f566f7465733a207369676e6174757265206578706972656400000000000000006044820152606401610921565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906114239061141b9060a00160405160208183030381529060405280519060200120611f7c565b858585611fca565b905061142e81611ff2565b86146114735760405162461bcd60e51b8152602060048201526014602482015273566f7465733a20696e76616c6964206e6f6e636560601b6044820152606401610921565b61147d8188611cb4565b50505050505050565b60606107ed8261201b565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66114bb81611830565b60006114c761028d5490565b90506114d861028d80546001019055565b6114e28482612117565b6113538184612131565b600082815261012d602052604090206001015461150881611830565b6109c2838361193e565b60006001600160e01b03198216637965db0b60e01b14806107ed57506107ed826121cb565b6000818152606760205260409020546001600160a01b0316610c1f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610921565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906115cb82610ed3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061161083610ed3565b9050806001600160a01b0316846001600160a01b0316148061165757506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b8061167b5750836001600160a01b031661167084610885565b6001600160a01b0316145b949350505050565b826001600160a01b031661169682610ed3565b6001600160a01b0316146116fa5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610921565b6001600160a01b03821661175c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610921565b6117678383836121f0565b611772600082611596565b6001600160a01b038316600090815260686020526040812080546001929061179b908490613c09565b90915550506001600160a01b03821660009081526068602052604081208054600192906117c9908490613c20565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a46109c2838383612203565b610c1f813361220e565b61184482826112b9565b610b3e57600082815261012d602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561187d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610abf7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6118f16101915490565b610192546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b61194882826112b9565b15610b3e57600082815261012d602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610b3e81611830565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611a03576109c283612272565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a3c57600080fd5b505afa925050508015611a6c575060408051601f3d908101601f19168201909252611a6991810190613c38565b60015b611acf5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610921565b600080516020613ec48339815191528114611b3e5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610921565b506109c283838361230e565b6000438210611b9b5760405162461bcd60e51b815260206004820181905260248201527f436865636b706f696e74733a20626c6f636b206e6f7420796574206d696e65646044820152606401610921565b825460005b81811015611c00576000611bb48284612333565b905084866000018281548110611bcc57611bcc613bdd565b60009182526020909120015463ffffffff161115611bec57809250611bfa565b611bf7816001613c20565b91505b50611ba0565b8115611c445784611c12600184613c09565b81548110611c2257611c22613bdd565b60009182526020909120015464010000000090046001600160e01b0316611c47565b60005b6001600160e01b031695945050505050565b611c6161234e565b60fb805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610c1f81612397565b6001600160a01b0382811660008181526101c5602052604080822080548686166001600160a01b0319821681179092559151919094169392849290917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46109c28183611d22866123d7565b6123e2565b600054610100900460ff16611d4e5760405162461bcd60e51b815260040161092190613c51565b610b3e8282612521565b600054610100900460ff16611d7f5760405162461bcd60e51b815260040161092190613c51565b565b600054610100900460ff16611da85760405162461bcd60e51b815260040161092190613c51565b611d7f61256f565b600054610100900460ff16611dd75760405162461bcd60e51b815260040161092190613c51565b610b3e82826125a2565b611de96125e5565b60fb805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c8e3390565b80546000908015611e675782611e35600183613c09565b81548110611e4557611e45613bdd565b60009182526020909120015464010000000090046001600160e01b0316611e6a565b60005b6001600160e01b03169392505050565b816001600160a01b0316836001600160a01b03161415611edc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610921565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611f54848484611683565b611f608484848461262b565b6113535760405162461bcd60e51b815260040161092190613c9c565b60006107ed611f896118c1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611fdb87878787612735565b91509150611fe881612822565b5095945050505050565b6001600160a01b03811660009081526101c8602052604090208054600181018255905b50919050565b606061202682611537565b600082815260c960205260408120805461203f90613ac2565b80601f016020809104026020016040519081016040528092919081815260200182805461206b90613ac2565b80156120b85780601f1061208d576101008083540402835291602001916120b8565b820191906000526020600020905b81548152906001019060200180831161209b57829003601f168201915b5050505050905060006120c96129dd565b90508051600014156120dc575092915050565b81511561210e5780826040516020016120f6929190613cee565b60405160208183030381529060405292505050919050565b61167b846129fd565b610b3e828260405180602001604052806000815250612a63565b6000828152606760205260409020546001600160a01b03166121ac5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610921565b600082815260c96020908152604090912082516109c2928401906135f7565b60006001600160e01b0319821663780e9d6360e01b14806107ed57506107ed82612a96565b6121f86125e5565b6109c2838383612ae6565b6109c2838383612b9e565b61221882826112b9565b610b3e57612230816001600160a01b03166014612baa565b61223b836020612baa565b60405160200161224c929190613d1d565b60408051601f198184030181529082905262461bcd60e51b82526109219160040161374d565b6001600160a01b0381163b6122df5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610921565b600080516020613ec483398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61231783612d46565b6000825111806123245750805b156109c2576113538383612d86565b60006123426002848418613da8565b610c4590848416613c20565b60fb5460ff16611d7f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610921565b6123a081612e7a565b600081815260c96020526040902080546123b990613ac2565b159050610c1f57600081815260c960205260408120610c1f91613677565b60006107ed82610f33565b816001600160a01b0316836001600160a01b0316141580156124045750600081115b156109c2576001600160a01b03831615612493576001600160a01b03831660009081526101c660205260408120819061244090612f2985612f35565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612488929190918252602082015260400190565b60405180910390a250505b6001600160a01b038216156109c2576001600160a01b03821660009081526101c66020526040812081906124ca90612f6385612f35565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612512929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff166125485760405162461bcd60e51b815260040161092190613c51565b815161255b9060659060208501906135f7565b5080516109c29060669060208401906135f7565b600054610100900460ff166125965760405162461bcd60e51b815260040161092190613c51565b60fb805460ff19169055565b600054610100900460ff166125c95760405162461bcd60e51b815260040161092190613c51565b8151602092830120815191909201206101919190915561019255565b60fb5460ff1615611d7f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610921565b60006001600160a01b0384163b1561272d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061266f903390899088908890600401613dbc565b602060405180830381600087803b15801561268957600080fd5b505af19250505080156126b9575060408051601f3d908101601f191682019092526126b691810190613df9565b60015b612713573d8080156126e7576040519150601f19603f3d011682016040523d82523d6000602084013e6126ec565b606091505b50805161270b5760405162461bcd60e51b815260040161092190613c9c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061167b565b50600161167b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561276c5750600090506003612819565b8460ff16601b1415801561278457508460ff16601c14155b156127955750600090506004612819565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156127e9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661281257600060019250925050612819565b9150600090505b94509492505050565b600081600481111561283657612836613e16565b141561283f5750565b600181600481111561285357612853613e16565b14156128a15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610921565b60028160048111156128b5576128b5613e16565b14156129035760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610921565b600381600481111561291757612917613e16565b14156129705760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610921565b600481600481111561298457612984613e16565b1415610c1f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610921565b60606040518060600160405280603d8152602001613f2b603d9139905090565b6060612a0882611537565b6000612a126129dd565b90506000815111612a325760405180602001604052806000815250610c45565b80612a3c84612f6f565b604051602001612a4d929190613cee565b6040516020818303038152906040529392505050565b612a6d838361306d565b612a7a600084848461262b565b6109c25760405162461bcd60e51b815260040161092190613c9c565b60006001600160e01b031982166380ac58cd60e01b1480612ac757506001600160e01b03198216635b5e139f60e01b145b806107ed57506301ffc9a760e01b6001600160e01b03198316146107ed565b6001600160a01b038316612b4157612b3c81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612b64565b816001600160a01b0316836001600160a01b031614612b6457612b6483826131c3565b6001600160a01b038216612b7b576109c281613260565b826001600160a01b0316826001600160a01b0316146109c2576109c2828261330f565b6109c283836001613353565b60606000612bb9836002613e2c565b612bc4906002613c20565b67ffffffffffffffff811115612bdc57612bdc613842565b6040519080825280601f01601f191660200182016040528015612c06576020820181803683370190505b509050600360fc1b81600081518110612c2157612c21613bdd565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612c5057612c50613bdd565b60200101906001600160f81b031916908160001a9053506000612c74846002613e2c565b612c7f906001613c20565b90505b6001811115612cf7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612cb357612cb3613bdd565b1a60f81b828281518110612cc957612cc9613bdd565b60200101906001600160f81b031916908160001a90535060049490941c93612cf081613e4b565b9050612c82565b508315610c455760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610921565b612d4f81612272565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b612dee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610921565b600080846001600160a01b031684604051612e099190613e62565b600060405180830381855af49150503d8060008114612e44576040519150601f19603f3d011682016040523d82523d6000602084013e612e49565b606091505b5091509150612e718282604051806060016040528060278152602001613f04602791396133c6565b95945050505050565b6000612e8582610ed3565b9050612e93816000846121f0565b612e9e600083611596565b6001600160a01b0381166000908152606860205260408120805460019290612ec7908490613c09565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4610b3e81600084612203565b6000610c458284613c09565b600080612f5785612f52612f4888611e1e565b868863ffffffff16565b6133ff565b91509150935093915050565b6000610c458284613c20565b606081612f935750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612fbd5780612fa781613e7e565b9150612fb69050600a83613da8565b9150612f97565b60008167ffffffffffffffff811115612fd857612fd8613842565b6040519080825280601f01601f191660200182016040528015613002576020820181803683370190505b5090505b841561167b57613017600183613c09565b9150613024600a86613e99565b61302f906030613c20565b60f81b81838151811061304457613044613bdd565b60200101906001600160f81b031916908160001a905350613066600a86613da8565b9450613006565b6001600160a01b0382166130c35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610921565b6000818152606760205260409020546001600160a01b0316156131285760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610921565b613134600083836121f0565b6001600160a01b038216600090815260686020526040812080546001929061315d908490613c20565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610b3e60008383612203565b600060016131d084610f33565b6131da9190613c09565b60008381526098602052604090205490915080821461322d576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b60995460009061327290600190613c09565b6000838152609a60205260408120546099805493945090928490811061329a5761329a613bdd565b9060005260206000200154905080609983815481106132bb576132bb613bdd565b6000918252602080832090910192909255828152609a909152604080822084905585825281205560998054806132f3576132f3613ead565b6001900381819060005260206000200160009055905550505050565b600061331a83610f33565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160a01b038316613373576133706101c7612f6383612f35565b50505b6001600160a01b038216613393576133906101c7612f2983612f35565b50505b6001600160a01b0383811660009081526101c560205260408082205485841683529120546109c2929182169116836123e2565b606083156133d5575081610c45565b8251156133e55782518084602001fd5b8160405162461bcd60e51b8152600401610921919061374d565b815460009081908161341086611e1e565b905060008211801561344e5750438661342a600185613c09565b8154811061343a5761343a613bdd565b60009182526020909120015463ffffffff16145b156134ae5761345c85613525565b86613468600185613c09565b8154811061347857613478613bdd565b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b0316021790555061351c565b8560000160405180604001604052806134c643613592565b63ffffffff1681526020016134da88613525565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b95939450505050565b60006001600160e01b0382111561358e5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610921565b5090565b600063ffffffff82111561358e5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610921565b82805461360390613ac2565b90600052602060002090601f016020900481019282613625576000855561366b565b82601f1061363e57805160ff191683800117855561366b565b8280016001018555821561366b579182015b8281111561366b578251825591602001919060010190613650565b5061358e9291506136ad565b50805461368390613ac2565b6000825580601f10613693575050565b601f016020900490600052602060002090810190610c1f91905b5b8082111561358e57600081556001016136ae565b6001600160e01b031981168114610c1f57600080fd5b6000602082840312156136ea57600080fd5b8135610c45816136c2565b60005b838110156137105781810151838201526020016136f8565b838111156113535750506000910152565b600081518084526137398160208601602086016136f5565b601f01601f19169290920160200192915050565b602081526000610c456020830184613721565b60006020828403121561377257600080fd5b5035919050565b80356001600160a01b038116811461379057600080fd5b919050565b600080604083850312156137a857600080fd5b6137b183613779565b946020939093013593505050565b6000806000606084860312156137d457600080fd5b6137dd84613779565b92506137eb60208501613779565b9150604084013590509250925092565b6000806040838503121561380e57600080fd5b8235915061381e60208401613779565b90509250929050565b60006020828403121561383957600080fd5b610c4582613779565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561387357613873613842565b604051601f8501601f19908116603f0116810190828211818310171561389b5761389b613842565b816040528093508581528686860111156138b457600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126138df57600080fd5b610c4583833560208501613858565b6000806040838503121561390157600080fd5b61390a83613779565b9150602083013567ffffffffffffffff81111561392657600080fd5b613932858286016138ce565b9150509250929050565b6000806040838503121561394f57600080fd5b61395883613779565b91506020830135801515811461396d57600080fd5b809150509250929050565b6000806000806080858703121561398e57600080fd5b61399785613779565b93506139a560208601613779565b925060408501359150606085013567ffffffffffffffff8111156139c857600080fd5b6139d4878288016138ce565b91505092959194509250565b60008060008060008060c087890312156139f957600080fd5b613a0287613779565b95506020870135945060408701359350606087013560ff81168114613a2657600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215613a5357600080fd5b613a5c83613779565b9150602083013567ffffffffffffffff811115613a7857600080fd5b8301601f81018513613a8957600080fd5b61393285823560208401613858565b60008060408385031215613aab57600080fd5b613ab483613779565b915061381e60208401613779565b600181811c90821680613ad657607f821691505b6020821081141561201557634e487b7160e01b600052602260045260246000fd5b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015613c1b57613c1b613bf3565b500390565b60008219821115613c3357613c33613bf3565b500190565b600060208284031215613c4a57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008351613d008184602088016136f5565b835190830190613d148183602088016136f5565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613d558160178501602088016136f5565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613d868160288401602088016136f5565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b600082613db757613db7613d92565b500490565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613def90830184613721565b9695505050505050565b600060208284031215613e0b57600080fd5b8151610c45816136c2565b634e487b7160e01b600052602160045260246000fd5b6000816000190483118215151615613e4657613e46613bf3565b500290565b600081613e5a57613e5a613bf3565b506000190190565b60008251613e748184602087016136f5565b9190910192915050565b6000600019821415613e9257613e92613bf3565b5060010190565b600082613ea857613ea8613d92565b500690565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564697066733a2f2f516d633844564574687137635a4d544d795a324e513864486b4739396e353439444d42774e7a41797051675865312f4d696e6949442fa26469706673582212205392bb1fc216844bbe962341134a44a4b18c7bed34b18218216d1eb92914d2f964736f6c63430008090033", + "deployedBytecode": "0x6080604052600436106102515760003560e01c80635c975abb11610139578063a217fddf116100b6578063d204c45e1161007a578063d204c45e146106cf578063d5391393146106ef578063d547741f14610723578063e63ab1e914610743578063e985e9c514610765578063f72c0d8b146107ae57600080fd5b8063a217fddf1461063a578063a22cb4651461064f578063b88d4fde1461066f578063c3cda5201461068f578063c87b56dd146106af57600080fd5b80638456cb59116100fd5780638456cb59146105b05780638e539e8c146105c557806391d14854146105e557806395d89b41146106055780639ab24eb01461061a57600080fd5b80635c975abb146105235780636352211e1461053b57806370a082311461055b5780637ecebe001461057b5780638129fc1c1461059b57600080fd5b806336568abe116101d257806342966c681161019657806342966c68146104615780634f1ef286146104815780634f6ccce71461049457806352d1902d146104b4578063587cde1e146104c95780635c19a95c1461050357600080fd5b806336568abe146103cc5780633659cfe6146103ec5780633a46b1a81461040c5780633f4ba83a1461042c57806342842e0e1461044157600080fd5b806323b872dd1161021957806323b872dd14610326578063248a9ca3146103465780632f2ff15d146103775780632f745c59146103975780633644e515146103b757600080fd5b806301ffc9a71461025657806306fdde031461028b578063081812fc146102ad578063095ea7b3146102e557806318160ddd14610307575b600080fd5b34801561026257600080fd5b506102766102713660046136d8565b6107e2565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a06107f3565b604051610282919061374d565b3480156102b957600080fd5b506102cd6102c8366004613760565b610885565b6040516001600160a01b039091168152602001610282565b3480156102f157600080fd5b50610305610300366004613795565b6108ac565b005b34801561031357600080fd5b506099545b604051908152602001610282565b34801561033257600080fd5b506103056103413660046137bf565b6109c7565b34801561035257600080fd5b50610318610361366004613760565b600090815261012d602052604090206001015490565b34801561038357600080fd5b506103056103923660046137fb565b6109f9565b3480156103a357600080fd5b506103186103b2366004613795565b610a1f565b3480156103c357600080fd5b50610318610ab5565b3480156103d857600080fd5b506103056103e73660046137fb565b610ac4565b3480156103f857600080fd5b50610305610407366004613827565b610b42565b34801561041857600080fd5b50610318610427366004613795565b610c22565b34801561043857600080fd5b50610305610c4c565b34801561044d57600080fd5b5061030561045c3660046137bf565b610c6c565b34801561046d57600080fd5b5061030561047c366004613760565b610c87565b61030561048f3660046138ee565b610cb5565b3480156104a057600080fd5b506103186104af366004613760565b610d82565b3480156104c057600080fd5b50610318610e15565b3480156104d557600080fd5b506102cd6104e4366004613827565b6001600160a01b0390811660009081526101c560205260409020541690565b34801561050f57600080fd5b5061030561051e366004613827565b610ec8565b34801561052f57600080fd5b5060fb5460ff16610276565b34801561054757600080fd5b506102cd610556366004613760565b610ed3565b34801561056757600080fd5b50610318610576366004613827565b610f33565b34801561058757600080fd5b50610318610596366004613827565b610fb9565b3480156105a757600080fd5b50610305610fd8565b3480156105bc57600080fd5b5061030561123c565b3480156105d157600080fd5b506103186105e0366004613760565b61125c565b3480156105f157600080fd5b506102766106003660046137fb565b6112b9565b34801561061157600080fd5b506102a06112e5565b34801561062657600080fd5b50610318610635366004613827565b6112f4565b34801561064657600080fd5b50610318600081565b34801561065b57600080fd5b5061030561066a36600461393c565b611316565b34801561067b57600080fd5b5061030561068a366004613978565b611321565b34801561069b57600080fd5b506103056106aa3660046139e0565b611359565b3480156106bb57600080fd5b506102a06106ca366004613760565b611486565b3480156106db57600080fd5b506103056106ea366004613a40565b611491565b3480156106fb57600080fd5b506103187f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b34801561072f57600080fd5b5061030561073e3660046137fb565b6114ec565b34801561074f57600080fd5b50610318600080516020613ee483398151915281565b34801561077157600080fd5b50610276610780366004613a98565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b3480156107ba57600080fd5b506103187f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006107ed82611512565b92915050565b60606065805461080290613ac2565b80601f016020809104026020016040519081016040528092919081815260200182805461082e90613ac2565b801561087b5780601f106108505761010080835404028352916020019161087b565b820191906000526020600020905b81548152906001019060200180831161085e57829003601f168201915b5050505050905090565b600061089082611537565b506000908152606960205260409020546001600160a01b031690565b60006108b782610ed3565b9050806001600160a01b0316836001600160a01b0316141561092a5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061094657506109468133610780565b6109b85760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610921565b6109c28383611596565b505050565b6109d2335b82611604565b6109ee5760405162461bcd60e51b815260040161092190613af7565b6109c2838383611683565b600082815261012d6020526040902060010154610a1581611830565b6109c2838361183a565b6000610a2a83610f33565b8210610a8c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610921565b506001600160a01b03919091166000908152609760209081526040808320938352929052205490565b6000610abf6118c1565b905090565b6001600160a01b0381163314610b345760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610921565b610b3e828261193e565b5050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610b8b5760405162461bcd60e51b815260040161092190613b45565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610bd4600080516020613ec4833981519152546001600160a01b031690565b6001600160a01b031614610bfa5760405162461bcd60e51b815260040161092190613b91565b610c03816119a6565b60408051600080825260208201909252610c1f918391906119d0565b50565b6001600160a01b03821660009081526101c660205260408120610c459083611b4a565b9392505050565b600080516020613ee4833981519152610c6481611830565b610c1f611c59565b6109c283838360405180602001604052806000815250611321565b610c90336109cc565b610cac5760405162461bcd60e51b815260040161092190613af7565b610c1f81611cab565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610cfe5760405162461bcd60e51b815260040161092190613b45565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610d47600080516020613ec4833981519152546001600160a01b031690565b6001600160a01b031614610d6d5760405162461bcd60e51b815260040161092190613b91565b610d76826119a6565b610b3e828260016119d0565b6000610d8d60995490565b8210610df05760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610921565b60998281548110610e0357610e03613bdd565b90600052602060002001549050919050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610eb55760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610921565b50600080516020613ec483398151915290565b33610b3e8183611cb4565b6000818152606760205260408120546001600160a01b0316806107ed5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610921565b60006001600160a01b038216610f9d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610921565b506001600160a01b031660009081526068602052604090205490565b6001600160a01b03811660009081526101c860205260408120546107ed565b600054610100900460ff1615808015610ff85750600054600160ff909116105b806110125750303b158015611012575060005460ff166001145b6110755760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610921565b6000805460ff191660011790558015611098576000805461ff0019166101001790555b6000339050807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035561110360405180604001604052806006815260200165135a5b9a525160d21b8152506040518060400160405280600381526020016213525160ea1b815250611d27565b61110b611d58565b611113611d58565b61111b611d81565b611123611d58565b61112b611d58565b61116c60405180604001604052806006815260200165135a5b9a525160d21b815250604051806040016040528060018152602001603160f81b815250611db0565b611174611d58565b61117c611d58565b61118760003361183a565b61119f600080516020613ee48339815191523361183a565b6111c97f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361183a565b6111f37f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e33361183a565b508015610c1f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b600080516020613ee483398151915261125481611830565b610c1f611de1565b60004382106112ad5760405162461bcd60e51b815260206004820152601a60248201527f566f7465733a20626c6f636b206e6f7420796574206d696e65640000000000006044820152606401610921565b6107ed6101c783611b4a565b600091825261012d602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606066805461080290613ac2565b6001600160a01b03811660009081526101c6602052604081206107ed90611e1e565b610b3e338383611e7a565b61132b3383611604565b6113475760405162461bcd60e51b815260040161092190613af7565b61135384848484611f49565b50505050565b834211156113a95760405162461bcd60e51b815260206004820152601860248201527f566f7465733a207369676e6174757265206578706972656400000000000000006044820152606401610921565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906114239061141b9060a00160405160208183030381529060405280519060200120611f7c565b858585611fca565b905061142e81611ff2565b86146114735760405162461bcd60e51b8152602060048201526014602482015273566f7465733a20696e76616c6964206e6f6e636560601b6044820152606401610921565b61147d8188611cb4565b50505050505050565b60606107ed8261201b565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66114bb81611830565b60006114c761028d5490565b90506114d861028d80546001019055565b6114e28482612117565b6113538184612131565b600082815261012d602052604090206001015461150881611830565b6109c2838361193e565b60006001600160e01b03198216637965db0b60e01b14806107ed57506107ed826121cb565b6000818152606760205260409020546001600160a01b0316610c1f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610921565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906115cb82610ed3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061161083610ed3565b9050806001600160a01b0316846001600160a01b0316148061165757506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b8061167b5750836001600160a01b031661167084610885565b6001600160a01b0316145b949350505050565b826001600160a01b031661169682610ed3565b6001600160a01b0316146116fa5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610921565b6001600160a01b03821661175c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610921565b6117678383836121f0565b611772600082611596565b6001600160a01b038316600090815260686020526040812080546001929061179b908490613c09565b90915550506001600160a01b03821660009081526068602052604081208054600192906117c9908490613c20565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a46109c2838383612203565b610c1f813361220e565b61184482826112b9565b610b3e57600082815261012d602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561187d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610abf7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6118f16101915490565b610192546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b61194882826112b9565b15610b3e57600082815261012d602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610b3e81611830565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611a03576109c283612272565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611a3c57600080fd5b505afa925050508015611a6c575060408051601f3d908101601f19168201909252611a6991810190613c38565b60015b611acf5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610921565b600080516020613ec48339815191528114611b3e5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610921565b506109c283838361230e565b6000438210611b9b5760405162461bcd60e51b815260206004820181905260248201527f436865636b706f696e74733a20626c6f636b206e6f7420796574206d696e65646044820152606401610921565b825460005b81811015611c00576000611bb48284612333565b905084866000018281548110611bcc57611bcc613bdd565b60009182526020909120015463ffffffff161115611bec57809250611bfa565b611bf7816001613c20565b91505b50611ba0565b8115611c445784611c12600184613c09565b81548110611c2257611c22613bdd565b60009182526020909120015464010000000090046001600160e01b0316611c47565b60005b6001600160e01b031695945050505050565b611c6161234e565b60fb805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610c1f81612397565b6001600160a01b0382811660008181526101c5602052604080822080548686166001600160a01b0319821681179092559151919094169392849290917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46109c28183611d22866123d7565b6123e2565b600054610100900460ff16611d4e5760405162461bcd60e51b815260040161092190613c51565b610b3e8282612521565b600054610100900460ff16611d7f5760405162461bcd60e51b815260040161092190613c51565b565b600054610100900460ff16611da85760405162461bcd60e51b815260040161092190613c51565b611d7f61256f565b600054610100900460ff16611dd75760405162461bcd60e51b815260040161092190613c51565b610b3e82826125a2565b611de96125e5565b60fb805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c8e3390565b80546000908015611e675782611e35600183613c09565b81548110611e4557611e45613bdd565b60009182526020909120015464010000000090046001600160e01b0316611e6a565b60005b6001600160e01b03169392505050565b816001600160a01b0316836001600160a01b03161415611edc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610921565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611f54848484611683565b611f608484848461262b565b6113535760405162461bcd60e51b815260040161092190613c9c565b60006107ed611f896118c1565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000611fdb87878787612735565b91509150611fe881612822565b5095945050505050565b6001600160a01b03811660009081526101c8602052604090208054600181018255905b50919050565b606061202682611537565b600082815260c960205260408120805461203f90613ac2565b80601f016020809104026020016040519081016040528092919081815260200182805461206b90613ac2565b80156120b85780601f1061208d576101008083540402835291602001916120b8565b820191906000526020600020905b81548152906001019060200180831161209b57829003601f168201915b5050505050905060006120c96129dd565b90508051600014156120dc575092915050565b81511561210e5780826040516020016120f6929190613cee565b60405160208183030381529060405292505050919050565b61167b846129fd565b610b3e828260405180602001604052806000815250612a63565b6000828152606760205260409020546001600160a01b03166121ac5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610921565b600082815260c96020908152604090912082516109c2928401906135f7565b60006001600160e01b0319821663780e9d6360e01b14806107ed57506107ed82612a96565b6121f86125e5565b6109c2838383612ae6565b6109c2838383612b9e565b61221882826112b9565b610b3e57612230816001600160a01b03166014612baa565b61223b836020612baa565b60405160200161224c929190613d1d565b60408051601f198184030181529082905262461bcd60e51b82526109219160040161374d565b6001600160a01b0381163b6122df5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610921565b600080516020613ec483398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b61231783612d46565b6000825111806123245750805b156109c2576113538383612d86565b60006123426002848418613da8565b610c4590848416613c20565b60fb5460ff16611d7f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610921565b6123a081612e7a565b600081815260c96020526040902080546123b990613ac2565b159050610c1f57600081815260c960205260408120610c1f91613677565b60006107ed82610f33565b816001600160a01b0316836001600160a01b0316141580156124045750600081115b156109c2576001600160a01b03831615612493576001600160a01b03831660009081526101c660205260408120819061244090612f2985612f35565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612488929190918252602082015260400190565b60405180910390a250505b6001600160a01b038216156109c2576001600160a01b03821660009081526101c66020526040812081906124ca90612f6385612f35565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248383604051612512929190918252602082015260400190565b60405180910390a25050505050565b600054610100900460ff166125485760405162461bcd60e51b815260040161092190613c51565b815161255b9060659060208501906135f7565b5080516109c29060669060208401906135f7565b600054610100900460ff166125965760405162461bcd60e51b815260040161092190613c51565b60fb805460ff19169055565b600054610100900460ff166125c95760405162461bcd60e51b815260040161092190613c51565b8151602092830120815191909201206101919190915561019255565b60fb5460ff1615611d7f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610921565b60006001600160a01b0384163b1561272d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061266f903390899088908890600401613dbc565b602060405180830381600087803b15801561268957600080fd5b505af19250505080156126b9575060408051601f3d908101601f191682019092526126b691810190613df9565b60015b612713573d8080156126e7576040519150601f19603f3d011682016040523d82523d6000602084013e6126ec565b606091505b50805161270b5760405162461bcd60e51b815260040161092190613c9c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061167b565b50600161167b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561276c5750600090506003612819565b8460ff16601b1415801561278457508460ff16601c14155b156127955750600090506004612819565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156127e9573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661281257600060019250925050612819565b9150600090505b94509492505050565b600081600481111561283657612836613e16565b141561283f5750565b600181600481111561285357612853613e16565b14156128a15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610921565b60028160048111156128b5576128b5613e16565b14156129035760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610921565b600381600481111561291757612917613e16565b14156129705760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610921565b600481600481111561298457612984613e16565b1415610c1f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610921565b60606040518060600160405280603d8152602001613f2b603d9139905090565b6060612a0882611537565b6000612a126129dd565b90506000815111612a325760405180602001604052806000815250610c45565b80612a3c84612f6f565b604051602001612a4d929190613cee565b6040516020818303038152906040529392505050565b612a6d838361306d565b612a7a600084848461262b565b6109c25760405162461bcd60e51b815260040161092190613c9c565b60006001600160e01b031982166380ac58cd60e01b1480612ac757506001600160e01b03198216635b5e139f60e01b145b806107ed57506301ffc9a760e01b6001600160e01b03198316146107ed565b6001600160a01b038316612b4157612b3c81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b612b64565b816001600160a01b0316836001600160a01b031614612b6457612b6483826131c3565b6001600160a01b038216612b7b576109c281613260565b826001600160a01b0316826001600160a01b0316146109c2576109c2828261330f565b6109c283836001613353565b60606000612bb9836002613e2c565b612bc4906002613c20565b67ffffffffffffffff811115612bdc57612bdc613842565b6040519080825280601f01601f191660200182016040528015612c06576020820181803683370190505b509050600360fc1b81600081518110612c2157612c21613bdd565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612c5057612c50613bdd565b60200101906001600160f81b031916908160001a9053506000612c74846002613e2c565b612c7f906001613c20565b90505b6001811115612cf7576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612cb357612cb3613bdd565b1a60f81b828281518110612cc957612cc9613bdd565b60200101906001600160f81b031916908160001a90535060049490941c93612cf081613e4b565b9050612c82565b508315610c455760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610921565b612d4f81612272565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b612dee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610921565b600080846001600160a01b031684604051612e099190613e62565b600060405180830381855af49150503d8060008114612e44576040519150601f19603f3d011682016040523d82523d6000602084013e612e49565b606091505b5091509150612e718282604051806060016040528060278152602001613f04602791396133c6565b95945050505050565b6000612e8582610ed3565b9050612e93816000846121f0565b612e9e600083611596565b6001600160a01b0381166000908152606860205260408120805460019290612ec7908490613c09565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4610b3e81600084612203565b6000610c458284613c09565b600080612f5785612f52612f4888611e1e565b868863ffffffff16565b6133ff565b91509150935093915050565b6000610c458284613c20565b606081612f935750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612fbd5780612fa781613e7e565b9150612fb69050600a83613da8565b9150612f97565b60008167ffffffffffffffff811115612fd857612fd8613842565b6040519080825280601f01601f191660200182016040528015613002576020820181803683370190505b5090505b841561167b57613017600183613c09565b9150613024600a86613e99565b61302f906030613c20565b60f81b81838151811061304457613044613bdd565b60200101906001600160f81b031916908160001a905350613066600a86613da8565b9450613006565b6001600160a01b0382166130c35760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610921565b6000818152606760205260409020546001600160a01b0316156131285760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610921565b613134600083836121f0565b6001600160a01b038216600090815260686020526040812080546001929061315d908490613c20565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610b3e60008383612203565b600060016131d084610f33565b6131da9190613c09565b60008381526098602052604090205490915080821461322d576001600160a01b03841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b5060009182526098602090815260408084208490556001600160a01b039094168352609781528383209183525290812055565b60995460009061327290600190613c09565b6000838152609a60205260408120546099805493945090928490811061329a5761329a613bdd565b9060005260206000200154905080609983815481106132bb576132bb613bdd565b6000918252602080832090910192909255828152609a909152604080822084905585825281205560998054806132f3576132f3613ead565b6001900381819060005260206000200160009055905550505050565b600061331a83610f33565b6001600160a01b039093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b6001600160a01b038316613373576133706101c7612f6383612f35565b50505b6001600160a01b038216613393576133906101c7612f2983612f35565b50505b6001600160a01b0383811660009081526101c560205260408082205485841683529120546109c2929182169116836123e2565b606083156133d5575081610c45565b8251156133e55782518084602001fd5b8160405162461bcd60e51b8152600401610921919061374d565b815460009081908161341086611e1e565b905060008211801561344e5750438661342a600185613c09565b8154811061343a5761343a613bdd565b60009182526020909120015463ffffffff16145b156134ae5761345c85613525565b86613468600185613c09565b8154811061347857613478613bdd565b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b0316021790555061351c565b8560000160405180604001604052806134c643613592565b63ffffffff1681526020016134da88613525565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b95939450505050565b60006001600160e01b0382111561358e5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b6064820152608401610921565b5090565b600063ffffffff82111561358e5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b6064820152608401610921565b82805461360390613ac2565b90600052602060002090601f016020900481019282613625576000855561366b565b82601f1061363e57805160ff191683800117855561366b565b8280016001018555821561366b579182015b8281111561366b578251825591602001919060010190613650565b5061358e9291506136ad565b50805461368390613ac2565b6000825580601f10613693575050565b601f016020900490600052602060002090810190610c1f91905b5b8082111561358e57600081556001016136ae565b6001600160e01b031981168114610c1f57600080fd5b6000602082840312156136ea57600080fd5b8135610c45816136c2565b60005b838110156137105781810151838201526020016136f8565b838111156113535750506000910152565b600081518084526137398160208601602086016136f5565b601f01601f19169290920160200192915050565b602081526000610c456020830184613721565b60006020828403121561377257600080fd5b5035919050565b80356001600160a01b038116811461379057600080fd5b919050565b600080604083850312156137a857600080fd5b6137b183613779565b946020939093013593505050565b6000806000606084860312156137d457600080fd5b6137dd84613779565b92506137eb60208501613779565b9150604084013590509250925092565b6000806040838503121561380e57600080fd5b8235915061381e60208401613779565b90509250929050565b60006020828403121561383957600080fd5b610c4582613779565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561387357613873613842565b604051601f8501601f19908116603f0116810190828211818310171561389b5761389b613842565b816040528093508581528686860111156138b457600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126138df57600080fd5b610c4583833560208501613858565b6000806040838503121561390157600080fd5b61390a83613779565b9150602083013567ffffffffffffffff81111561392657600080fd5b613932858286016138ce565b9150509250929050565b6000806040838503121561394f57600080fd5b61395883613779565b91506020830135801515811461396d57600080fd5b809150509250929050565b6000806000806080858703121561398e57600080fd5b61399785613779565b93506139a560208601613779565b925060408501359150606085013567ffffffffffffffff8111156139c857600080fd5b6139d4878288016138ce565b91505092959194509250565b60008060008060008060c087890312156139f957600080fd5b613a0287613779565b95506020870135945060408701359350606087013560ff81168114613a2657600080fd5b9598949750929560808101359460a0909101359350915050565b60008060408385031215613a5357600080fd5b613a5c83613779565b9150602083013567ffffffffffffffff811115613a7857600080fd5b8301601f81018513613a8957600080fd5b61393285823560208401613858565b60008060408385031215613aab57600080fd5b613ab483613779565b915061381e60208401613779565b600181811c90821680613ad657607f821691505b6020821081141561201557634e487b7160e01b600052602260045260246000fd5b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015613c1b57613c1b613bf3565b500390565b60008219821115613c3357613c33613bf3565b500190565b600060208284031215613c4a57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008351613d008184602088016136f5565b835190830190613d148183602088016136f5565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613d558160178501602088016136f5565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613d868160288401602088016136f5565b01602801949350505050565b634e487b7160e01b600052601260045260246000fd5b600082613db757613db7613d92565b500490565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613def90830184613721565b9695505050505050565b600060208284031215613e0b57600080fd5b8151610c45816136c2565b634e487b7160e01b600052602160045260246000fd5b6000816000190483118215151615613e4657613e46613bf3565b500290565b600081613e5a57613e5a613bf3565b506000190190565b60008251613e748184602087016136f5565b9190910192915050565b6000600019821415613e9257613e92613bf3565b5060010190565b600082613ea857613ea8613d92565b500690565b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564697066733a2f2f516d633844564574687137635a4d544d795a324e513864486b4739396e353439444d42774e7a41797051675865312f4d696e6949442fa26469706673582212205392bb1fc216844bbe962341134a44a4b18c7bed34b18218216d1eb92914d2f964736f6c63430008090033", + "devdoc": { + "custom:security-contact": "john@johnwhitton.com", + "kind": "dev", + "methods": { + "DOMAIN_SEPARATOR()": { + "details": "Returns the contract's {EIP712} domain separator." + }, + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "burn(uint256)": { + "details": "Burns `tokenId`. See {ERC721-_burn}. Requirements: - The caller must own `tokenId` or be an approved operator." + }, + "constructor": { + "custom:oz-upgrades-unsafe-allow": "constructor" + }, + "delegate(address)": { + "details": "Delegates votes from the sender to `delegatee`." + }, + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { + "details": "Delegates votes from signer to `delegatee`." + }, + "delegates(address)": { + "details": "Returns the delegate that `account` has chosen." + }, + "getApproved(uint256)": { + "details": "See {IERC721-getApproved}." + }, + "getPastTotalSupply(uint256)": { + "details": "Returns the total supply of votes available at the end of a past block (`blockNumber`). NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. Votes that have not been delegated are still part of total supply, even though they would not participate in a vote. Requirements: - `blockNumber` must have been already mined" + }, + "getPastVotes(address,uint256)": { + "details": "Returns the amount of votes that `account` had at the end of a past block (`blockNumber`). Requirements: - `blockNumber` must have been already mined" + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "getVotes(address)": { + "details": "Returns the current amount of votes that `account` has." + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC721-isApprovedForAll}." + }, + "name()": { + "details": "See {IERC721Metadata-name}." + }, + "nonces(address)": { + "details": "Returns an address nonce." + }, + "ownerOf(uint256)": { + "details": "See {IERC721-ownerOf}." + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate that the this implementation remains valid after an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + }, + "safeTransferFrom(address,address,uint256)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,bytes)": { + "details": "See {IERC721-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenByIndex(uint256)": { + "details": "See {IERC721Enumerable-tokenByIndex}." + }, + "tokenOfOwnerByIndex(address,uint256)": { + "details": "See {IERC721Enumerable-tokenOfOwnerByIndex}." + }, + "totalSupply()": { + "details": "See {IERC721Enumerable-totalSupply}." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC721-transferFrom}." + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1530, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 1533, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 4162, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 5104, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1966, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_name", + "offset": 0, + "slot": "101", + "type": "t_string_storage" + }, + { + "astId": 1968, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_symbol", + "offset": 0, + "slot": "102", + "type": "t_string_storage" + }, + { + "astId": 1972, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_owners", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 1976, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_balances", + "offset": 0, + "slot": "104", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1980, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_tokenApprovals", + "offset": 0, + "slot": "105", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 1986, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_operatorApprovals", + "offset": 0, + "slot": "106", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 2828, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "107", + "type": "t_array(t_uint256)44_storage" + }, + { + "astId": 3043, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_ownedTokens", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))" + }, + { + "astId": 3047, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_ownedTokensIndex", + "offset": 0, + "slot": "152", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 3050, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_allTokens", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)dyn_storage" + }, + { + "astId": 3054, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_allTokensIndex", + "offset": 0, + "slot": "154", + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 3370, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "155", + "type": "t_array(t_uint256)46_storage" + }, + { + "astId": 3399, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_tokenURIs", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_uint256,t_string_storage)" + }, + { + "astId": 3515, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1831, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_paused", + "offset": 0, + "slot": "251", + "type": "t_bool" + }, + { + "astId": 1936, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 184, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_roles", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 483, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "302", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 3012, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "351", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4920, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "401", + "type": "t_bytes32" + }, + { + "astId": 4922, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "402", + "type": "t_bytes32" + }, + { + "astId": 5060, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "403", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 706, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_delegation", + "offset": 0, + "slot": "453", + "type": "t_mapping(t_address,t_address)" + }, + { + "astId": 711, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_delegateCheckpoints", + "offset": 0, + "slot": "454", + "type": "t_mapping(t_address,t_struct(History)3902_storage)" + }, + { + "astId": 714, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_totalCheckpoints", + "offset": 0, + "slot": "455", + "type": "t_struct(History)3902_storage" + }, + { + "astId": 719, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_nonces", + "offset": 0, + "slot": "456", + "type": "t_mapping(t_address,t_struct(Counter)4169_storage)" + }, + { + "astId": 1133, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "457", + "type": "t_array(t_uint256)46_storage" + }, + { + "astId": 3643, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "503", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1512, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "553", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1809, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "__gap", + "offset": 0, + "slot": "603", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 12609, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_tokenIdCounter", + "offset": 0, + "slot": "653", + "type": "t_struct(Counter)4169_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Checkpoint)3897_storage)dyn_storage": { + "base": "t_struct(Checkpoint)3897_storage", + "encoding": "dynamic_array", + "label": "struct CheckpointsUpgradeable.Checkpoint[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)44_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[44]", + "numberOfBytes": "1408" + }, + "t_array(t_uint256)46_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "base": "t_uint256", + "encoding": "dynamic_array", + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_address)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_uint256)" + }, + "t_mapping(t_address,t_struct(Counter)4169_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32", + "value": "t_struct(Counter)4169_storage" + }, + "t_mapping(t_address,t_struct(History)3902_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct CheckpointsUpgradeable.History)", + "numberOfBytes": "32", + "value": "t_struct(History)3902_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint256,t_string_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Checkpoint)3897_storage": { + "encoding": "inplace", + "label": "struct CheckpointsUpgradeable.Checkpoint", + "members": [ + { + "astId": 3894, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_blockNumber", + "offset": 0, + "slot": "0", + "type": "t_uint32" + }, + { + "astId": 3896, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_value", + "offset": 4, + "slot": "0", + "type": "t_uint224" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Counter)4169_storage": { + "encoding": "inplace", + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "astId": 4168, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_value", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_struct(History)3902_storage": { + "encoding": "inplace", + "label": "struct CheckpointsUpgradeable.History", + "members": [ + { + "astId": 3901, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "_checkpoints", + "offset": 0, + "slot": "0", + "type": "t_array(t_struct(Checkpoint)3897_storage)dyn_storage" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/miniID/MiniID.sol:MiniID", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint224": { + "encoding": "inplace", + "label": "uint224", + "numberOfBytes": "28" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/MiniID_Proxy.json b/miniwallet/deployments/ethLocal/MiniID_Proxy.json new file mode 100644 index 0000000..402038d --- /dev/null +++ b/miniwallet/deployments/ethLocal/MiniID_Proxy.json @@ -0,0 +1,204 @@ +{ + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "transactionIndex": 0, + "gasUsed": "490552", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000000000000000000000000000000000400008000084000400000000000000000000000000001000000000000000000000000000002000000000000000000000000000000400000000000020000000000000100000800000000000000000000010000001000000000000008000000000000000000008000000000000080000000000000000000000000000000000000000000000400000000000000000000001000000000000000000020000000200000000000040000001000002000000100002000000020000080000000000000000000000000000000000400000000000000000000000000", + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41", + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000009fe46736679d2d9a65f0992f2272de9f3c7fa6e0" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + }, + { + "transactionIndex": 0, + "blockNumber": 4, + "transactionHash": "0xa39cbdd2b12854d859952023d930b3047112993275a08986a62362de260d2c89", + "address": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 5, + "blockHash": "0x2169483c25a1aa34c577a896976cb52c7e53253433f7defffa5cfc67bc77ce41" + } + ], + "blockNumber": 4, + "cumulativeGasUsed": "490552", + "status": 1, + "byzantium": true + }, + "args": [ + "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0", + "0x8129fc1c" + ], + "numDeployments": 1, + "solcInputHash": "3f42b7d9d73f23a1948bbe290f0342fd", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployments/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/deployments/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\\\";\\nimport \\\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/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 initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(\\n _IMPLEMENTATION_SLOT ==\\n bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1)\\n );\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation()\\n internal\\n view\\n virtual\\n override\\n returns (address impl)\\n {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xe30c5227e56edd12e96ce4c6dd2f90c10e311a2a15b427f3f69cf6349d263690\",\"license\":\"Apache-2.0\"},\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\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 Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual 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 Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\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(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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 overriden 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 internall 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 overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/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\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n 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 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 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 assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040526040516107b13803806107b183398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b60008051602061076a833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610117838360405180606001604052806027815260200161078a602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061076a83398151915260001b6102cb60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b6102ba806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205fe505fef2a45cf1b87780512f76c7a0d89e24f83aace3a7f881bc132f0a21b864736f6c63430008090033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205fe505fef2a45cf1b87780512f76c7a0d89e24f83aace3a7f881bc132f0a21b864736f6c63430008090033", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/MiniWallet.json b/miniwallet/deployments/ethLocal/MiniWallet.json new file mode 100644 index 0000000..e428fd5 --- /dev/null +++ b/miniwallet/deployments/ethLocal/MiniWallet.json @@ -0,0 +1,1238 @@ +{ + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "SendFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "enum Enums.TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "WithdrawalFailed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "DepositSuccessful", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newGlobalUserAuthLimit", + "type": "uint256" + } + ], + "name": "GlobalUserAuthLimitChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newGlobalUserLimit", + "type": "uint256" + } + ], + "name": "GlobalUserLimitChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newThreshold", + "type": "uint256" + } + ], + "name": "OperatorThresholdChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "OperatorsAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "OperatorsRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAllowance", + "type": "uint256" + } + ], + "name": "SendSuccessful", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum Enums.TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "TransferSuccessful", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "WithdrawalSuccessful", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OPERATOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "operatorAddresses", + "type": "address[]" + } + ], + "name": "adminAddOperators", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newGlobalUserAuthLimit", + "type": "uint256" + } + ], + "name": "adminChangeGlobalUserAuthLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newGlobalUserLimit", + "type": "uint256" + } + ], + "name": "adminChangeGlobalUserLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newThreshold", + "type": "uint256" + } + ], + "name": "adminChangeOperatorThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "adminPauseMiniWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "operatorAddresses", + "type": "address[]" + } + ], + "name": "adminRemoveOperators", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "adminUnpauseMiniWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "globalUserAuthLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "globalUserLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "initialOperatorThreshold", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "initialOperators", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "globalUserLimit_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "globalUserAuthLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operatorThreshold", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "renounceAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "enum Enums.TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "transfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + } + ], + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "transactionIndex": 0, + "gasUsed": "786765", + "logsBloom": "0x00000004000000000002000000000000400000000000000000000000000000000200000000000000000000008000000010000000000000000000000000100000000000000000000000000000000002000002000000000000000000000000000000000800020000000000000100800800000804000000000000010000000000000000000000000000000000000000000000000000000080000400000000000000000000000000200000000000000400000000000000008000001000000000000000000020000000200000000000041000400000002008000100000000000020000080000000000000000010000000000001000000000000800000000000000000", + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086", + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000005fbdb2315678afecb367f032d93f642f64180aa3" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "0x00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "0x00000000000000000000000090f79bf6eb2c4f870365e785982e1f101e93b906", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 6, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + } + ], + "blockNumber": 2, + "cumulativeGasUsed": "786765", + "status": 1, + "byzantium": true + }, + "args": [ + "0x5FbDB2315678afecb367f032d93F642f64180aa3", + "0xb4d89a07000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c80000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc00000000000000000000000090f79bf6eb2c4f870365e785982e1f101e93b906" + ], + "numDeployments": 1, + "solcInputHash": "3f42b7d9d73f23a1948bbe290f0342fd", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployments/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/deployments/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\\\";\\nimport \\\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/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 initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(\\n _IMPLEMENTATION_SLOT ==\\n bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1)\\n );\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation()\\n internal\\n view\\n virtual\\n override\\n returns (address impl)\\n {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xe30c5227e56edd12e96ce4c6dd2f90c10e311a2a15b427f3f69cf6349d263690\",\"license\":\"Apache-2.0\"},\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\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 Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual 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 Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\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(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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 overriden 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 internall 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 overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/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\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n 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 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 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 assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040526040516107b13803806107b183398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b60008051602061076a833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610117838360405180606001604052806027815260200161078a602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061076a83398151915260001b6102cb60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b6102ba806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205fe505fef2a45cf1b87780512f76c7a0d89e24f83aace3a7f881bc132f0a21b864736f6c63430008090033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205fe505fef2a45cf1b87780512f76c7a0d89e24f83aace3a7f881bc132f0a21b864736f6c63430008090033", + "execute": { + "methodName": "initialize", + "args": [ + "10", + [ + "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", + "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", + "0x90F79bf6EB2c4f870365E785982E1f101E93b906" + ], + { + "type": "BigNumber", + "hex": "0x056bc75e2d63100000" + }, + { + "type": "BigNumber", + "hex": "0x8ac7230489e80000" + } + ] + }, + "implementation": "0x5FbDB2315678afecb367f032d93F642f64180aa3", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/MiniWallet_Implementation.json b/miniwallet/deployments/ethLocal/MiniWallet_Implementation.json new file mode 100644 index 0000000..3f6beed --- /dev/null +++ b/miniwallet/deployments/ethLocal/MiniWallet_Implementation.json @@ -0,0 +1,1666 @@ +{ + "address": "0x5FbDB2315678afecb367f032d93F642f64180aa3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "SendFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "enum Enums.TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "WithdrawalFailed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "DepositSuccessful", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newGlobalUserAuthLimit", + "type": "uint256" + } + ], + "name": "GlobalUserAuthLimitChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newGlobalUserLimit", + "type": "uint256" + } + ], + "name": "GlobalUserLimitChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newThreshold", + "type": "uint256" + } + ], + "name": "OperatorThresholdChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "OperatorsAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address[]", + "name": "operators", + "type": "address[]" + } + ], + "name": "OperatorsRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newBalance", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newAllowance", + "type": "uint256" + } + ], + "name": "SendSuccessful", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "enum Enums.TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "TransferSuccessful", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "balance", + "type": "uint256" + } + ], + "name": "WithdrawalSuccessful", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OPERATOR_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UPGRADER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "operatorAddresses", + "type": "address[]" + } + ], + "name": "adminAddOperators", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newGlobalUserAuthLimit", + "type": "uint256" + } + ], + "name": "adminChangeGlobalUserAuthLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newGlobalUserLimit", + "type": "uint256" + } + ], + "name": "adminChangeGlobalUserLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newThreshold", + "type": "uint256" + } + ], + "name": "adminChangeOperatorThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "adminPauseMiniWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "operatorAddresses", + "type": "address[]" + } + ], + "name": "adminRemoveOperators", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "adminUnpauseMiniWallet", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "getRoleMember", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleMemberCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "globalUserAuthLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "globalUserLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "initialOperatorThreshold", + "type": "uint8" + }, + { + "internalType": "address[]", + "name": "initialOperators", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "globalUserLimit_", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "globalUserAuthLimit_", + "type": "uint256" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "operatorThreshold", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "proxiableUUID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "renounceAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "send", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "enum Enums.TokenType", + "name": "tokenType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "tokenAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "transfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x5417605634447e3d004765c24ab86067eca7718b40a7c4e9f30c747845219a09", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0x5FbDB2315678afecb367f032d93F642f64180aa3", + "transactionIndex": 0, + "gasUsed": "2574458", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x69c2a18e81a7f89645be1f5f39b1776c75ece5240d3a2dc06cb3789d95068886", + "transactionHash": "0x5417605634447e3d004765c24ab86067eca7718b40a7c4e9f30c747845219a09", + "logs": [], + "blockNumber": 1, + "cumulativeGasUsed": "2574458", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "eb67976a27a158fcc5c575ed68d95e39", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"SendFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"enum Enums.TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"WithdrawalFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"DepositSuccessful\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newGlobalUserAuthLimit\",\"type\":\"uint256\"}],\"name\":\"GlobalUserAuthLimitChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newGlobalUserLimit\",\"type\":\"uint256\"}],\"name\":\"GlobalUserLimitChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"OperatorThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"OperatorsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"operators\",\"type\":\"address[]\"}],\"name\":\"OperatorsRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAllowance\",\"type\":\"uint256\"}],\"name\":\"SendSuccessful\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"enum Enums.TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"TransferSuccessful\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"WithdrawalSuccessful\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operatorAddresses\",\"type\":\"address[]\"}],\"name\":\"adminAddOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newGlobalUserAuthLimit\",\"type\":\"uint256\"}],\"name\":\"adminChangeGlobalUserAuthLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newGlobalUserLimit\",\"type\":\"uint256\"}],\"name\":\"adminChangeGlobalUserLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newThreshold\",\"type\":\"uint256\"}],\"name\":\"adminChangeOperatorThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminPauseMiniWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"operatorAddresses\",\"type\":\"address[]\"}],\"name\":\"adminRemoveOperators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminUnpauseMiniWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getRoleMember\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleMemberCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"globalUserAuthLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"globalUserLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"initialOperatorThreshold\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"initialOperators\",\"type\":\"address[]\"},{\"internalType\":\"uint256\",\"name\":\"globalUserLimit_\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"globalUserAuthLimit_\",\"type\":\"uint256\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"operatorThreshold\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"renounceAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"send\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"enum Enums.TokenType\",\"name\":\"tokenType\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userBalances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"John Whitton https://github.com/johnwhitton/\",\"details\":\"The MiniWallet is designed to simplify management and transfer of tokens by light clients such as the sms-wallet.\",\"errors\":{\"SendFailed(address,address,uint256,uint256,uint256,string)\":[{\"details\":\"Emitted when attempting to send native tokens by the operator on behalf of the `from` account to the `to` account fails e.g. if they have insufficient native tokens locked or insufficient funds approved for the to account\",\"params\":{\"allowance\":\"The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender\",\"amount\":\"The amount of native token sent\",\"balance\":\"The updated balance of native tokens held by the MiniWallet contract on behalf of the user\",\"from\":\"The sender of the native token\",\"reason\":\"The reason the Send Failed\",\"to\":\"The recipient of the native token\"}}],\"TransferFailed(uint256,uint8,uint256,address,address,address,string)\":[{\"details\":\"Emitted when an attempt to transfer tokens (ERC20, ERC721, ERC1155) by the operator on behalf of the `from` account to the `to` account fails\",\"params\":{\"amount\":\"The amount of the token sent\",\"from\":\"The sender of the token\",\"reason\":\"The reason for the failure\",\"to\":\"The recipient of the token\",\"tokenAddress\":\"the address of the token contract\",\"tokenType\":\"an enumerated value indicating the type of token being sent\"}}],\"WithdrawalFailed(address,uint256,uint256,string)\":[{\"details\":\"Emitted when an attempt by a `user` to withdraw native tokens `amount` fails `balance` is the users balance held and `reason` gives the reason for failure. e.g. `Insufficient Locked Funds to Withdraw`.\",\"params\":{\"amount\":\"The amount of native tokens requested to withdraw\",\"balance\":\"The users balance of native tokens held by the MiniWallet contract\",\"user\":\"The user attempting to withdraw the native token\"}}]},\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\",\"params\":{\"allowance\":\"The allowance of native tokens which can be transferred by the MiniWallet Operator to the spender\",\"owner\":\"The owner of the native token which are being approved\",\"spender\":\"The spender who can spend the native tokens (actual transferring of the funds is done by the operator)\"}},\"DepositSuccessful(address,uint256,uint256)\":{\"details\":\"Emitted when a `user` deposits native tokens (`amount`) into the MiniWallet `balance` is the users new balance held.\",\"params\":{\"amount\":\"The amount of native tokens deposited\",\"balance\":\"The users balance of native tokens held by the MiniWallet contract after the deposit\",\"user\":\"The user depositing the native token\"}},\"GlobalUserAuthLimitChanged(uint256)\":{\"details\":\"Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can authorize per recipient\",\"params\":{\"newGlobalUserAuthLimit\":\"The updated global limit of native tokens a user can authorize\"}},\"GlobalUserLimitChanged(uint256)\":{\"details\":\"Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract\",\"params\":{\"newGlobalUserLimit\":\"The updated global limit of native tokens a user can hold\"}},\"OperatorThresholdChanged(uint256)\":{\"details\":\"Emitted when the `DEFAULT_ADMIN` updates the maximum number of operators allowed\",\"params\":{\"newThreshold\":\"The updated maximum number of operators\"}},\"OperatorsAdded(address[])\":{\"details\":\"Emitted when the `DEFAULT_ADMIN` adds some operators\",\"params\":{\"operators\":\"The operators added\"}},\"OperatorsRemoved(address[])\":{\"details\":\"Emitted when the `DEFAULT_ADMIN` removes some operators\",\"params\":{\"operators\":\"The operators removed\"}},\"SendSuccessful(address,address,uint256,uint256,uint256)\":{\"details\":\"Emitted when native tokens have been successfully sent by the operator on behalf of the `from` account\",\"params\":{\"amount\":\"The amount of native token sent\",\"from\":\"The sender of the native token\",\"newAllowance\":\"The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender\",\"newBalance\":\"The updated balance of native tokens held by the MiniWallet contract on behalf of the user\",\"to\":\"The recipient of the native token\"}},\"TransferSuccessful(uint256,uint8,uint256,address,address,address)\":{\"details\":\"Emitted when transferring tokens (ERC20, ERC721, ERC1155) by the operator on behalf of the `from` account to the `to` account\",\"params\":{\"amount\":\"The amount of the token sent\",\"from\":\"The sender of the token\",\"to\":\"The recipient of the token\",\"tokenAddress\":\"the address of the token contract\",\"tokenType\":\"an enumerated value indicating the type of token being sent\"}},\"WithdrawalSuccessful(address,uint256,uint256)\":{\"details\":\"Emitted when a `user` withdraws native tokens (`amount`) from the MiniWallet `balance` is the users new balance held.\",\"params\":{\"amount\":\"The amount of native tokens withdrawn\",\"balance\":\"The users balance of native tokens held by the MiniWallet contract after the withdrawal\",\"user\":\"The user withdrawing the native token\"}}},\"kind\":\"dev\",\"methods\":{\"adminAddOperators(address[])\":{\"details\":\"`adminAddOperators` adds some new operators (can only be called by admin)\",\"params\":{\"operatorAddresses\":\"The addresses of the new operators\"}},\"adminChangeGlobalUserAuthLimit(uint256)\":{\"details\":\"`adminChangeGlobalUserAuthLimit` updates the global limit for the amount of Native Tokens a user can authorize per recipient This value is checked when creating allowances. This function can only be called by an administrator\",\"params\":{\"newGlobalUserAuthLimit\":\"updated Global User Auth Limit\"}},\"adminChangeGlobalUserLimit(uint256)\":{\"details\":\"`adminChangeGlobalUserLimit` updates the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract. This value is checked when depositing funds. This function can only be called by the administrator.\",\"params\":{\"newGlobalUserLimit\":\"The updated global limit.\"}},\"adminChangeOperatorThreshold(uint256)\":{\"details\":\"`adminChangeOperatorThreshold` updates the maximum number of allowed operators\",\"params\":{\"newThreshold\":\"The updated maximum number of operators\"}},\"adminPauseMiniWallet()\":{\"details\":\"`adminPauseMiniWallet` pauses the `MiniWallet` contract\"},\"adminRemoveOperators(address[])\":{\"details\":\"`adminRemoveOperators` removes an operator (can only be called by admin)\",\"params\":{\"operatorAddresses\":\"The addresses of the operators to be removed\"}},\"adminUnpauseMiniWallet()\":{\"details\":\"`adminUnpauseMiniWallet` unpauses the `MiniWallet` contract\"},\"allowance(address,address)\":{\"details\":\"`allowance` returns the number of tokens the `owner` has allowed the `operator` to send to the user.\",\"params\":{\"owner\":\"The owner of the native tokens\",\"spender\":\"The recipient of the native tokens\"},\"returns\":{\"_0\":\"Number of tokens allowed\"}},\"approve(address,uint256)\":{\"details\":\"`approve` approves an amount of native tokens that the operator is allowed to send on behalf of the `msg.sender` to the `spender`. The amount needs to be less than the `globalUserAuthLimit` and the `owner` and `spender` cannot be the zero address. Also if funds are sent they are deposited to the users account, if the value and the users current balance exceeds the `globalUserLimit` the transaction is rejected.\",\"params\":{\"amount\":\"The amount of native tokens approved.\",\"spender\":\"The approved recipient of the native tokens.\"},\"returns\":{\"_0\":\"true if the amount is approved\"}},\"deposit()\":{\"details\":\"`deposit` allows a user to deposit funds to the `MiniWallet` contract. It uses `msg.sender` to determine the user and the `msg.value` to determine the amount to deposit. The `amount` deposited needs to be less than or equal to the `globalUserLimit`\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"getRoleMember(bytes32,uint256)\":{\"details\":\"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.\"},\"getRoleMemberCount(bytes32)\":{\"details\":\"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(uint8,address[],uint256,uint256)\":{\"details\":\"`initialize` initializes the MiniWallet contract. It should be called directly after the deploy. It is used instead of a `constructor` as the `MiniWallet` is upgradeable. The `msg.sender` is granted the `DEFAULT_ADMIN_ROLE`.\",\"params\":{\"globalUserAuthLimit_\":\"The initial limit of how many native tokens a user can approve for a recipient\",\"globalUserLimit_\":\"The initial limit of how many native tokens a user can deposit\",\"initialOperatorThreshold\":\"The initial maximum number of operators allowed\",\"initialOperators\":\"The address of the initial operators (each will be granted the `OPERATOR_ROLE`)\"}},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"proxiableUUID()\":{\"details\":\"Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate that the this implementation remains valid after an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.\"},\"renounceAdmin(address)\":{\"details\":\"`renounceAdmin` can only be called by the current administrator It creates a new administrator and renounce the administrator role from the `msg.sender`\",\"params\":{\"newAdmin\":\"the new administrator\"}},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event.\"},\"send(uint256,address,address)\":{\"details\":\"`send` is called by an `operator` to send native tokens on behalf of the user. It checks the approved amount for the from and to combination and decreases the approved amount by the amount sent.\",\"params\":{\"amount\":\"The amount of native tokens to send.\",\"from\":\"The account on whose behalf the operator is sending the native tokens from\",\"to\":\"The recipient of the native tokens.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"transfer(uint256,uint8,uint256,address,address,address)\":{\"details\":\"`transfer` transfers tokens (ERC20, ERC721, ERC1155). The user account must have previously approved the `MiniWallet` contract to send the funds.\",\"params\":{\"amount\":\"The amount of the token sent\",\"from\":\"The sender of the token\",\"to\":\"The recipient of the token\",\"tokenAddress\":\"the address of the token contract\",\"tokenType\":\"an enumerated value indicating the type of token being sent\"}},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.\"},\"withdraw(uint256)\":{\"details\":\"`withdraw` withdraws an `amount` of native tokens (previously deposited by the user) and transfers them back to the user. `msg.sender` is used to determine the user. If a zero amount is passed then all the native tokens held for that user are withdrawn.\",\"params\":{\"amount\":\"The amount of native tokens to withdraw (zero means withdraw all tokens held for the user)\"}}},\"stateVariables\":{\"OPERATOR_ROLE\":{\"details\":\"`OPERATOR_ROLE` is the role assigned to operators\"},\"_allowances\":{\"details\":\"`_allowances` is a two layer mapping tracking the allowance each user has given each recipient. It is a many to one relationship i.e. One User can create allowances for multiple recipients.\"},\"globalUserAuthLimit\":{\"details\":\"The global limit for the amount of Native Tokens a user can authorize per recipient This value is checked when creating allowances.\"},\"globalUserLimit\":{\"details\":\"The global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract. This value is checked when depositing funds.\"},\"operatorThreshold\":{\"details\":\"`operatorThreshold` tracks the maximum number of allowed operators Operators are responsible for transferring tokens on the users behalf. There may be more than one `operator` per `relayer` A `relayer` is an api server which interacts with the client (e.g. sms-wallet). Multiple relayers can be run for performance and load balancing reasons.\"},\"userBalances\":{\"details\":\"This mapping tracks the balances of native tokens stored in the MiniWallet contract for each user\"}},\"title\":\"An asset management contract for low value tokens and assets.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This contract allows users to transfer native tokens and authorize recipients (such as games) to receive these tokens. Once approved it can transfer the native tokens on behalf of the user. It also can transfer ERC20, ERC721 and ERC1155 tokens on behalf of the user, after the user approves the MiniWallet contract to do so.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/miniWallet/MiniWallet.sol\":\"MiniWallet\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"./AccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/structs/EnumerableSetUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\\n */\\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\\n function __AccessControlEnumerable_init() internal onlyInitializing {\\n }\\n\\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\\n }\\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\\n\\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\\n return _roleMembers[role].at(index);\\n }\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\\n return _roleMembers[role].length();\\n }\\n\\n /**\\n * @dev Overload {_grantRole} to track enumerable memberships\\n */\\n function _grantRole(bytes32 role, address account) internal virtual override {\\n super._grantRole(role, account);\\n _roleMembers[role].add(account);\\n }\\n\\n /**\\n * @dev Overload {_revokeRole} to track enumerable memberships\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual override {\\n super._revokeRole(role, account);\\n _roleMembers[role].remove(account);\\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\",\"keccak256\":\"0xc2dfd6ba9449f61b6b03b262182faf302f093a8c05dd10792aeecb4ed1663c0c\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../utils/StringsUpgradeable.sol\\\";\\nimport \\\"../utils/introspection/ERC165Upgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\\n function __AccessControl_init() internal onlyInitializing {\\n }\\n\\n function __AccessControl_init_unchained() internal onlyInitializing {\\n }\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role);\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n StringsUpgradeable.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n StringsUpgradeable.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * May emit a {RoleGranted} event.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleGranted} event.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n *\\n * May emit a {RoleRevoked} event.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n\\n /**\\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\",\"keccak256\":\"0x2ea9f206854c98b67dd228f8cad22bfe90ba7b1c2295315672f2e1e244623fc3\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlEnumerableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControlUpgradeable.sol\\\";\\n\\n/**\\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\\n */\\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\\n /**\\n * @dev Returns one of the accounts that have `role`. `index` must be a\\n * value between 0 and {getRoleMemberCount}, non-inclusive.\\n *\\n * Role bearers are not sorted in any particular way, and their ordering may\\n * change at any point.\\n *\\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\\n * you perform all queries on the same block. See the following\\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\\n * for more information.\\n */\\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\\n\\n /**\\n * @dev Returns the number of accounts that have `role`. Can be used\\n * together with {getRoleMember} to enumerate all bearers of a role.\\n */\\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x7acbc538aad6eb4614e26612a8c5c0149bb8808db95e2638d245a8365f63e572\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControlUpgradeable {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa\",\"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.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeaconUpgradeable.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 *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\\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 Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\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(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (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 Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\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 Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\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(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\\n }\\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(address target, bytes memory data) private returns (bytes memory) {\\n require(AddressUpgradeable.isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return AddressUpgradeable.verifyCallResult(success, returndata, \\\"Address: low-level delegate call failed\\\");\\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\":\"0x315887e846f1e5f8d8fa535a229d318bb9290aaa69485117f1ee8a9a6b3be823\",\"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.7.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 * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\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. Equivalent to `reinitializer(1)`.\\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\\n * initialization step. This is essential to configure modules that are added through upgrades and that require\\n * initialization.\\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 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 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\",\"keccak256\":\"0x0203dcadc5737d9ef2c211d6fa15d18ebc3b30dfa51903b64870b01a062b0b4e\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 that the this implementation remains valid after 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 function upgradeTo(address newImplementation) external 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 function upgradeToAndCall(address newImplementation, bytes memory data) external 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\":\"0x6e36e9b4b71de699c2f3f0d4e4d1aa0b35da99a26e8d5b91ef09ba234b4ef270\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n function __Pausable_init() internal onlyInitializing {\\n __Pausable_init_unchained();\\n }\\n\\n function __Pausable_init_unchained() internal onlyInitializing {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\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\",\"keccak256\":\"0x40c636b4572ff5f1dc50cf22097e93c0723ee14eff87e99ac2b02636eeca1250\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.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 *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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}\\n\",\"keccak256\":\"0x611aa3f23e59cfdd1863c536776407b3e33d695152a266fa7cfb34440a29a8a3\",\"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.7.0) (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary 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 /**\\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\",\"keccak256\":\"0x09864aea84f01e39313375b5610c73a3c1c68abbdc51e5ccdd25ff977fdadf9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xea5339a7fff0ed42b45be56a88efdd0b2ddde9fa480dc99fef9a6a4c5b776863\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n } else if (error == RecoverError.InvalidSignatureV) {\\n revert(\\\"ECDSA: invalid signature 'v' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n if (v != 27 && v != 28) {\\n return (address(0), RecoverError.InvalidSignatureV);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xbf5daf926894541a40a64b43c3746aa1940c5a1b3b8d14a06465eea72a9b90cc\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./ECDSAUpgradeable.sol\\\";\\nimport \\\"../../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\\n *\\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\\n *\\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\\n * ({_hashTypedDataV4}).\\n *\\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\\n * the chain id to protect against replay attacks on an eventual fork of the chain.\\n *\\n * NOTE: This contract implements the version of the encoding known as \\\"v4\\\", as implemented by the JSON RPC method\\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\\n *\\n * _Available since v3.4._\\n *\\n * @custom:storage-size 52\\n */\\nabstract contract EIP712Upgradeable is Initializable {\\n /* solhint-disable var-name-mixedcase */\\n bytes32 private _HASHED_NAME;\\n bytes32 private _HASHED_VERSION;\\n bytes32 private constant _TYPE_HASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\");\\n\\n /* solhint-enable var-name-mixedcase */\\n\\n /**\\n * @dev Initializes the domain separator and parameter caches.\\n *\\n * The meaning of `name` and `version` is specified in\\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\\n *\\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\\n * - `version`: the current major version of the signing domain.\\n *\\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\\n * contract upgrade].\\n */\\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\\n __EIP712_init_unchained(name, version);\\n }\\n\\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\\n bytes32 hashedName = keccak256(bytes(name));\\n bytes32 hashedVersion = keccak256(bytes(version));\\n _HASHED_NAME = hashedName;\\n _HASHED_VERSION = hashedVersion;\\n }\\n\\n /**\\n * @dev Returns the domain separator for the current chain.\\n */\\n function _domainSeparatorV4() internal view returns (bytes32) {\\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\\n }\\n\\n function _buildDomainSeparator(\\n bytes32 typeHash,\\n bytes32 nameHash,\\n bytes32 versionHash\\n ) private view returns (bytes32) {\\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\\n }\\n\\n /**\\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\\n * function returns the hash of the fully encoded EIP712 message for this domain.\\n *\\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\\n *\\n * ```solidity\\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\\n * keccak256(\\\"Mail(address to,string contents)\\\"),\\n * mailTo,\\n * keccak256(bytes(mailContents))\\n * )));\\n * address signer = ECDSA.recover(digest, signature);\\n * ```\\n */\\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\\n }\\n\\n /**\\n * @dev The hash of the name parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712NameHash() internal virtual view returns (bytes32) {\\n return _HASHED_NAME;\\n }\\n\\n /**\\n * @dev The hash of the version parameter for the EIP712 domain.\\n *\\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\\n * are a concern.\\n */\\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\\n return _HASHED_VERSION;\\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\":\"0xaf5a96100f421d61693605349511e43221d3c2e47d4b3efa87af2b936e2567fc\",\"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-upgradeable/utils/math/SafeMathUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMathUpgradeable {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xcaa8b7861115ea691c77ddbeac140a444e0edcd1d9812a43942c0f6b42b36a49\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSetUpgradeable {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position of the value in the `values` array, plus 1 because index 0\\n // means a value is not in the set.\\n mapping(bytes32 => uint256) _indexes;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._indexes[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We read and store the value's index to prevent multiple reads from the same storage slot\\n uint256 valueIndex = set._indexes[value];\\n\\n if (valueIndex != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 toDeleteIndex = valueIndex - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (lastIndex != toDeleteIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the last value to the index where the value to delete is\\n set._values[toDeleteIndex] = lastValue;\\n // Update the index for the moved value\\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the index for the deleted slot\\n delete set._indexes[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._indexes[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n return _values(set._inner);\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x8defa7c9cc7cc4eb529daff535eff833f76a4cb424f85a08524eeea15e071a55\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not token owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\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 * - `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(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\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 * - 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[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\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 _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x447a21c87433c0f11252912313a96f3454629ef88cca7a4eefbb283b3ec409f9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.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 IERC1155 is IERC165 {\\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(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n 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(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) 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\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.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/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\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\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n }\\n _balances[to] += amount;\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x24b04b8aacaaf1a4a0719117b29c9c3647b1f479c5ac2a60f5ff1bb6d839c238\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC721.sol\\\";\\nimport \\\"./IERC721Receiver.sol\\\";\\nimport \\\"./extensions/IERC721Metadata.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/Strings.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\\n * {ERC721Enumerable}.\\n */\\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\\n using Address for address;\\n using Strings for uint256;\\n\\n // Token name\\n string private _name;\\n\\n // Token symbol\\n string private _symbol;\\n\\n // Mapping from token ID to owner address\\n mapping(uint256 => address) private _owners;\\n\\n // Mapping owner address to token count\\n mapping(address => uint256) private _balances;\\n\\n // Mapping from token ID to approved address\\n mapping(uint256 => address) private _tokenApprovals;\\n\\n // Mapping from owner to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC721).interfaceId ||\\n interfaceId == type(IERC721Metadata).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC721-balanceOf}.\\n */\\n function balanceOf(address owner) public view virtual override returns (uint256) {\\n require(owner != address(0), \\\"ERC721: address zero is not a valid owner\\\");\\n return _balances[owner];\\n }\\n\\n /**\\n * @dev See {IERC721-ownerOf}.\\n */\\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\\n address owner = _owners[tokenId];\\n require(owner != address(0), \\\"ERC721: invalid token ID\\\");\\n return owner;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-name}.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-symbol}.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev See {IERC721Metadata-tokenURI}.\\n */\\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\\n _requireMinted(tokenId);\\n\\n string memory baseURI = _baseURI();\\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \\\"\\\";\\n }\\n\\n /**\\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\\n * by default, can be overridden in child contracts.\\n */\\n function _baseURI() internal view virtual returns (string memory) {\\n return \\\"\\\";\\n }\\n\\n /**\\n * @dev See {IERC721-approve}.\\n */\\n function approve(address to, uint256 tokenId) public virtual override {\\n address owner = ERC721.ownerOf(tokenId);\\n require(to != owner, \\\"ERC721: approval to current owner\\\");\\n\\n require(\\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\\n \\\"ERC721: approve caller is not token owner nor approved for all\\\"\\n );\\n\\n _approve(to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-getApproved}.\\n */\\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\\n _requireMinted(tokenId);\\n\\n return _tokenApprovals[tokenId];\\n }\\n\\n /**\\n * @dev See {IERC721-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC721-isApprovedForAll}.\\n */\\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[owner][operator];\\n }\\n\\n /**\\n * @dev See {IERC721-transferFrom}.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n //solhint-disable-next-line max-line-length\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner nor approved\\\");\\n\\n _transfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) public virtual override {\\n safeTransferFrom(from, to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev See {IERC721-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) public virtual override {\\n require(_isApprovedOrOwner(_msgSender(), tokenId), \\\"ERC721: caller is not token owner nor approved\\\");\\n _safeTransfer(from, to, tokenId, data);\\n }\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\\n *\\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\\n * implement alternative mechanisms to perform token transfer, such as signature-based.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeTransfer(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) internal virtual {\\n _transfer(from, to, tokenId);\\n require(_checkOnERC721Received(from, to, tokenId, data), \\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n }\\n\\n /**\\n * @dev Returns whether `tokenId` exists.\\n *\\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\\n *\\n * Tokens start existing when they are minted (`_mint`),\\n * and stop existing when they are burned (`_burn`).\\n */\\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\\n return _owners[tokenId] != address(0);\\n }\\n\\n /**\\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\\n address owner = ERC721.ownerOf(tokenId);\\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\\n }\\n\\n /**\\n * @dev Safely mints `tokenId` and transfers it to `to`.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _safeMint(address to, uint256 tokenId) internal virtual {\\n _safeMint(to, tokenId, \\\"\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\\n */\\n function _safeMint(\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) internal virtual {\\n _mint(to, tokenId);\\n require(\\n _checkOnERC721Received(address(0), to, tokenId, data),\\n \\\"ERC721: transfer to non ERC721Receiver implementer\\\"\\n );\\n }\\n\\n /**\\n * @dev Mints `tokenId` and transfers it to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\\n *\\n * Requirements:\\n *\\n * - `tokenId` must not exist.\\n * - `to` cannot be the zero address.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _mint(address to, uint256 tokenId) internal virtual {\\n require(to != address(0), \\\"ERC721: mint to the zero address\\\");\\n require(!_exists(tokenId), \\\"ERC721: token already minted\\\");\\n\\n _beforeTokenTransfer(address(0), to, tokenId);\\n\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(address(0), to, tokenId);\\n\\n _afterTokenTransfer(address(0), to, tokenId);\\n }\\n\\n /**\\n * @dev Destroys `tokenId`.\\n * The approval is cleared when the token is burned.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _burn(uint256 tokenId) internal virtual {\\n address owner = ERC721.ownerOf(tokenId);\\n\\n _beforeTokenTransfer(owner, address(0), tokenId);\\n\\n // Clear approvals\\n _approve(address(0), tokenId);\\n\\n _balances[owner] -= 1;\\n delete _owners[tokenId];\\n\\n emit Transfer(owner, address(0), tokenId);\\n\\n _afterTokenTransfer(owner, address(0), tokenId);\\n }\\n\\n /**\\n * @dev Transfers `tokenId` from `from` to `to`.\\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual {\\n require(ERC721.ownerOf(tokenId) == from, \\\"ERC721: transfer from incorrect owner\\\");\\n require(to != address(0), \\\"ERC721: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, tokenId);\\n\\n // Clear approvals from the previous owner\\n _approve(address(0), tokenId);\\n\\n _balances[from] -= 1;\\n _balances[to] += 1;\\n _owners[tokenId] = to;\\n\\n emit Transfer(from, to, tokenId);\\n\\n _afterTokenTransfer(from, to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `to` to operate on `tokenId`\\n *\\n * Emits an {Approval} event.\\n */\\n function _approve(address to, uint256 tokenId) internal virtual {\\n _tokenApprovals[tokenId] = to;\\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC721: approve to caller\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Reverts if the `tokenId` has not been minted yet.\\n */\\n function _requireMinted(uint256 tokenId) internal view virtual {\\n require(_exists(tokenId), \\\"ERC721: invalid token ID\\\");\\n }\\n\\n /**\\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\\n * The call is not executed if the target address is not a contract.\\n *\\n * @param from address representing the previous owner of the given token ID\\n * @param to target address that will receive the tokens\\n * @param tokenId uint256 ID of the token to be transferred\\n * @param data bytes optional data to send along with the call\\n * @return bool whether the call correctly returned the expected magic value\\n */\\n function _checkOnERC721Received(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes memory data\\n ) private returns (bool) {\\n if (to.isContract()) {\\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\\n return retval == IERC721Receiver.onERC721Received.selector;\\n } catch (bytes memory reason) {\\n if (reason.length == 0) {\\n revert(\\\"ERC721: transfer to non ERC721Receiver implementer\\\");\\n } else {\\n /// @solidity memory-safe-assembly\\n assembly {\\n revert(add(32, reason), mload(reason))\\n }\\n }\\n }\\n } else {\\n return true;\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning.\\n *\\n * Calling conditions:\\n *\\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\\n * transferred to `to`.\\n * - When `from` is zero, `tokenId` will be minted for `to`.\\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x0b606994df12f0ce35f6d2f6dcdde7e55e6899cdef7e00f180980caa81e3844e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xed6a749c5373af398105ce6ee3ac4763aa450ea7285d268c85d9eeca809cdb1f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.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 IERC721Receiver {\\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\",\"keccak256\":\"0xa82b58eca1ee256be466e536706850163d2ec7821945abd6b4778cfb3bee37da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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}\\n\",\"keccak256\":\"0xd6153ce99bcdcce22b124f755e72553295be6abcd63804cfdffceb188b8bef10\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xaf159a8b1923ad2a26d516089bceca9bdeaeacd04be50983ea00ba63070f08a3\",\"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/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\"},\"contracts/miniWallet/MiniWallet.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.9;\\n\\n// import \\\"hardhat/console.sol\\\";\\nimport \\\"./libraries/SafeCast.sol\\\";\\nimport \\\"./libraries/Enums.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\n\\n/**\\n @title An asset management contract for low value tokens and assets.\\n @author John Whitton https://github.com/johnwhitton/\\n @notice This contract allows users to transfer native tokens and authorize recipients\\n (such as games) to receive these tokens. Once approved it can transfer the native tokens on behalf of the user.\\n It also can transfer ERC20, ERC721 and ERC1155 tokens on behalf of the user, after the user approves the MiniWallet contract to do so.\\n @dev The MiniWallet is designed to simplify management and transfer of tokens\\n by light clients such as the sms-wallet.\\n */\\ncontract MiniWallet is\\n Initializable,\\n PausableUpgradeable,\\n AccessControlEnumerableUpgradeable,\\n UUPSUpgradeable,\\n EIP712Upgradeable\\n{\\n using SafeCast for *;\\n using SafeMathUpgradeable for uint256;\\n\\n /**\\n * @dev Emitted when a `user` deposits native tokens (`amount`) into the MiniWallet\\n * `balance` is the users new balance held.\\n * @param user The user depositing the native token\\n * @param amount The amount of native tokens deposited\\n * @param balance The users balance of native tokens held by the MiniWallet contract after the deposit\\n */\\n event DepositSuccessful(\\n address indexed user,\\n uint256 amount,\\n uint256 balance\\n );\\n\\n /**\\n * @dev Emitted when a `user` withdraws native tokens (`amount`) from the MiniWallet\\n * `balance` is the users new balance held.\\n * @param user The user withdrawing the native token\\n * @param amount The amount of native tokens withdrawn\\n * @param balance The users balance of native tokens held by the MiniWallet contract after the withdrawal\\n */\\n event WithdrawalSuccessful(\\n address indexed user,\\n uint256 amount,\\n uint256 balance\\n );\\n\\n /**\\n * @dev Emitted when an attempt by a `user` to withdraw native tokens `amount` fails\\n * `balance` is the users balance held and `reason` gives the reason for failure.\\n * e.g. `Insufficient Locked Funds to Withdraw`.\\n * @param user The user attempting to withdraw the native token\\n * @param amount The amount of native tokens requested to withdraw\\n * @param balance The users balance of native tokens held by the MiniWallet contract\\n */\\n error WithdrawalFailed(\\n address user,\\n uint256 amount,\\n uint256 balance,\\n string reason\\n );\\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 * @param owner The owner of the native token which are being approved\\n * @param spender The spender who can spend the native tokens (actual transferring of the funds is done by the operator)\\n * @param allowance The allowance of native tokens which can be transferred by the MiniWallet Operator to the spender\\n */\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 allowance\\n );\\n\\n /**\\n * @dev Emitted when native tokens have been successfully sent by the operator on behalf of the `from` account\\n * @param from The sender of the native token\\n * @param to The recipient of the native token\\n * @param amount The amount of native token sent\\n * @param newBalance The updated balance of native tokens held by the MiniWallet contract on behalf of the user\\n * @param newAllowance The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender\\n */\\n event SendSuccessful(\\n address indexed from,\\n address indexed to,\\n uint256 amount,\\n uint256 newBalance,\\n uint256 newAllowance\\n );\\n\\n /**\\n * @dev Emitted when attempting to send native tokens by the operator on behalf of the `from` account to the `to` account fails\\n * e.g. if they have insufficient native tokens locked or insufficient funds approved for the to account\\n * @param from The sender of the native token\\n * @param to The recipient of the native token\\n * @param amount The amount of native token sent\\n * @param balance The updated balance of native tokens held by the MiniWallet contract on behalf of the user\\n * @param allowance The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender\\n * @param reason The reason the Send Failed\\n */\\n error SendFailed(\\n address from,\\n address to,\\n uint256 amount,\\n uint256 balance,\\n uint256 allowance,\\n string reason\\n );\\n\\n /**\\n * @dev Emitted when transferring tokens (ERC20, ERC721, ERC1155) by the operator on behalf of the `from` account to the `to` account\\n * @param amount The amount of the token sent\\n * @param tokenType an enumerated value indicating the type of token being sent\\n * @param tokenAddress the address of the token contract\\n * @param from The sender of the token\\n * @param to The recipient of the token\\n */\\n event TransferSuccessful(\\n uint256 amount,\\n Enums.TokenType tokenType,\\n uint256 tokenId,\\n address tokenAddress,\\n address indexed from,\\n address indexed to\\n );\\n\\n /**\\n * @dev Emitted when an attempt to transfer tokens (ERC20, ERC721, ERC1155) by the operator on behalf of the `from` account to the `to` account fails\\n * @param amount The amount of the token sent\\n * @param tokenType an enumerated value indicating the type of token being sent\\n * @param tokenAddress the address of the token contract\\n * @param from The sender of the token\\n * @param to The recipient of the token\\n * @param reason The reason for the failure\\n */\\n error TransferFailed(\\n uint256 amount,\\n Enums.TokenType tokenType,\\n uint256 tokenId,\\n address tokenAddress,\\n address from,\\n address to,\\n string reason\\n );\\n\\n /**\\n * @dev Emitted when the `DEFAULT_ADMIN` updates the maximum number of operators allowed\\n * @param newThreshold The updated maximum number of operators\\n */\\n event OperatorThresholdChanged(uint256 newThreshold);\\n\\n /**\\n * @dev Emitted when the `DEFAULT_ADMIN` adds some operators\\n * @param operators The operators added\\n */\\n event OperatorsAdded(address[] operators);\\n\\n /**\\n * @dev Emitted when the `DEFAULT_ADMIN` removes some operators\\n * @param operators The operators removed\\n */\\n event OperatorsRemoved(address[] operators);\\n\\n /**\\n * @dev Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can authorize per recipient\\n * @param newGlobalUserAuthLimit The updated global limit of native tokens a user can authorize\\n */\\n event GlobalUserAuthLimitChanged(uint256 newGlobalUserAuthLimit);\\n\\n /**\\n * @dev Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract\\n * @param newGlobalUserLimit The updated global limit of native tokens a user can hold\\n */\\n event GlobalUserLimitChanged(uint256 newGlobalUserLimit);\\n\\n /**\\n * @dev The global limit for the amount of Native Tokens a user can authorize per recipient\\n * This value is checked when creating allowances.\\n */\\n uint256 public globalUserAuthLimit;\\n\\n /**\\n * @dev The global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract.\\n * This value is checked when depositing funds.\\n */\\n uint256 public globalUserLimit;\\n\\n /**\\n * @dev This mapping tracks the balances of native tokens stored in the MiniWallet contract for each user\\n */\\n mapping(address => uint256) public userBalances;\\n\\n /**\\n * @dev `_allowances` is a two layer mapping tracking the allowance each user has given each recipient.\\n * It is a many to one relationship i.e. One User can create allowances for multiple recipients.\\n */\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n /**\\n * @dev `operatorThreshold` tracks the maximum number of allowed operators\\n * Operators are responsible for transferring tokens on the users behalf.\\n * There may be more than one `operator` per `relayer`\\n * A `relayer` is an api server which interacts with the client (e.g. sms-wallet).\\n * Multiple relayers can be run for performance and load balancing reasons.\\n */\\n uint8 public operatorThreshold;\\n\\n /**\\n * @dev `OPERATOR_ROLE` is the role assigned to operators\\n */\\n bytes32 public constant OPERATOR_ROLE = keccak256(\\\"OPERATOR_ROLE\\\");\\n bytes32 public constant UPGRADER_ROLE = keccak256(\\\"UPGRADER_ROLE\\\");\\n\\n /**\\n * @dev `onlyAdmin` modifier is used on functions which only administrators can run\\n * e.g. Updating global limits or operator Thresholds and pausing the MiniWallet contract.\\n */\\n modifier onlyAdmin() {\\n require(\\n hasRole(DEFAULT_ADMIN_ROLE, msg.sender),\\n \\\"sender doesn't have admin role\\\"\\n );\\n _;\\n }\\n\\n /**\\n * @dev `onlyOperators` modifier is used on functions which only operators can run\\n * e.g. Transferring tokens on behalf of users.\\n */\\n modifier onlyOperators() {\\n require(\\n hasRole(OPERATOR_ROLE, msg.sender),\\n \\\"sender doesn't have operator role\\\"\\n );\\n _;\\n }\\n\\n /**\\n * @dev `adminPauseMiniWallet` pauses the `MiniWallet` contract\\n */\\n function adminPauseMiniWallet() external onlyAdmin {\\n _pause();\\n }\\n\\n /**\\n * @dev `adminUnpauseMiniWallet` unpauses the `MiniWallet` contract\\n */\\n function adminUnpauseMiniWallet() external onlyAdmin {\\n _unpause();\\n }\\n\\n /**\\n * @dev `renounceAdmin` can only be called by the current administrator\\n * It creates a new administrator and renounce the administrator role from the `msg.sender`\\n * @param newAdmin the new administrator\\n */\\n function renounceAdmin(address newAdmin) external onlyAdmin {\\n require(msg.sender != newAdmin, \\\"cannot renounce self\\\");\\n grantRole(DEFAULT_ADMIN_ROLE, newAdmin);\\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n /**\\n * @dev `adminChangeOperatorThreshold` updates the maximum number of allowed operators\\n * @param newThreshold The updated maximum number of operators\\n */\\n function adminChangeOperatorThreshold(uint256 newThreshold)\\n external\\n onlyAdmin\\n {\\n operatorThreshold = newThreshold.toUint8();\\n emit OperatorThresholdChanged(newThreshold);\\n }\\n\\n /**\\n * @dev `adminAddOperators` adds some new operators (can only be called by admin)\\n * @param operatorAddresses The addresses of the new operators\\n */\\n function adminAddOperators(address[] calldata operatorAddresses)\\n external\\n onlyAdmin\\n {\\n for (uint256 i = 0; i < operatorAddresses.length; i++) {\\n address operatorAddress = operatorAddresses[i];\\n require(\\n !hasRole(OPERATOR_ROLE, operatorAddress),\\n \\\"already has operator role\\\"\\n );\\n require(\\n (getRoleMemberCount(OPERATOR_ROLE) < operatorThreshold),\\n \\\"too many operators\\\"\\n );\\n grantRole(OPERATOR_ROLE, operatorAddress);\\n }\\n emit OperatorsAdded(operatorAddresses);\\n }\\n\\n /**\\n * @dev `adminRemoveOperators` removes an operator (can only be called by admin)\\n * @param operatorAddresses The addresses of the operators to be removed\\n */\\n function adminRemoveOperators(address[] calldata operatorAddresses)\\n external\\n onlyAdmin\\n {\\n for (uint256 i = 0; i < operatorAddresses.length; i++) {\\n address operatorAddress = operatorAddresses[i];\\n require(\\n hasRole(OPERATOR_ROLE, operatorAddress),\\n \\\"removing non-operator\\\"\\n );\\n revokeRole(OPERATOR_ROLE, operatorAddress);\\n }\\n emit OperatorsRemoved(operatorAddresses);\\n }\\n\\n /**\\n * @dev `adminChangeGlobalUserLimit` updates the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract.\\n * This value is checked when depositing funds.\\n * This function can only be called by the administrator.\\n * @param newGlobalUserLimit The updated global limit.\\n */\\n function adminChangeGlobalUserLimit(uint256 newGlobalUserLimit)\\n external\\n onlyAdmin\\n {\\n globalUserLimit = newGlobalUserLimit;\\n emit GlobalUserLimitChanged(newGlobalUserLimit);\\n }\\n\\n /**\\n * @dev `adminChangeGlobalUserAuthLimit` updates the global limit for the amount of Native Tokens a user can authorize per recipient\\n * This value is checked when creating allowances.\\n * This function can only be called by an administrator\\n * @param newGlobalUserAuthLimit updated Global User Auth Limit\\n */\\n function adminChangeGlobalUserAuthLimit(uint256 newGlobalUserAuthLimit)\\n external\\n onlyAdmin\\n {\\n globalUserAuthLimit = newGlobalUserAuthLimit;\\n emit GlobalUserAuthLimitChanged(newGlobalUserAuthLimit);\\n }\\n\\n /**\\n * @dev `initialize` initializes the MiniWallet contract. It should be called directly after the deploy.\\n * It is used instead of a `constructor` as the `MiniWallet` is upgradeable.\\n * The `msg.sender` is granted the `DEFAULT_ADMIN_ROLE`.\\n * @param initialOperatorThreshold The initial maximum number of operators allowed\\n * @param initialOperators The address of the initial operators (each will be granted the `OPERATOR_ROLE`)\\n * @param globalUserLimit_ The initial limit of how many native tokens a user can deposit\\n * @param globalUserAuthLimit_ The initial limit of how many native tokens a user can approve for a recipient\\n */\\n function initialize(\\n uint8 initialOperatorThreshold,\\n address[] calldata initialOperators,\\n uint256 globalUserLimit_,\\n uint256 globalUserAuthLimit_\\n ) external initializer {\\n address owner = msg.sender;\\n // solhint-disable-next-line security/no-inline-assembly\\n assembly {\\n sstore(\\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\\n owner\\n )\\n }\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _grantRole(UPGRADER_ROLE, msg.sender);\\n operatorThreshold = initialOperatorThreshold;\\n for (uint256 i; i < initialOperators.length; i++) {\\n grantRole(OPERATOR_ROLE, initialOperators[i]);\\n }\\n globalUserLimit = globalUserLimit_;\\n globalUserAuthLimit = globalUserAuthLimit_;\\n }\\n\\n /**\\n * @dev `deposit` allows a user to deposit funds to the `MiniWallet` contract.\\n * It uses `msg.sender` to determine the user and the `msg.value` to determine the amount to deposit.\\n * The `amount` deposited needs to be less than or equal to the `globalUserLimit`\\n */\\n function deposit() public payable whenNotPaused {\\n require(\\n (userBalances[address(msg.sender)] + msg.value) <= globalUserLimit,\\n \\\"MiniWallet: deposit greater than global limit\\\"\\n );\\n userBalances[msg.sender] += msg.value;\\n // update the userBalance\\n emit DepositSuccessful(msg.sender, msg.value, userBalances[msg.sender]);\\n }\\n\\n /**\\n * @dev `withdraw` withdraws an `amount` of native tokens (previously deposited by the user) and transfers them back to the user.\\n * `msg.sender` is used to determine the user. If a zero amount is passed then all the native tokens held for that user are withdrawn.\\n * @param amount The amount of native tokens to withdraw (zero means withdraw all tokens held for the user)\\n */\\n function withdraw(uint256 amount) public whenNotPaused {\\n uint256 balance = userBalances[msg.sender];\\n // if zero is passed withdraw all funds\\n if (amount == 0) {\\n amount = balance;\\n }\\n // check msg.senders balance\\n if (amount > balance) {\\n revert WithdrawalFailed(\\n msg.sender,\\n amount,\\n balance,\\n \\\"Insufficient locked funds to withdraw\\\"\\n );\\n }\\n\\n // withdraw funds from the contract (update userBalance before transfer to protect from reentrancy attack)\\n uint256 newBalance = balance - amount;\\n userBalances[msg.sender] = newBalance;\\n payable(msg.sender).transfer(amount);\\n\\n // update the userBalance\\n emit WithdrawalSuccessful(\\n msg.sender,\\n amount,\\n userBalances[address(msg.sender)]\\n );\\n }\\n\\n /**\\n * @dev `allowance` returns the number of tokens the `owner` has allowed the `operator` to send to the user.\\n * @param owner The owner of the native tokens\\n * @param spender The recipient of the native tokens\\n * @return Number of tokens allowed\\n */\\n function allowance(address owner, address spender)\\n public\\n view\\n returns (uint256)\\n {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev `approve` approves an amount of native tokens that the operator is allowed to send on behalf of the `msg.sender` to the `spender`.\\n * The amount needs to be less than the `globalUserAuthLimit` and the `owner` and `spender` cannot be the zero address.\\n * Also if funds are sent they are deposited to the users account, if the value and the users current balance exceeds the `globalUserLimit`\\n * the transaction is rejected.\\n * @param spender The approved recipient of the native tokens.\\n * @param amount The amount of native tokens approved.\\n * @return true if the amount is approved\\n */\\n function approve(address spender, uint256 amount)\\n public\\n payable\\n whenNotPaused\\n returns (bool)\\n {\\n address owner = msg.sender;\\n require(\\n owner != address(0),\\n \\\"MiniWallet: approve from the zero address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"MiniWallet: approve to the zero address\\\"\\n );\\n require(\\n amount <= globalUserAuthLimit,\\n \\\"MiniWallet: approve greater than global limit\\\"\\n );\\n if (msg.value > 0) {\\n deposit();\\n }\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev `send` is called by an `operator` to send native tokens on behalf of the user.\\n * It checks the approved amount for the from and to combination and decreases the approved amount by the amount sent.\\n * @param amount The amount of native tokens to send.\\n * @param from The account on whose behalf the operator is sending the native tokens from\\n * @param to The recipient of the native tokens.\\n */\\n function send(\\n uint256 amount,\\n address from,\\n address to\\n ) public onlyOperators whenNotPaused {\\n uint256 balance = userBalances[from];\\n uint256 currentAllowance = allowance(from, to);\\n if (amount == 0) {\\n revert SendFailed(\\n from,\\n to,\\n amount,\\n balance,\\n currentAllowance,\\n \\\"Send amount cannot equal 0\\\"\\n );\\n }\\n // check from balance\\n if (amount > balance) {\\n revert SendFailed(\\n from,\\n to,\\n amount,\\n balance,\\n currentAllowance,\\n \\\"Insufficient locked funds to send\\\"\\n );\\n }\\n // check from balance\\n if (amount > currentAllowance) {\\n revert SendFailed(\\n from,\\n to,\\n amount,\\n balance,\\n currentAllowance,\\n \\\"Insufficient approved funds to send\\\"\\n );\\n }\\n // withdraw funds from the contract (update userBalance before transfer to protect from reentrancy attack)\\n uint256 newBalance = balance - amount;\\n userBalances[from] = newBalance;\\n\\n // update the approved amount.\\n uint256 newLimit = currentAllowance - amount;\\n _allowances[from][to] = newLimit;\\n payable(to).transfer(amount);\\n\\n emit SendSuccessful(from, to, amount, newBalance, newLimit);\\n }\\n\\n /**\\n * @dev `transfer` transfers tokens (ERC20, ERC721, ERC1155).\\n * The user account must have previously approved the `MiniWallet` contract to send the funds.\\n * @param amount The amount of the token sent\\n * @param tokenType an enumerated value indicating the type of token being sent\\n * @param tokenAddress the address of the token contract\\n * @param from The sender of the token\\n * @param to The recipient of the token\\n */\\n function transfer(\\n uint256 amount,\\n Enums.TokenType tokenType,\\n uint256 tokenId,\\n address tokenAddress,\\n address from,\\n address to\\n ) public onlyOperators whenNotPaused {\\n if (tokenType == Enums.TokenType.ERC20) {\\n bool success = ERC20(tokenAddress).transferFrom(from, to, amount);\\n if (success) {\\n emit TransferSuccessful(\\n amount,\\n tokenType,\\n tokenId,\\n tokenAddress,\\n from,\\n to\\n );\\n } else {\\n revert TransferFailed(\\n amount,\\n tokenType,\\n tokenId,\\n tokenAddress,\\n from,\\n to,\\n \\\"ERC20 transfer failure\\\"\\n );\\n }\\n } else if (tokenType == Enums.TokenType.ERC721) {\\n ERC721(tokenAddress).safeTransferFrom(from, to, tokenId);\\n emit TransferSuccessful(\\n amount,\\n tokenType,\\n tokenId,\\n tokenAddress,\\n from,\\n to\\n );\\n } else if (tokenType == Enums.TokenType.ERC1155) {\\n ERC1155(tokenAddress).safeTransferFrom(\\n from,\\n to,\\n tokenId,\\n amount,\\n \\\"\\\"\\n );\\n emit TransferSuccessful(\\n amount,\\n tokenType,\\n tokenId,\\n tokenAddress,\\n from,\\n to\\n );\\n } else {\\n revert TransferFailed(\\n amount,\\n tokenType,\\n tokenId,\\n tokenAddress,\\n from,\\n to,\\n \\\"Invalid tokenType\\\"\\n );\\n }\\n }\\n\\n function _authorizeUpgrade(address newImplementation)\\n internal\\n override\\n onlyRole(UPGRADER_ROLE)\\n {}\\n}\\n\",\"keccak256\":\"0x95db6ef9c7b29cc8e4c2e86e02964f706f0e2ff538050c758b285cd13e54dd1d\",\"license\":\"Apache-2.0\"},\"contracts/miniWallet/libraries/Enums.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.9;\\n\\nlibrary Enums {\\n enum TokenType {\\n ERC20,\\n ERC721,\\n ERC1155,\\n NONE\\n }\\n}\\n\",\"keccak256\":\"0x15e99c4d30841b0d130342fba95c47c2d270c3bd3ac858de0024d0020e7993bc\",\"license\":\"Apache-2.0\"},\"contracts/miniWallet/libraries/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\npragma solidity ^0.8.9;\\n\\nlibrary SafeCast {\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n require(value < 2**200, \\\"value does not fit in 200 bits\\\");\\n return uint200(value);\\n }\\n\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n require(value < 2**128, \\\"value does not fit in 128 bits\\\");\\n return uint128(value);\\n }\\n\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n require(value < 2**40, \\\"value does not fit in 40 bits\\\");\\n return uint40(value);\\n }\\n\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n require(value < 2**8, \\\"value does not fit in 8 bits\\\");\\n return uint8(value);\\n }\\n}\\n\",\"keccak256\":\"0xec450d6fbe4c439e4aa7410a58f05b502aaec766fbb5503d6b72a52270f3e136\",\"license\":\"Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60a06040523060805234801561001457600080fd5b50608051612da161004c60003960008181610d7f01528181610dbf015281816111460152818161118601526112150152612da16000f3fe6080604052600436106101f95760003560e01c80635e1fab0f1161010d578063bcca7b1d116100a0578063dd62ed3e1161006f578063dd62ed3e1461058a578063e24814d6146105d1578063e2b0df8f146105fe578063f5b541a614610615578063f72c0d8b1461063757600080fd5b8063bcca7b1d14610522578063ca15c87314610542578063d0e30db014610562578063d547741f1461056a57600080fd5b806391d14854116100dc57806391d14854146104ad578063a19ba036146104cd578063a217fddf146104ed578063b4d89a071461050257600080fd5b80635e1fab0f1461042057806378226fe71461044057806379c0fb6e146104555780639010d07c1461047557600080fd5b80632e1a7d4d116101905780633d0594d41161015f5780633d0594d4146103a95780634f1ef286146103c957806352d1902d146103dc578063562c2d1d146103f15780635c975abb1461040857600080fd5b80632e1a7d4d146103295780632f2ff15d1461034957806336568abe146103695780633659cfe61461038957600080fd5b80631322a2a5116101cc5780631322a2a51461027d578063248a9ca31461029d57806326224c64146102db5780632752a46e1461030957600080fd5b806301ffc9a7146101fe5780630227c93614610233578063095ea7b31461024a5780630c8a263c1461025d575b600080fd5b34801561020a57600080fd5b5061021e6102193660046124df565b61066b565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b50610248610696565b005b61021e610258366004612525565b6106d0565b34801561026957600080fd5b5061024861027836600461254f565b61087e565b34801561028957600080fd5b506102486102983660046125b4565b6108fa565b3480156102a957600080fd5b506102cd6102b836600461254f565b60009081526097602052604090206001015490565b60405190815260200161022a565b3480156102e757600080fd5b506102cd6102f63660046125f6565b6101956020526000908152604090205481565b34801561031557600080fd5b506102486103243660046125b4565b610a1c565b34801561033557600080fd5b5061024861034436600461254f565b610b9b565b34801561035557600080fd5b50610248610364366004612611565b610ccc565b34801561037557600080fd5b50610248610384366004612611565b610cf6565b34801561039557600080fd5b506102486103a43660046125f6565b610d74565b3480156103b557600080fd5b506102486103c436600461263d565b610e54565b6102486103d736600461268f565b61113b565b3480156103e857600080fd5b506102cd611208565b3480156103fd57600080fd5b506102cd6101935481565b34801561041457600080fd5b5060335460ff1661021e565b34801561042c57600080fd5b5061024861043b3660046125f6565b6112bb565b34801561044c57600080fd5b50610248611348565b34801561046157600080fd5b5061024861047036600461254f565b611377565b34801561048157600080fd5b50610495610490366004612751565b6113d4565b6040516001600160a01b03909116815260200161022a565b3480156104b957600080fd5b5061021e6104c8366004612611565b6113f3565b3480156104d957600080fd5b506102486104e836600461254f565b61141e565b3480156104f957600080fd5b506102cd600081565b34801561050e57600080fd5b5061024861051d366004612773565b61147b565b34801561052e57600080fd5b5061024861053d3660046127e0565b611657565b34801561054e57600080fd5b506102cd61055d36600461254f565b611930565b610248611947565b34801561057657600080fd5b50610248610585366004612611565b611a43565b34801561059657600080fd5b506102cd6105a536600461284c565b6001600160a01b0391821660009081526101966020908152604080832093909416825291909152205490565b3480156105dd57600080fd5b50610197546105ec9060ff1681565b60405160ff909116815260200161022a565b34801561060a57600080fd5b506102cd6101945481565b34801561062157600080fd5b506102cd600080516020612d2583398151915281565b34801561064357600080fd5b506102cd7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216635a05180f60e01b1480610690575061069082611a68565b92915050565b6106a16000336113f3565b6106c65760405162461bcd60e51b81526004016106bd90612876565b60405180910390fd5b6106ce611a9d565b565b60006106da611af7565b338061073a5760405162461bcd60e51b815260206004820152602960248201527f4d696e6957616c6c65743a20617070726f76652066726f6d20746865207a65726044820152686f206164647265737360b81b60648201526084016106bd565b6001600160a01b0384166107a05760405162461bcd60e51b815260206004820152602760248201527f4d696e6957616c6c65743a20617070726f766520746f20746865207a65726f206044820152666164647265737360c81b60648201526084016106bd565b610193548311156108095760405162461bcd60e51b815260206004820152602d60248201527f4d696e6957616c6c65743a20617070726f76652067726561746572207468616e60448201526c0819db1bd8985b081b1a5b5a5d609a1b60648201526084016106bd565b341561081757610817611947565b6001600160a01b038181166000818152610196602090815260408083209489168084529482529182902087905590518681527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060019392505050565b6108896000336113f3565b6108a55760405162461bcd60e51b81526004016106bd90612876565b6108ae81611b3d565b610197805460ff191660ff929092169190911790556040518181527fdd30dc35fb86c568de39420f82e371835e8392fdbf6828c67e685a87f115a910906020015b60405180910390a150565b6109056000336113f3565b6109215760405162461bcd60e51b81526004016106bd90612876565b60005b818110156109de576000838383818110610940576109406128ad565b905060200201602081019061095591906125f6565b905061096f600080516020612d25833981519152826113f3565b6109b35760405162461bcd60e51b81526020600482015260156024820152743932b6b7bb34b733903737b716b7b832b930ba37b960591b60448201526064016106bd565b6109cb600080516020612d2583398151915282611a43565b50806109d6816128d9565b915050610924565b507fd045926746dab8a5acf225487f413b986460165cf50f6052689a2e471198e0598282604051610a109291906128f4565b60405180910390a15050565b610a276000336113f3565b610a435760405162461bcd60e51b81526004016106bd90612876565b60005b81811015610b69576000838383818110610a6257610a626128ad565b9050602002016020810190610a7791906125f6565b9050610a91600080516020612d25833981519152826113f3565b15610ade5760405162461bcd60e51b815260206004820152601960248201527f616c726561647920686173206f70657261746f7220726f6c650000000000000060448201526064016106bd565b6101975460ff16610afc600080516020612d25833981519152611930565b10610b3e5760405162461bcd60e51b8152602060048201526012602482015271746f6f206d616e79206f70657261746f727360701b60448201526064016106bd565b610b56600080516020612d2583398151915282610ccc565b5080610b61816128d9565b915050610a46565b507f4c022f03c292dfa42133bfa9f90bbf55089da679c2df97df205f337c12ab7b7c8282604051610a109291906128f4565b610ba3611af7565b336000908152610195602052604090205481610bbd578091505b80821115610c305760405163993995bb60e01b8152336004820152602481018390526044810182905260806064820152602560848201527f496e73756666696369656e74206c6f636b65642066756e647320746f2077697460a482015264686472617760d81b60c482015260e4016106bd565b6000610c3c8383612940565b336000818152610195602052604080822084905551929350909185156108fc0291869190818181858888f19350505050158015610c7d573d6000803e3d6000fd5b503360008181526101956020908152604091829020548251878152918201527ffb59733a8f0bd43414922fb86c6ffdd090e44935074086318980ca89221acc56910160405180910390a2505050565b600082815260976020526040902060010154610ce781611b94565b610cf18383611b9e565b505050565b6001600160a01b0381163314610d665760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106bd565b610d708282611bc0565b5050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610dbd5760405162461bcd60e51b81526004016106bd90612957565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610e06600080516020612d05833981519152546001600160a01b031690565b6001600160a01b031614610e2c5760405162461bcd60e51b81526004016106bd906129a3565b610e3581611be2565b60408051600080825260208201909252610e5191839190611c0c565b50565b610e6c600080516020612d25833981519152336113f3565b610e885760405162461bcd60e51b81526004016106bd906129ef565b610e90611af7565b6001600160a01b0382811660009081526101956020908152604080832054610196835281842094861684529390915290205484610f3d57604051630e05486f60e41b81526001600160a01b0380861660048301528416602482015260448101869052606481018390526084810182905260c060a4820152601a60c48201527f53656e6420616d6f756e742063616e6e6f7420657175616c203000000000000060e4820152610104016106bd565b81851115610fc657604051630e05486f60e41b81526001600160a01b0380861660048301528416602482015260448101869052606481018390526084810182905260c060a4820152602160c48201527f496e73756666696369656e74206c6f636b65642066756e647320746f2073656e60e4820152601960fa1b610104820152610124016106bd565b8085111561105157604051630e05486f60e41b81526001600160a01b0380861660048301528416602482015260448101869052606481018390526084810182905260c060a4820152602360c48201527f496e73756666696369656e7420617070726f7665642066756e647320746f207360e482015262195b9960ea1b610104820152610124016106bd565b600061105d8684612940565b6001600160a01b0386166000908152610195602052604081208290559091506110868784612940565b6001600160a01b03808816600090815261019660209081526040808320938a168084529390915280822084905551929350909189156108fc02918a9190818181858888f193505050501580156110e0573d6000803e3d6000fd5b5060408051888152602081018490529081018290526001600160a01b0380871691908816907f097db31093a1dfbc4fca0de24d2ea0d787b2de44c5fce71552714981745334e29060600160405180910390a350505050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156111845760405162461bcd60e51b81526004016106bd90612957565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111cd600080516020612d05833981519152546001600160a01b031690565b6001600160a01b0316146111f35760405162461bcd60e51b81526004016106bd906129a3565b6111fc82611be2565b610d7082826001611c0c565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112a85760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016106bd565b50600080516020612d0583398151915290565b6112c66000336113f3565b6112e25760405162461bcd60e51b81526004016106bd90612876565b336001600160a01b03821614156113325760405162461bcd60e51b815260206004820152601460248201527331b0b73737ba103932b737bab731b29039b2b63360611b60448201526064016106bd565b61133d600082610ccc565b610e51600033610cf6565b6113536000336113f3565b61136f5760405162461bcd60e51b81526004016106bd90612876565b6106ce611d86565b6113826000336113f3565b61139e5760405162461bcd60e51b81526004016106bd90612876565b6101938190556040518181527fec0d2c2f3a2fec7d9ce81f6f984ece08f0cdf867116717553c179253c65dca00906020016108ef565b600082815260c9602052604081206113ec9083611dbf565b9392505050565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6114296000336113f3565b6114455760405162461bcd60e51b81526004016106bd90612876565b6101948190556040518181527f0595560a63185cdb6922ec5f6b5279ada789aeea2ab360c554dfc94c0b19cc30906020016108ef565b600054610100900460ff161580801561149b5750600054600160ff909116105b806114b55750303b1580156114b5575060005460ff166001145b6115185760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106bd565b6000805460ff19166001179055801561153b576000805461ff0019166101001790555b337fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610381905561156b600082611dcb565b6115957f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611b9e565b610197805460ff191660ff891617905560005b858110156115fb576115e9600080516020612d258339815191528888848181106115d4576115d46128ad565b905060200201602081019061036491906125f6565b806115f3816128d9565b9150506115a8565b5050610194839055610193829055801561164f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b61166f600080516020612d25833981519152336113f3565b61168b5760405162461bcd60e51b81526004016106bd906129ef565b611693611af7565b60008560038111156116a7576116a7612a30565b14156117c4576040516323b872dd60e01b81526001600160a01b038381166004830152828116602483015260448201889052600091908516906323b872dd90606401602060405180830381600087803b15801561170357600080fd5b505af1158015611717573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173b9190612a46565b9050801561179957816001600160a01b0316836001600160a01b03167ff63704c7d7c4d784274859e7e55c97f42913ac076b3a2efcb8c56a042f78db388989898960405161178c9493929190612a8a565b60405180910390a36117be565b8686868686866040516332ee88b960e11b81526004016106bd96959493929190612abe565b5061164f565b60018560038111156117d8576117d8612a30565b141561189f57604051632142170760e11b81526001600160a01b0383811660048301528281166024830152604482018690528416906342842e0e906064015b600060405180830381600087803b15801561183157600080fd5b505af1158015611845573d6000803e3d6000fd5b50505050806001600160a01b0316826001600160a01b03167ff63704c7d7c4d784274859e7e55c97f42913ac076b3a2efcb8c56a042f78db38888888886040516118929493929190612a8a565b60405180910390a361164f565b60028560038111156118b3576118b3612a30565b141561190b57604051637921219560e11b81526001600160a01b0383811660048301528281166024830152604482018690526064820188905260a06084830152600060a483015284169063f242432a9060c401611817565b8585858585856040516332ee88b960e11b81526004016106bd96959493929190612b2d565b600081815260c96020526040812061069090611dd5565b61194f611af7565b61019454336000908152610195602052604090205461196f903490612b97565b11156119d35760405162461bcd60e51b815260206004820152602d60248201527f4d696e6957616c6c65743a206465706f7369742067726561746572207468616e60448201526c0819db1bd8985b081b1a5b5a5d609a1b60648201526084016106bd565b3360009081526101956020526040812080543492906119f3908490612b97565b90915550503360008181526101956020908152604091829020548251348152918201527f61bb8b82654398e0bdd4e0d489b5e9104b6840211fd89f7264264c96589051fd910160405180910390a2565b600082815260976020526040902060010154611a5e81611b94565b610cf18383611bc0565b60006001600160e01b03198216637965db0b60e01b148061069057506301ffc9a760e01b6001600160e01b0319831614610690565b611aa5611af7565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ada3390565b6040516001600160a01b03909116815260200160405180910390a1565b60335460ff16156106ce5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106bd565b60006101008210611b905760405162461bcd60e51b815260206004820152601c60248201527f76616c756520646f6573206e6f742066697420696e203820626974730000000060448201526064016106bd565b5090565b610e518133611ddf565b611ba88282611e43565b600082815260c960205260409020610cf19082611ec9565b611bca8282611ede565b600082815260c960205260409020610cf19082611f45565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610d7081611b94565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611c3f57610cf183611f5a565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c7857600080fd5b505afa925050508015611ca8575060408051601f3d908101601f19168201909252611ca591810190612baf565b60015b611d0b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016106bd565b600080516020612d058339815191528114611d7a5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016106bd565b50610cf1838383611ff6565b611d8e612021565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611ada565b60006113ec838361206a565b610d708282611b9e565b6000610690825490565b611de982826113f3565b610d7057611e01816001600160a01b03166014612094565b611e0c836020612094565b604051602001611e1d929190612bf4565b60408051601f198184030181529082905262461bcd60e51b82526106bd91600401612c69565b611e4d82826113f3565b610d705760008281526097602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611e853390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006113ec836001600160a01b038416612230565b611ee882826113f3565b15610d705760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006113ec836001600160a01b03841661227f565b6001600160a01b0381163b611fc75760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106bd565b600080516020612d0583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611fff83612372565b60008251118061200c5750805b15610cf15761201b83836123b2565b50505050565b60335460ff166106ce5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106bd565b6000826000018281548110612081576120816128ad565b9060005260206000200154905092915050565b606060006120a3836002612c9c565b6120ae906002612b97565b67ffffffffffffffff8111156120c6576120c6612679565b6040519080825280601f01601f1916602001820160405280156120f0576020820181803683370190505b509050600360fc1b8160008151811061210b5761210b6128ad565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061213a5761213a6128ad565b60200101906001600160f81b031916908160001a905350600061215e846002612c9c565b612169906001612b97565b90505b60018111156121e1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061219d5761219d6128ad565b1a60f81b8282815181106121b3576121b36128ad565b60200101906001600160f81b031916908160001a90535060049490941c936121da81612cbb565b905061216c565b5083156113ec5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106bd565b600081815260018301602052604081205461227757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610690565b506000610690565b600081815260018301602052604081205480156123685760006122a3600183612940565b85549091506000906122b790600190612940565b905081811461231c5760008660000182815481106122d7576122d76128ad565b90600052602060002001549050808760000184815481106122fa576122fa6128ad565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061232d5761232d612cd2565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610690565b6000915050610690565b61237b81611f5a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b61241a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106bd565b600080846001600160a01b0316846040516124359190612ce8565b600060405180830381855af49150503d8060008114612470576040519150601f19603f3d011682016040523d82523d6000602084013e612475565b606091505b509150915061249d8282604051806060016040528060278152602001612d45602791396124a6565b95945050505050565b606083156124b55750816113ec565b8251156124c55782518084602001fd5b8160405162461bcd60e51b81526004016106bd9190612c69565b6000602082840312156124f157600080fd5b81356001600160e01b0319811681146113ec57600080fd5b80356001600160a01b038116811461252057600080fd5b919050565b6000806040838503121561253857600080fd5b61254183612509565b946020939093013593505050565b60006020828403121561256157600080fd5b5035919050565b60008083601f84011261257a57600080fd5b50813567ffffffffffffffff81111561259257600080fd5b6020830191508360208260051b85010111156125ad57600080fd5b9250929050565b600080602083850312156125c757600080fd5b823567ffffffffffffffff8111156125de57600080fd5b6125ea85828601612568565b90969095509350505050565b60006020828403121561260857600080fd5b6113ec82612509565b6000806040838503121561262457600080fd5b8235915061263460208401612509565b90509250929050565b60008060006060848603121561265257600080fd5b8335925061266260208501612509565b915061267060408501612509565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156126a257600080fd5b6126ab83612509565b9150602083013567ffffffffffffffff808211156126c857600080fd5b818501915085601f8301126126dc57600080fd5b8135818111156126ee576126ee612679565b604051601f8201601f19908116603f0116810190838211818310171561271657612716612679565b8160405282815288602084870101111561272f57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000806040838503121561276457600080fd5b50508035926020909101359150565b60008060008060006080868803121561278b57600080fd5b853560ff8116811461279c57600080fd5b9450602086013567ffffffffffffffff8111156127b857600080fd5b6127c488828901612568565b9699909850959660408101359660609091013595509350505050565b60008060008060008060c087890312156127f957600080fd5b8635955060208701356004811061280f57600080fd5b94506040870135935061282460608801612509565b925061283260808801612509565b915061284060a08801612509565b90509295509295509295565b6000806040838503121561285f57600080fd5b61286883612509565b915061263460208401612509565b6020808252601e908201527f73656e64657220646f65736e277420686176652061646d696e20726f6c650000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156128ed576128ed6128c3565b5060010190565b60208082528181018390526000908460408401835b86811015612935576001600160a01b0361292284612509565b1682529183019190830190600101612909565b509695505050505050565b600082821015612952576129526128c3565b500390565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60208082526021908201527f73656e64657220646f65736e27742068617665206f70657261746f7220726f6c6040820152606560f81b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b600060208284031215612a5857600080fd5b815180151581146113ec57600080fd5b60048110612a8657634e487b7160e01b600052602160045260246000fd5b9052565b84815260808101612a9e6020830186612a68565b60408201939093526001600160a01b039190911660609091015292915050565b868152612ace6020820187612a68565b60408101949094526001600160a01b03928316606085015290821660808401521660a082015260e060c08201819052601690820152754552433230207472616e73666572206661696c75726560501b6101008201526101200192915050565b868152612b3d6020820187612a68565b60408101949094526001600160a01b03928316606085015290821660808401521660a082015260e060c0820181905260119082015270496e76616c696420746f6b656e5479706560781b6101008201526101200192915050565b60008219821115612baa57612baa6128c3565b500190565b600060208284031215612bc157600080fd5b5051919050565b60005b83811015612be3578181015183820152602001612bcb565b8381111561201b5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612c2c816017850160208801612bc8565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612c5d816028840160208801612bc8565b01602801949350505050565b6020815260008251806020840152612c88816040850160208701612bc8565b601f01601f19169190910160400192915050565b6000816000190483118215151615612cb657612cb66128c3565b500290565b600081612cca57612cca6128c3565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60008251612cfa818460208701612bc8565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220dad8bb3b8b04eae9f274fb0d5d415fbc74fd7b0148fe0a56e769ca8f4691837764736f6c63430008090033", + "deployedBytecode": "0x6080604052600436106101f95760003560e01c80635e1fab0f1161010d578063bcca7b1d116100a0578063dd62ed3e1161006f578063dd62ed3e1461058a578063e24814d6146105d1578063e2b0df8f146105fe578063f5b541a614610615578063f72c0d8b1461063757600080fd5b8063bcca7b1d14610522578063ca15c87314610542578063d0e30db014610562578063d547741f1461056a57600080fd5b806391d14854116100dc57806391d14854146104ad578063a19ba036146104cd578063a217fddf146104ed578063b4d89a071461050257600080fd5b80635e1fab0f1461042057806378226fe71461044057806379c0fb6e146104555780639010d07c1461047557600080fd5b80632e1a7d4d116101905780633d0594d41161015f5780633d0594d4146103a95780634f1ef286146103c957806352d1902d146103dc578063562c2d1d146103f15780635c975abb1461040857600080fd5b80632e1a7d4d146103295780632f2ff15d1461034957806336568abe146103695780633659cfe61461038957600080fd5b80631322a2a5116101cc5780631322a2a51461027d578063248a9ca31461029d57806326224c64146102db5780632752a46e1461030957600080fd5b806301ffc9a7146101fe5780630227c93614610233578063095ea7b31461024a5780630c8a263c1461025d575b600080fd5b34801561020a57600080fd5b5061021e6102193660046124df565b61066b565b60405190151581526020015b60405180910390f35b34801561023f57600080fd5b50610248610696565b005b61021e610258366004612525565b6106d0565b34801561026957600080fd5b5061024861027836600461254f565b61087e565b34801561028957600080fd5b506102486102983660046125b4565b6108fa565b3480156102a957600080fd5b506102cd6102b836600461254f565b60009081526097602052604090206001015490565b60405190815260200161022a565b3480156102e757600080fd5b506102cd6102f63660046125f6565b6101956020526000908152604090205481565b34801561031557600080fd5b506102486103243660046125b4565b610a1c565b34801561033557600080fd5b5061024861034436600461254f565b610b9b565b34801561035557600080fd5b50610248610364366004612611565b610ccc565b34801561037557600080fd5b50610248610384366004612611565b610cf6565b34801561039557600080fd5b506102486103a43660046125f6565b610d74565b3480156103b557600080fd5b506102486103c436600461263d565b610e54565b6102486103d736600461268f565b61113b565b3480156103e857600080fd5b506102cd611208565b3480156103fd57600080fd5b506102cd6101935481565b34801561041457600080fd5b5060335460ff1661021e565b34801561042c57600080fd5b5061024861043b3660046125f6565b6112bb565b34801561044c57600080fd5b50610248611348565b34801561046157600080fd5b5061024861047036600461254f565b611377565b34801561048157600080fd5b50610495610490366004612751565b6113d4565b6040516001600160a01b03909116815260200161022a565b3480156104b957600080fd5b5061021e6104c8366004612611565b6113f3565b3480156104d957600080fd5b506102486104e836600461254f565b61141e565b3480156104f957600080fd5b506102cd600081565b34801561050e57600080fd5b5061024861051d366004612773565b61147b565b34801561052e57600080fd5b5061024861053d3660046127e0565b611657565b34801561054e57600080fd5b506102cd61055d36600461254f565b611930565b610248611947565b34801561057657600080fd5b50610248610585366004612611565b611a43565b34801561059657600080fd5b506102cd6105a536600461284c565b6001600160a01b0391821660009081526101966020908152604080832093909416825291909152205490565b3480156105dd57600080fd5b50610197546105ec9060ff1681565b60405160ff909116815260200161022a565b34801561060a57600080fd5b506102cd6101945481565b34801561062157600080fd5b506102cd600080516020612d2583398151915281565b34801561064357600080fd5b506102cd7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e381565b60006001600160e01b03198216635a05180f60e01b1480610690575061069082611a68565b92915050565b6106a16000336113f3565b6106c65760405162461bcd60e51b81526004016106bd90612876565b60405180910390fd5b6106ce611a9d565b565b60006106da611af7565b338061073a5760405162461bcd60e51b815260206004820152602960248201527f4d696e6957616c6c65743a20617070726f76652066726f6d20746865207a65726044820152686f206164647265737360b81b60648201526084016106bd565b6001600160a01b0384166107a05760405162461bcd60e51b815260206004820152602760248201527f4d696e6957616c6c65743a20617070726f766520746f20746865207a65726f206044820152666164647265737360c81b60648201526084016106bd565b610193548311156108095760405162461bcd60e51b815260206004820152602d60248201527f4d696e6957616c6c65743a20617070726f76652067726561746572207468616e60448201526c0819db1bd8985b081b1a5b5a5d609a1b60648201526084016106bd565b341561081757610817611947565b6001600160a01b038181166000818152610196602090815260408083209489168084529482529182902087905590518681527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060019392505050565b6108896000336113f3565b6108a55760405162461bcd60e51b81526004016106bd90612876565b6108ae81611b3d565b610197805460ff191660ff929092169190911790556040518181527fdd30dc35fb86c568de39420f82e371835e8392fdbf6828c67e685a87f115a910906020015b60405180910390a150565b6109056000336113f3565b6109215760405162461bcd60e51b81526004016106bd90612876565b60005b818110156109de576000838383818110610940576109406128ad565b905060200201602081019061095591906125f6565b905061096f600080516020612d25833981519152826113f3565b6109b35760405162461bcd60e51b81526020600482015260156024820152743932b6b7bb34b733903737b716b7b832b930ba37b960591b60448201526064016106bd565b6109cb600080516020612d2583398151915282611a43565b50806109d6816128d9565b915050610924565b507fd045926746dab8a5acf225487f413b986460165cf50f6052689a2e471198e0598282604051610a109291906128f4565b60405180910390a15050565b610a276000336113f3565b610a435760405162461bcd60e51b81526004016106bd90612876565b60005b81811015610b69576000838383818110610a6257610a626128ad565b9050602002016020810190610a7791906125f6565b9050610a91600080516020612d25833981519152826113f3565b15610ade5760405162461bcd60e51b815260206004820152601960248201527f616c726561647920686173206f70657261746f7220726f6c650000000000000060448201526064016106bd565b6101975460ff16610afc600080516020612d25833981519152611930565b10610b3e5760405162461bcd60e51b8152602060048201526012602482015271746f6f206d616e79206f70657261746f727360701b60448201526064016106bd565b610b56600080516020612d2583398151915282610ccc565b5080610b61816128d9565b915050610a46565b507f4c022f03c292dfa42133bfa9f90bbf55089da679c2df97df205f337c12ab7b7c8282604051610a109291906128f4565b610ba3611af7565b336000908152610195602052604090205481610bbd578091505b80821115610c305760405163993995bb60e01b8152336004820152602481018390526044810182905260806064820152602560848201527f496e73756666696369656e74206c6f636b65642066756e647320746f2077697460a482015264686472617760d81b60c482015260e4016106bd565b6000610c3c8383612940565b336000818152610195602052604080822084905551929350909185156108fc0291869190818181858888f19350505050158015610c7d573d6000803e3d6000fd5b503360008181526101956020908152604091829020548251878152918201527ffb59733a8f0bd43414922fb86c6ffdd090e44935074086318980ca89221acc56910160405180910390a2505050565b600082815260976020526040902060010154610ce781611b94565b610cf18383611b9e565b505050565b6001600160a01b0381163314610d665760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106bd565b610d708282611bc0565b5050565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610dbd5760405162461bcd60e51b81526004016106bd90612957565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610e06600080516020612d05833981519152546001600160a01b031690565b6001600160a01b031614610e2c5760405162461bcd60e51b81526004016106bd906129a3565b610e3581611be2565b60408051600080825260208201909252610e5191839190611c0c565b50565b610e6c600080516020612d25833981519152336113f3565b610e885760405162461bcd60e51b81526004016106bd906129ef565b610e90611af7565b6001600160a01b0382811660009081526101956020908152604080832054610196835281842094861684529390915290205484610f3d57604051630e05486f60e41b81526001600160a01b0380861660048301528416602482015260448101869052606481018390526084810182905260c060a4820152601a60c48201527f53656e6420616d6f756e742063616e6e6f7420657175616c203000000000000060e4820152610104016106bd565b81851115610fc657604051630e05486f60e41b81526001600160a01b0380861660048301528416602482015260448101869052606481018390526084810182905260c060a4820152602160c48201527f496e73756666696369656e74206c6f636b65642066756e647320746f2073656e60e4820152601960fa1b610104820152610124016106bd565b8085111561105157604051630e05486f60e41b81526001600160a01b0380861660048301528416602482015260448101869052606481018390526084810182905260c060a4820152602360c48201527f496e73756666696369656e7420617070726f7665642066756e647320746f207360e482015262195b9960ea1b610104820152610124016106bd565b600061105d8684612940565b6001600160a01b0386166000908152610195602052604081208290559091506110868784612940565b6001600160a01b03808816600090815261019660209081526040808320938a168084529390915280822084905551929350909189156108fc02918a9190818181858888f193505050501580156110e0573d6000803e3d6000fd5b5060408051888152602081018490529081018290526001600160a01b0380871691908816907f097db31093a1dfbc4fca0de24d2ea0d787b2de44c5fce71552714981745334e29060600160405180910390a350505050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156111845760405162461bcd60e51b81526004016106bd90612957565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111cd600080516020612d05833981519152546001600160a01b031690565b6001600160a01b0316146111f35760405162461bcd60e51b81526004016106bd906129a3565b6111fc82611be2565b610d7082826001611c0c565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112a85760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016106bd565b50600080516020612d0583398151915290565b6112c66000336113f3565b6112e25760405162461bcd60e51b81526004016106bd90612876565b336001600160a01b03821614156113325760405162461bcd60e51b815260206004820152601460248201527331b0b73737ba103932b737bab731b29039b2b63360611b60448201526064016106bd565b61133d600082610ccc565b610e51600033610cf6565b6113536000336113f3565b61136f5760405162461bcd60e51b81526004016106bd90612876565b6106ce611d86565b6113826000336113f3565b61139e5760405162461bcd60e51b81526004016106bd90612876565b6101938190556040518181527fec0d2c2f3a2fec7d9ce81f6f984ece08f0cdf867116717553c179253c65dca00906020016108ef565b600082815260c9602052604081206113ec9083611dbf565b9392505050565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6114296000336113f3565b6114455760405162461bcd60e51b81526004016106bd90612876565b6101948190556040518181527f0595560a63185cdb6922ec5f6b5279ada789aeea2ab360c554dfc94c0b19cc30906020016108ef565b600054610100900460ff161580801561149b5750600054600160ff909116105b806114b55750303b1580156114b5575060005460ff166001145b6115185760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106bd565b6000805460ff19166001179055801561153b576000805461ff0019166101001790555b337fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610381905561156b600082611dcb565b6115957f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e333611b9e565b610197805460ff191660ff891617905560005b858110156115fb576115e9600080516020612d258339815191528888848181106115d4576115d46128ad565b905060200201602081019061036491906125f6565b806115f3816128d9565b9150506115a8565b5050610194839055610193829055801561164f576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b61166f600080516020612d25833981519152336113f3565b61168b5760405162461bcd60e51b81526004016106bd906129ef565b611693611af7565b60008560038111156116a7576116a7612a30565b14156117c4576040516323b872dd60e01b81526001600160a01b038381166004830152828116602483015260448201889052600091908516906323b872dd90606401602060405180830381600087803b15801561170357600080fd5b505af1158015611717573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173b9190612a46565b9050801561179957816001600160a01b0316836001600160a01b03167ff63704c7d7c4d784274859e7e55c97f42913ac076b3a2efcb8c56a042f78db388989898960405161178c9493929190612a8a565b60405180910390a36117be565b8686868686866040516332ee88b960e11b81526004016106bd96959493929190612abe565b5061164f565b60018560038111156117d8576117d8612a30565b141561189f57604051632142170760e11b81526001600160a01b0383811660048301528281166024830152604482018690528416906342842e0e906064015b600060405180830381600087803b15801561183157600080fd5b505af1158015611845573d6000803e3d6000fd5b50505050806001600160a01b0316826001600160a01b03167ff63704c7d7c4d784274859e7e55c97f42913ac076b3a2efcb8c56a042f78db38888888886040516118929493929190612a8a565b60405180910390a361164f565b60028560038111156118b3576118b3612a30565b141561190b57604051637921219560e11b81526001600160a01b0383811660048301528281166024830152604482018690526064820188905260a06084830152600060a483015284169063f242432a9060c401611817565b8585858585856040516332ee88b960e11b81526004016106bd96959493929190612b2d565b600081815260c96020526040812061069090611dd5565b61194f611af7565b61019454336000908152610195602052604090205461196f903490612b97565b11156119d35760405162461bcd60e51b815260206004820152602d60248201527f4d696e6957616c6c65743a206465706f7369742067726561746572207468616e60448201526c0819db1bd8985b081b1a5b5a5d609a1b60648201526084016106bd565b3360009081526101956020526040812080543492906119f3908490612b97565b90915550503360008181526101956020908152604091829020548251348152918201527f61bb8b82654398e0bdd4e0d489b5e9104b6840211fd89f7264264c96589051fd910160405180910390a2565b600082815260976020526040902060010154611a5e81611b94565b610cf18383611bc0565b60006001600160e01b03198216637965db0b60e01b148061069057506301ffc9a760e01b6001600160e01b0319831614610690565b611aa5611af7565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ada3390565b6040516001600160a01b03909116815260200160405180910390a1565b60335460ff16156106ce5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106bd565b60006101008210611b905760405162461bcd60e51b815260206004820152601c60248201527f76616c756520646f6573206e6f742066697420696e203820626974730000000060448201526064016106bd565b5090565b610e518133611ddf565b611ba88282611e43565b600082815260c960205260409020610cf19082611ec9565b611bca8282611ede565b600082815260c960205260409020610cf19082611f45565b7f189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3610d7081611b94565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611c3f57610cf183611f5a565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c7857600080fd5b505afa925050508015611ca8575060408051601f3d908101601f19168201909252611ca591810190612baf565b60015b611d0b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b60648201526084016106bd565b600080516020612d058339815191528114611d7a5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016106bd565b50610cf1838383611ff6565b611d8e612021565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611ada565b60006113ec838361206a565b610d708282611b9e565b6000610690825490565b611de982826113f3565b610d7057611e01816001600160a01b03166014612094565b611e0c836020612094565b604051602001611e1d929190612bf4565b60408051601f198184030181529082905262461bcd60e51b82526106bd91600401612c69565b611e4d82826113f3565b610d705760008281526097602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611e853390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006113ec836001600160a01b038416612230565b611ee882826113f3565b15610d705760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006113ec836001600160a01b03841661227f565b6001600160a01b0381163b611fc75760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016106bd565b600080516020612d0583398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b611fff83612372565b60008251118061200c5750805b15610cf15761201b83836123b2565b50505050565b60335460ff166106ce5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016106bd565b6000826000018281548110612081576120816128ad565b9060005260206000200154905092915050565b606060006120a3836002612c9c565b6120ae906002612b97565b67ffffffffffffffff8111156120c6576120c6612679565b6040519080825280601f01601f1916602001820160405280156120f0576020820181803683370190505b509050600360fc1b8160008151811061210b5761210b6128ad565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061213a5761213a6128ad565b60200101906001600160f81b031916908160001a905350600061215e846002612c9c565b612169906001612b97565b90505b60018111156121e1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061219d5761219d6128ad565b1a60f81b8282815181106121b3576121b36128ad565b60200101906001600160f81b031916908160001a90535060049490941c936121da81612cbb565b905061216c565b5083156113ec5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106bd565b600081815260018301602052604081205461227757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610690565b506000610690565b600081815260018301602052604081205480156123685760006122a3600183612940565b85549091506000906122b790600190612940565b905081811461231c5760008660000182815481106122d7576122d76128ad565b90600052602060002001549050808760000184815481106122fa576122fa6128ad565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061232d5761232d612cd2565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610690565b6000915050610690565b61237b81611f5a565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b61241a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016106bd565b600080846001600160a01b0316846040516124359190612ce8565b600060405180830381855af49150503d8060008114612470576040519150601f19603f3d011682016040523d82523d6000602084013e612475565b606091505b509150915061249d8282604051806060016040528060278152602001612d45602791396124a6565b95945050505050565b606083156124b55750816113ec565b8251156124c55782518084602001fd5b8160405162461bcd60e51b81526004016106bd9190612c69565b6000602082840312156124f157600080fd5b81356001600160e01b0319811681146113ec57600080fd5b80356001600160a01b038116811461252057600080fd5b919050565b6000806040838503121561253857600080fd5b61254183612509565b946020939093013593505050565b60006020828403121561256157600080fd5b5035919050565b60008083601f84011261257a57600080fd5b50813567ffffffffffffffff81111561259257600080fd5b6020830191508360208260051b85010111156125ad57600080fd5b9250929050565b600080602083850312156125c757600080fd5b823567ffffffffffffffff8111156125de57600080fd5b6125ea85828601612568565b90969095509350505050565b60006020828403121561260857600080fd5b6113ec82612509565b6000806040838503121561262457600080fd5b8235915061263460208401612509565b90509250929050565b60008060006060848603121561265257600080fd5b8335925061266260208501612509565b915061267060408501612509565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156126a257600080fd5b6126ab83612509565b9150602083013567ffffffffffffffff808211156126c857600080fd5b818501915085601f8301126126dc57600080fd5b8135818111156126ee576126ee612679565b604051601f8201601f19908116603f0116810190838211818310171561271657612716612679565b8160405282815288602084870101111561272f57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000806040838503121561276457600080fd5b50508035926020909101359150565b60008060008060006080868803121561278b57600080fd5b853560ff8116811461279c57600080fd5b9450602086013567ffffffffffffffff8111156127b857600080fd5b6127c488828901612568565b9699909850959660408101359660609091013595509350505050565b60008060008060008060c087890312156127f957600080fd5b8635955060208701356004811061280f57600080fd5b94506040870135935061282460608801612509565b925061283260808801612509565b915061284060a08801612509565b90509295509295509295565b6000806040838503121561285f57600080fd5b61286883612509565b915061263460208401612509565b6020808252601e908201527f73656e64657220646f65736e277420686176652061646d696e20726f6c650000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156128ed576128ed6128c3565b5060010190565b60208082528181018390526000908460408401835b86811015612935576001600160a01b0361292284612509565b1682529183019190830190600101612909565b509695505050505050565b600082821015612952576129526128c3565b500390565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60208082526021908201527f73656e64657220646f65736e27742068617665206f70657261746f7220726f6c6040820152606560f81b606082015260800190565b634e487b7160e01b600052602160045260246000fd5b600060208284031215612a5857600080fd5b815180151581146113ec57600080fd5b60048110612a8657634e487b7160e01b600052602160045260246000fd5b9052565b84815260808101612a9e6020830186612a68565b60408201939093526001600160a01b039190911660609091015292915050565b868152612ace6020820187612a68565b60408101949094526001600160a01b03928316606085015290821660808401521660a082015260e060c08201819052601690820152754552433230207472616e73666572206661696c75726560501b6101008201526101200192915050565b868152612b3d6020820187612a68565b60408101949094526001600160a01b03928316606085015290821660808401521660a082015260e060c0820181905260119082015270496e76616c696420746f6b656e5479706560781b6101008201526101200192915050565b60008219821115612baa57612baa6128c3565b500190565b600060208284031215612bc157600080fd5b5051919050565b60005b83811015612be3578181015183820152602001612bcb565b8381111561201b5750506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612c2c816017850160208801612bc8565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612c5d816028840160208801612bc8565b01602801949350505050565b6020815260008251806020840152612c88816040850160208701612bc8565b601f01601f19169190910160400192915050565b6000816000190483118215151615612cb657612cb66128c3565b500290565b600081612cca57612cca6128c3565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60008251612cfa818460208701612bc8565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220dad8bb3b8b04eae9f274fb0d5d415fbc74fd7b0148fe0a56e769ca8f4691837764736f6c63430008090033", + "devdoc": { + "author": "John Whitton https://github.com/johnwhitton/", + "details": "The MiniWallet is designed to simplify management and transfer of tokens by light clients such as the sms-wallet.", + "errors": { + "SendFailed(address,address,uint256,uint256,uint256,string)": [ + { + "details": "Emitted when attempting to send native tokens by the operator on behalf of the `from` account to the `to` account fails e.g. if they have insufficient native tokens locked or insufficient funds approved for the to account", + "params": { + "allowance": "The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender", + "amount": "The amount of native token sent", + "balance": "The updated balance of native tokens held by the MiniWallet contract on behalf of the user", + "from": "The sender of the native token", + "reason": "The reason the Send Failed", + "to": "The recipient of the native token" + } + } + ], + "TransferFailed(uint256,uint8,uint256,address,address,address,string)": [ + { + "details": "Emitted when an attempt to transfer tokens (ERC20, ERC721, ERC1155) by the operator on behalf of the `from` account to the `to` account fails", + "params": { + "amount": "The amount of the token sent", + "from": "The sender of the token", + "reason": "The reason for the failure", + "to": "The recipient of the token", + "tokenAddress": "the address of the token contract", + "tokenType": "an enumerated value indicating the type of token being sent" + } + } + ], + "WithdrawalFailed(address,uint256,uint256,string)": [ + { + "details": "Emitted when an attempt by a `user` to withdraw native tokens `amount` fails `balance` is the users balance held and `reason` gives the reason for failure. e.g. `Insufficient Locked Funds to Withdraw`.", + "params": { + "amount": "The amount of native tokens requested to withdraw", + "balance": "The users balance of native tokens held by the MiniWallet contract", + "user": "The user attempting to withdraw the native token" + } + } + ] + }, + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.", + "params": { + "allowance": "The allowance of native tokens which can be transferred by the MiniWallet Operator to the spender", + "owner": "The owner of the native token which are being approved", + "spender": "The spender who can spend the native tokens (actual transferring of the funds is done by the operator)" + } + }, + "DepositSuccessful(address,uint256,uint256)": { + "details": "Emitted when a `user` deposits native tokens (`amount`) into the MiniWallet `balance` is the users new balance held.", + "params": { + "amount": "The amount of native tokens deposited", + "balance": "The users balance of native tokens held by the MiniWallet contract after the deposit", + "user": "The user depositing the native token" + } + }, + "GlobalUserAuthLimitChanged(uint256)": { + "details": "Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can authorize per recipient", + "params": { + "newGlobalUserAuthLimit": "The updated global limit of native tokens a user can authorize" + } + }, + "GlobalUserLimitChanged(uint256)": { + "details": "Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract", + "params": { + "newGlobalUserLimit": "The updated global limit of native tokens a user can hold" + } + }, + "OperatorThresholdChanged(uint256)": { + "details": "Emitted when the `DEFAULT_ADMIN` updates the maximum number of operators allowed", + "params": { + "newThreshold": "The updated maximum number of operators" + } + }, + "OperatorsAdded(address[])": { + "details": "Emitted when the `DEFAULT_ADMIN` adds some operators", + "params": { + "operators": "The operators added" + } + }, + "OperatorsRemoved(address[])": { + "details": "Emitted when the `DEFAULT_ADMIN` removes some operators", + "params": { + "operators": "The operators removed" + } + }, + "SendSuccessful(address,address,uint256,uint256,uint256)": { + "details": "Emitted when native tokens have been successfully sent by the operator on behalf of the `from` account", + "params": { + "amount": "The amount of native token sent", + "from": "The sender of the native token", + "newAllowance": "The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender", + "newBalance": "The updated balance of native tokens held by the MiniWallet contract on behalf of the user", + "to": "The recipient of the native token" + } + }, + "TransferSuccessful(uint256,uint8,uint256,address,address,address)": { + "details": "Emitted when transferring tokens (ERC20, ERC721, ERC1155) by the operator on behalf of the `from` account to the `to` account", + "params": { + "amount": "The amount of the token sent", + "from": "The sender of the token", + "to": "The recipient of the token", + "tokenAddress": "the address of the token contract", + "tokenType": "an enumerated value indicating the type of token being sent" + } + }, + "WithdrawalSuccessful(address,uint256,uint256)": { + "details": "Emitted when a `user` withdraws native tokens (`amount`) from the MiniWallet `balance` is the users new balance held.", + "params": { + "amount": "The amount of native tokens withdrawn", + "balance": "The users balance of native tokens held by the MiniWallet contract after the withdrawal", + "user": "The user withdrawing the native token" + } + } + }, + "kind": "dev", + "methods": { + "adminAddOperators(address[])": { + "details": "`adminAddOperators` adds some new operators (can only be called by admin)", + "params": { + "operatorAddresses": "The addresses of the new operators" + } + }, + "adminChangeGlobalUserAuthLimit(uint256)": { + "details": "`adminChangeGlobalUserAuthLimit` updates the global limit for the amount of Native Tokens a user can authorize per recipient This value is checked when creating allowances. This function can only be called by an administrator", + "params": { + "newGlobalUserAuthLimit": "updated Global User Auth Limit" + } + }, + "adminChangeGlobalUserLimit(uint256)": { + "details": "`adminChangeGlobalUserLimit` updates the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract. This value is checked when depositing funds. This function can only be called by the administrator.", + "params": { + "newGlobalUserLimit": "The updated global limit." + } + }, + "adminChangeOperatorThreshold(uint256)": { + "details": "`adminChangeOperatorThreshold` updates the maximum number of allowed operators", + "params": { + "newThreshold": "The updated maximum number of operators" + } + }, + "adminPauseMiniWallet()": { + "details": "`adminPauseMiniWallet` pauses the `MiniWallet` contract" + }, + "adminRemoveOperators(address[])": { + "details": "`adminRemoveOperators` removes an operator (can only be called by admin)", + "params": { + "operatorAddresses": "The addresses of the operators to be removed" + } + }, + "adminUnpauseMiniWallet()": { + "details": "`adminUnpauseMiniWallet` unpauses the `MiniWallet` contract" + }, + "allowance(address,address)": { + "details": "`allowance` returns the number of tokens the `owner` has allowed the `operator` to send to the user.", + "params": { + "owner": "The owner of the native tokens", + "spender": "The recipient of the native tokens" + }, + "returns": { + "_0": "Number of tokens allowed" + } + }, + "approve(address,uint256)": { + "details": "`approve` approves an amount of native tokens that the operator is allowed to send on behalf of the `msg.sender` to the `spender`. The amount needs to be less than the `globalUserAuthLimit` and the `owner` and `spender` cannot be the zero address. Also if funds are sent they are deposited to the users account, if the value and the users current balance exceeds the `globalUserLimit` the transaction is rejected.", + "params": { + "amount": "The amount of native tokens approved.", + "spender": "The approved recipient of the native tokens." + }, + "returns": { + "_0": "true if the amount is approved" + } + }, + "deposit()": { + "details": "`deposit` allows a user to deposit funds to the `MiniWallet` contract. It uses `msg.sender` to determine the user and the `msg.value` to determine the amount to deposit. The `amount` deposited needs to be less than or equal to the `globalUserLimit`" + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "getRoleMember(bytes32,uint256)": { + "details": "Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information." + }, + "getRoleMemberCount(bytes32)": { + "details": "Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role." + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleGranted} event." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(uint8,address[],uint256,uint256)": { + "details": "`initialize` initializes the MiniWallet contract. It should be called directly after the deploy. It is used instead of a `constructor` as the `MiniWallet` is upgradeable. The `msg.sender` is granted the `DEFAULT_ADMIN_ROLE`.", + "params": { + "globalUserAuthLimit_": "The initial limit of how many native tokens a user can approve for a recipient", + "globalUserLimit_": "The initial limit of how many native tokens a user can deposit", + "initialOperatorThreshold": "The initial maximum number of operators allowed", + "initialOperators": "The address of the initial operators (each will be granted the `OPERATOR_ROLE`)" + } + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "proxiableUUID()": { + "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate that the this implementation remains valid after an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier." + }, + "renounceAdmin(address)": { + "details": "`renounceAdmin` can only be called by the current administrator It creates a new administrator and renounce the administrator role from the `msg.sender`", + "params": { + "newAdmin": "the new administrator" + } + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`. May emit a {RoleRevoked} event." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." + }, + "send(uint256,address,address)": { + "details": "`send` is called by an `operator` to send native tokens on behalf of the user. It checks the approved amount for the from and to combination and decreases the approved amount by the amount sent.", + "params": { + "amount": "The amount of native tokens to send.", + "from": "The account on whose behalf the operator is sending the native tokens from", + "to": "The recipient of the native tokens." + } + }, + "supportsInterface(bytes4)": { + "details": "See {IERC165-supportsInterface}." + }, + "transfer(uint256,uint8,uint256,address,address,address)": { + "details": "`transfer` transfers tokens (ERC20, ERC721, ERC1155). The user account must have previously approved the `MiniWallet` contract to send the funds.", + "params": { + "amount": "The amount of the token sent", + "from": "The sender of the token", + "to": "The recipient of the token", + "tokenAddress": "the address of the token contract", + "tokenType": "an enumerated value indicating the type of token being sent" + } + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event." + }, + "withdraw(uint256)": { + "details": "`withdraw` withdraws an `amount` of native tokens (previously deposited by the user) and transfers them back to the user. `msg.sender` is used to determine the user. If a zero amount is passed then all the native tokens held for that user are withdrawn.", + "params": { + "amount": "The amount of native tokens to withdraw (zero means withdraw all tokens held for the user)" + } + } + }, + "stateVariables": { + "OPERATOR_ROLE": { + "details": "`OPERATOR_ROLE` is the role assigned to operators" + }, + "_allowances": { + "details": "`_allowances` is a two layer mapping tracking the allowance each user has given each recipient. It is a many to one relationship i.e. One User can create allowances for multiple recipients." + }, + "globalUserAuthLimit": { + "details": "The global limit for the amount of Native Tokens a user can authorize per recipient This value is checked when creating allowances." + }, + "globalUserLimit": { + "details": "The global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract. This value is checked when depositing funds." + }, + "operatorThreshold": { + "details": "`operatorThreshold` tracks the maximum number of allowed operators Operators are responsible for transferring tokens on the users behalf. There may be more than one `operator` per `relayer` A `relayer` is an api server which interacts with the client (e.g. sms-wallet). Multiple relayers can be run for performance and load balancing reasons." + }, + "userBalances": { + "details": "This mapping tracks the balances of native tokens stored in the MiniWallet contract for each user" + } + }, + "title": "An asset management contract for low value tokens and assets.", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This contract allows users to transfer native tokens and authorize recipients (such as games) to receive these tokens. Once approved it can transfer the native tokens on behalf of the user. It also can transfer ERC20, ERC721 and ERC1155 tokens on behalf of the user, after the user approves the MiniWallet contract to do so.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1530, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 1533, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 4162, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1831, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_paused", + "offset": 0, + "slot": "51", + "type": "t_bool" + }, + { + "astId": 1936, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 5104, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 184, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_roles", + "offset": 0, + "slot": "151", + "type": "t_mapping(t_bytes32,t_struct(RoleData)179_storage)" + }, + { + "astId": 483, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 33, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_roleMembers", + "offset": 0, + "slot": "201", + "type": "t_mapping(t_bytes32,t_struct(AddressSet)8096_storage)" + }, + { + "astId": 143, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage" + }, + { + "astId": 1512, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 1809, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "__gap", + "offset": 0, + "slot": "301", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 4920, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_HASHED_NAME", + "offset": 0, + "slot": "351", + "type": "t_bytes32" + }, + { + "astId": 4922, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "352", + "type": "t_bytes32" + }, + { + "astId": 5060, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "__gap", + "offset": 0, + "slot": "353", + "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 17015, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "globalUserAuthLimit", + "offset": 0, + "slot": "403", + "type": "t_uint256" + }, + { + "astId": 17018, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "globalUserLimit", + "offset": 0, + "slot": "404", + "type": "t_uint256" + }, + { + "astId": 17023, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "userBalances", + "offset": 0, + "slot": "405", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 17030, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_allowances", + "offset": 0, + "slot": "406", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 17033, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "operatorThreshold", + "offset": 0, + "slot": "407", + "type": "t_uint8" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(AddressSet)8096_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct EnumerableSetUpgradeable.AddressSet)", + "numberOfBytes": "32", + "value": "t_struct(AddressSet)8096_storage" + }, + "t_mapping(t_bytes32,t_struct(RoleData)179_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)179_storage" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(AddressSet)8096_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.AddressSet", + "members": [ + { + "astId": 8095, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)7795_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(RoleData)179_storage": { + "encoding": "inplace", + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "astId": 176, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 178, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)7795_storage": { + "encoding": "inplace", + "label": "struct EnumerableSetUpgradeable.Set", + "members": [ + { + "astId": 7790, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 7794, + "contract": "contracts/miniWallet/MiniWallet.sol:MiniWallet", + "label": "_indexes", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/MiniWallet_Proxy.json b/miniwallet/deployments/ethLocal/MiniWallet_Proxy.json new file mode 100644 index 0000000..84a38c0 --- /dev/null +++ b/miniwallet/deployments/ethLocal/MiniWallet_Proxy.json @@ -0,0 +1,219 @@ +{ + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "receipt": { + "to": null, + "from": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "contractAddress": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "transactionIndex": 0, + "gasUsed": "786765", + "logsBloom": "0x00000004000000000002000000000000400000000000000000000000000000000200000000000000000000008000000010000000000000000000000000100000000000000000000000000000000002000002000000000000000000000000000000000800020000000000000100800800000804000000000000010000000000000000000000000000000000000000000000000000000080000400000000000000000000000000200000000000000400000000000000008000001000000000000000000020000000200000000000041000400000002008000100000000000020000080000000000000000010000000000001000000000000800000000000000000", + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086", + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000005fbdb2315678afecb367f032d93f642f64180aa3" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 1, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x189ab7a9244df0848122154315af71fe140f3db0fe014031783b0946b8c9d2e3", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "0x00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 3, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 4, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929", + "0x00000000000000000000000090f79bf6eb2c4f870365e785982e1f101e93b906", + "0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + }, + { + "transactionIndex": 0, + "blockNumber": 2, + "transactionHash": "0x46f6a1d3b7e52850aa2d2d22be1bfb880df44219eb756d81499564ed866b545f", + "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000001", + "logIndex": 6, + "blockHash": "0x917dfe640a9b56a905f8961a26bfe4f7e7848bcc6a5588e71363c977c2314086" + } + ], + "blockNumber": 2, + "cumulativeGasUsed": "786765", + "status": 1, + "byzantium": true + }, + "args": [ + "0x5FbDB2315678afecb367f032d93F642f64180aa3", + "0xb4d89a07000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c80000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc00000000000000000000000090f79bf6eb2c4f870365e785982e1f101e93b906" + ], + "numDeployments": 1, + "solcInputHash": "3f42b7d9d73f23a1948bbe290f0342fd", + "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/deployments/ERC1967Proxy.sol\":\"ERC1967Proxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/deployments/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: Apache-2.0\\n\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\\\";\\nimport \\\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/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 initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(\\n _IMPLEMENTATION_SLOT ==\\n bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1)\\n );\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation()\\n internal\\n view\\n virtual\\n override\\n returns (address impl)\\n {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0xe30c5227e56edd12e96ce4c6dd2f90c10e311a2a15b427f3f69cf6349d263690\",\"license\":\"Apache-2.0\"},\"hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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\":\"0x93b4e21c931252739a1ec13ea31d3d35a5c068be3163ccab83e4d70c40355f03\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\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 Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view virtual 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 Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\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(Address.isContract(IBeacon(newBeacon).implementation()), \\\"ERC1967: beacon implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17668652127feebed0ce8d9431ef95ccc8c4292f03e3b8cf06c6ca16af396633\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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 overriden 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 internall 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 overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0xd5d1fd16e9faff7fcb3a52e02a8d49156f42a38a03f07b5f1810c21c2149a8ab\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/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\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(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 require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason 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 // 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\\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}\\n\",\"keccak256\":\"0x3777e696b62134e6177440dbe6e6601c0c156a443f57167194b67e75527439de\",\"license\":\"MIT\"},\"hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n 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 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 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 assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040526040516107b13803806107b183398101604081905261002291610349565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610417565b60008051602061076a833981519152146100695761006961043c565b6100758282600061007c565b50506104a1565b610085836100b2565b6000825111806100925750805b156100ad576100ab83836100f260201b6100291760201c565b505b505050565b6100bb8161011e565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060610117838360405180606001604052806027815260200161078a602791396101de565b9392505050565b610131816102bc60201b6100551760201c565b6101985760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b806101bd60008051602061076a83398151915260001b6102cb60201b6100641760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606001600160a01b0384163b6102465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b606482015260840161018f565b600080856001600160a01b0316856040516102619190610452565b600060405180830381855af49150503d806000811461029c576040519150601f19603f3d011682016040523d82523d6000602084013e6102a1565b606091505b5090925090506102b28282866102ce565b9695505050505050565b6001600160a01b03163b151590565b90565b606083156102dd575081610117565b8251156102ed5782518084602001fd5b8160405162461bcd60e51b815260040161018f919061046e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610338578181015183820152602001610320565b838111156100ab5750506000910152565b6000806040838503121561035c57600080fd5b82516001600160a01b038116811461037357600080fd5b60208401519092506001600160401b038082111561039057600080fd5b818501915085601f8301126103a457600080fd5b8151818111156103b6576103b6610307565b604051601f8201601f19908116603f011681019083821181831017156103de576103de610307565b816040528281528860208487010111156103f757600080fd5b61040883602083016020880161031d565b80955050505050509250929050565b60008282101561043757634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825161046481846020870161031d565b9190910192915050565b602081526000825180602084015261048d81604085016020870161031d565b601f01601f19169190910160400192915050565b6102ba806104b06000396000f3fe60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205fe505fef2a45cf1b87780512f76c7a0d89e24f83aace3a7f881bc132f0a21b864736f6c63430008090033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040523661001357610011610017565b005b6100115b610027610022610067565b61009f565b565b606061004e838360405180606001604052806027815260200161025e602791396100c3565b9392505050565b6001600160a01b03163b151590565b90565b600061009a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100be573d6000f35b3d6000fd5b60606001600160a01b0384163b6101305760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161014b919061020e565b600060405180830381855af49150503d8060008114610186576040519150601f19603f3d011682016040523d82523d6000602084013e61018b565b606091505b509150915061019b8282866101a5565b9695505050505050565b606083156101b457508161004e565b8251156101c45782518084602001fd5b8160405162461bcd60e51b8152600401610127919061022a565b60005b838110156101f95781810151838201526020016101e1565b83811115610208576000848401525b50505050565b600082516102208184602087016101de565b9190910192915050565b60208152600082518060208401526102498160408501602087016101de565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212205fe505fef2a45cf1b87780512f76c7a0d89e24f83aace3a7f881bc132f0a21b864736f6c63430008090033", + "devdoc": { + "details": "This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an implementation address that can be changed. This address is stored in storage in the location specified by https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the implementation behind the proxy.", + "kind": "dev", + "methods": { + "constructor": { + "details": "Initializes the upgradeable proxy with an initial implementation specified by `_logic`. If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded function call, and allows initializating the storage of the proxy like a Solidity constructor." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/solcInputs/3f42b7d9d73f23a1948bbe290f0342fd.json b/miniwallet/deployments/ethLocal/solcInputs/3f42b7d9d73f23a1948bbe290f0342fd.json new file mode 100644 index 0000000..76d6f05 --- /dev/null +++ b/miniwallet/deployments/ethLocal/solcInputs/3f42b7d9d73f23a1948bbe290f0342fd.json @@ -0,0 +1,55 @@ +{ + "language": "Solidity", + "sources": { + "contracts/deployments/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol\";\nimport \"hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/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 initializating the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n assert(\n _IMPLEMENTATION_SLOT ==\n bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1)\n );\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation()\n internal\n view\n virtual\n override\n returns (address impl)\n {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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 overriden 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 internall 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 overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\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 Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view virtual 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 Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\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(Address.isContract(IBeacon(newBeacon).implementation()), \"ERC1967: beacon implementation is not a contract\");\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/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" + }, + "hardhat-deploy/solc_0.8/openzeppelin/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.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" + }, + "hardhat-deploy/solc_0.8/openzeppelin/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0-rc.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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\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}\n" + }, + "hardhat-deploy/solc_0.8/openzeppelin/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n 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 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 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 assembly {\n r.slot := slot\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "devdoc", + "userdoc" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/miniwallet/deployments/ethLocal/solcInputs/eb67976a27a158fcc5c575ed68d95e39.json b/miniwallet/deployments/ethLocal/solcInputs/eb67976a27a158fcc5c575ed68d95e39.json new file mode 100644 index 0000000..65a0872 --- /dev/null +++ b/miniwallet/deployments/ethLocal/solcInputs/eb67976a27a158fcc5c575ed68d95e39.json @@ -0,0 +1,256 @@ +{ + "language": "Solidity", + "sources": { + "contracts/miniID/MiniID.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol\";\n\n/// @custom:security-contact john@johnwhitton.com\ncontract MiniID is\n Initializable,\n ERC721Upgradeable,\n ERC721EnumerableUpgradeable,\n ERC721URIStorageUpgradeable,\n PausableUpgradeable,\n AccessControlUpgradeable,\n ERC721BurnableUpgradeable,\n EIP712Upgradeable,\n ERC721VotesUpgradeable,\n UUPSUpgradeable\n{\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n bytes32 public constant PAUSER_ROLE = keccak256(\"PAUSER_ROLE\");\n bytes32 public constant MINTER_ROLE = keccak256(\"MINTER_ROLE\");\n CountersUpgradeable.Counter private _tokenIdCounter;\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n /// @custom:oz-upgrades-unsafe-allow constructor\n constructor() {\n _disableInitializers();\n }\n\n function initialize() public initializer {\n address owner = msg.sender;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n owner\n )\n }\n\n __ERC721_init(\"MiniID\", \"MID\");\n __ERC721Enumerable_init();\n __ERC721URIStorage_init();\n __Pausable_init();\n __AccessControl_init();\n __ERC721Burnable_init();\n __EIP712_init(\"MiniID\", \"1\");\n __ERC721Votes_init();\n __UUPSUpgradeable_init();\n\n _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _grantRole(PAUSER_ROLE, msg.sender);\n _grantRole(MINTER_ROLE, msg.sender);\n _grantRole(UPGRADER_ROLE, msg.sender);\n }\n\n function _baseURI() internal pure override returns (string memory) {\n return \"ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/MiniID/\";\n }\n\n function pause() public onlyRole(PAUSER_ROLE) {\n _pause();\n }\n\n function unpause() public onlyRole(PAUSER_ROLE) {\n _unpause();\n }\n\n function safeMint(address to, string memory uri)\n public\n onlyRole(MINTER_ROLE)\n {\n uint256 tokenId = _tokenIdCounter.current();\n _tokenIdCounter.increment();\n _safeMint(to, tokenId);\n _setTokenURI(tokenId, uri);\n }\n\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n )\n internal\n override(ERC721Upgradeable, ERC721EnumerableUpgradeable)\n whenNotPaused\n {\n super._beforeTokenTransfer(from, to, tokenId);\n }\n\n function _authorizeUpgrade(address newImplementation)\n internal\n override\n onlyRole(UPGRADER_ROLE)\n {}\n\n // The following functions are overrides required by Solidity.\n\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal override(ERC721Upgradeable, ERC721VotesUpgradeable) {\n super._afterTokenTransfer(from, to, tokenId);\n }\n\n function _burn(uint256 tokenId)\n internal\n override(ERC721Upgradeable, ERC721URIStorageUpgradeable)\n {\n super._burn(tokenId);\n }\n\n function tokenURI(uint256 tokenId)\n public\n view\n override(ERC721Upgradeable, ERC721URIStorageUpgradeable)\n returns (string memory)\n {\n return super.tokenURI(tokenId);\n }\n\n function supportsInterface(bytes4 interfaceId)\n public\n view\n override(\n ERC721Upgradeable,\n ERC721EnumerableUpgradeable,\n AccessControlUpgradeable\n )\n returns (bool)\n {\n return super.supportsInterface(interfaceId);\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721Upgradeable.sol\";\nimport \"./IERC721ReceiverUpgradeable.sol\";\nimport \"./extensions/IERC721MetadataUpgradeable.sol\";\nimport \"../../utils/AddressUpgradeable.sol\";\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../utils/StringsUpgradeable.sol\";\nimport \"../../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {\n using AddressUpgradeable for address;\n using StringsUpgradeable for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing {\n __ERC721_init_unchained(name_, symbol_);\n }\n\n function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {\n return\n interfaceId == type(IERC721Upgradeable).interfaceId ||\n interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: address zero is not a valid owner\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _owners[tokenId];\n require(owner != address(0), \"ERC721: invalid token ID\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n _requireMinted(tokenId);\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721Upgradeable.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not token owner nor approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n _requireMinted(tokenId);\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner nor approved\");\n _safeTransfer(from, to, tokenId, data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _owners[tokenId] != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address owner = ERC721Upgradeable.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(\n address to,\n uint256 tokenId,\n bytes memory data\n ) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721Upgradeable.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n require(ERC721Upgradeable.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(\n address owner,\n address operator,\n bool approved\n ) internal virtual {\n require(owner != operator, \"ERC721: approve to caller\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) 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[44] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"./IERC721EnumerableUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This implements an optional extension of {ERC721} defined in the EIP that adds\n * enumerability of all the token ids in the contract as well as all token ids owned by each\n * account.\n */\nabstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable {\n function __ERC721Enumerable_init() internal onlyInitializing {\n }\n\n function __ERC721Enumerable_init_unchained() internal onlyInitializing {\n }\n // Mapping from owner to list of owned token IDs\n mapping(address => mapping(uint256 => uint256)) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) {\n return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721Upgradeable.balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n */\n function tokenByIndex(uint256 index) public view virtual override returns (uint256) {\n require(index < ERC721EnumerableUpgradeable.totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n super._beforeTokenTransfer(from, to, tokenId);\n\n if (from == address(0)) {\n _addTokenToAllTokensEnumeration(tokenId);\n } else if (from != to) {\n _removeTokenFromOwnerEnumeration(from, tokenId);\n }\n if (to == address(0)) {\n _removeTokenFromAllTokensEnumeration(tokenId);\n } else if (to != from) {\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n uint256 length = ERC721Upgradeable.balanceOf(to);\n _ownedTokens[to][length] = tokenId;\n _ownedTokensIndex[tokenId] = length;\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1;\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n delete _ownedTokensIndex[tokenId];\n delete _ownedTokens[from][lastTokenIndex];\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length - 1;\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n delete _allTokensIndex[tokenId];\n _allTokens.pop();\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[46] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev ERC721 token with storage based token URI management.\n */\nabstract contract ERC721URIStorageUpgradeable is Initializable, ERC721Upgradeable {\n function __ERC721URIStorage_init() internal onlyInitializing {\n }\n\n function __ERC721URIStorage_init_unchained() internal onlyInitializing {\n }\n using StringsUpgradeable for uint256;\n\n // Optional mapping for token URIs\n mapping(uint256 => string) private _tokenURIs;\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n _requireMinted(tokenId);\n\n string memory _tokenURI = _tokenURIs[tokenId];\n string memory base = _baseURI();\n\n // If there is no base URI, return the token URI.\n if (bytes(base).length == 0) {\n return _tokenURI;\n }\n // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).\n if (bytes(_tokenURI).length > 0) {\n return string(abi.encodePacked(base, _tokenURI));\n }\n\n return super.tokenURI(tokenId);\n }\n\n /**\n * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {\n require(_exists(tokenId), \"ERC721URIStorage: URI set of nonexistent token\");\n _tokenURIs[tokenId] = _tokenURI;\n }\n\n /**\n * @dev See {ERC721-_burn}. This override additionally checks to see if a\n * token-specific URI was set for the token, and if so, it deletes the token URI from\n * the storage mapping.\n */\n function _burn(uint256 tokenId) internal virtual override {\n super._burn(tokenId);\n\n if (bytes(_tokenURIs[tokenId]).length != 0) {\n delete _tokenURIs[tokenId];\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[49] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableUpgradeable is Initializable, ContextUpgradeable {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n function __Pausable_init() internal onlyInitializing {\n __Pausable_init_unchained();\n }\n\n function __Pausable_init_unchained() internal onlyInitializing {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\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/access/AccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../utils/StringsUpgradeable.sol\";\nimport \"../utils/introspection/ERC165Upgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {\n function __AccessControl_init() internal onlyInitializing {\n }\n\n function __AccessControl_init_unchained() internal onlyInitializing {\n }\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role);\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n StringsUpgradeable.toHexString(uint160(account), 20),\n \" is missing role \",\n StringsUpgradeable.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleGranted} event.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n *\n * May emit a {RoleRevoked} event.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n *\n * May emit a {RoleRevoked} event.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * May emit a {RoleGranted} event.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleGranted} event.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n *\n * May emit a {RoleRevoked} event.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n\n /**\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/token/ERC721/extensions/ERC721BurnableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"../../../utils/ContextUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @title ERC721 Burnable Token\n * @dev ERC721 Token that can be burned (destroyed).\n */\nabstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable {\n function __ERC721Burnable_init() internal onlyInitializing {\n }\n\n function __ERC721Burnable_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev Burns `tokenId`. See {ERC721-_burn}.\n *\n * Requirements:\n *\n * - The caller must own `tokenId` or be an approved operator.\n */\n function burn(uint256 tokenId) public virtual {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner nor approved\");\n _burn(tokenId);\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/cryptography/draft-EIP712Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable {\n /* solhint-disable var-name-mixedcase */\n bytes32 private _HASHED_NAME;\n bytes32 private _HASHED_VERSION;\n bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n /* solhint-enable var-name-mixedcase */\n\n /**\n * @dev Initializes the domain separator and parameter caches.\n *\n * The meaning of `name` and `version` is specified in\n * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n *\n * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n * - `version`: the current major version of the signing domain.\n *\n * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n * contract upgrade].\n */\n function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n __EIP712_init_unchained(name, version);\n }\n\n function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n bytes32 hashedName = keccak256(bytes(name));\n bytes32 hashedVersion = keccak256(bytes(version));\n _HASHED_NAME = hashedName;\n _HASHED_VERSION = hashedVersion;\n }\n\n /**\n * @dev Returns the domain separator for the current chain.\n */\n function _domainSeparatorV4() internal view returns (bytes32) {\n return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n }\n\n function _buildDomainSeparator(\n bytes32 typeHash,\n bytes32 nameHash,\n bytes32 versionHash\n ) private view returns (bytes32) {\n return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n }\n\n /**\n * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n * function returns the hash of the fully encoded EIP712 message for this domain.\n *\n * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n *\n * ```solidity\n * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n * keccak256(\"Mail(address to,string contents)\"),\n * mailTo,\n * keccak256(bytes(mailContents))\n * )));\n * address signer = ECDSA.recover(digest, signature);\n * ```\n */\n function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n }\n\n /**\n * @dev The hash of the name parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712NameHash() internal virtual view returns (bytes32) {\n return _HASHED_NAME;\n }\n\n /**\n * @dev The hash of the version parameter for the EIP712 domain.\n *\n * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n * are a concern.\n */\n function _EIP712VersionHash() internal virtual view returns (bytes32) {\n return _HASHED_VERSION;\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/token/ERC721/extensions/draft-ERC721VotesUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/extensions/draft-ERC721Votes.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC721Upgradeable.sol\";\nimport \"../../../governance/utils/VotesUpgradeable.sol\";\nimport \"../../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of ERC721 to support voting and delegation as implemented by {Votes}, where each individual NFT counts\n * as 1 vote unit.\n *\n * Tokens do not count as votes until they are delegated, because votes must be tracked which incurs an additional cost\n * on every transfer. Token holders can either delegate to a trusted representative who will decide how to make use of\n * the votes in governance decisions, or they can delegate to themselves to be their own representative.\n *\n * _Available since v4.5._\n */\nabstract contract ERC721VotesUpgradeable is Initializable, ERC721Upgradeable, VotesUpgradeable {\n function __ERC721Votes_init() internal onlyInitializing {\n }\n\n function __ERC721Votes_init_unchained() internal onlyInitializing {\n }\n /**\n * @dev Adjusts votes when tokens are transferred.\n *\n * Emits a {Votes-DelegateVotesChanged} event.\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual override {\n _transferVotingUnits(from, to, 1);\n super._afterTokenTransfer(from, to, tokenId);\n }\n\n /**\n * @dev Returns the balance of `account`.\n */\n function _getVotingUnits(address account) internal view virtual override returns (uint256) {\n return balanceOf(account);\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.7.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 * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\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. Equivalent to `reinitializer(1)`.\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 * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original\n * initialization step. This is essential to configure modules that are added through upgrades and that require\n * initialization.\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 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 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" + }, + "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.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 that the this implementation remains valid after 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 function upgradeTo(address newImplementation) external 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 function upgradeToAndCall(address newImplementation, bytes memory data) external 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/utils/CountersUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n unchecked {\n counter._value += 1;\n }\n }\n\n function decrement(Counter storage counter) internal {\n uint256 value = counter._value;\n require(value > 0, \"Counter: decrement overflow\");\n unchecked {\n counter._value = value - 1;\n }\n }\n\n function reset(Counter storage counter) internal {\n counter._value = 0;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165Upgradeable.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721Upgradeable is IERC165Upgradeable {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@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/token/ERC721/extensions/IERC721MetadataUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Upgradeable.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721MetadataUpgradeable is IERC721Upgradeable {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.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 *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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}\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/StringsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@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/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721Upgradeable.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721EnumerableUpgradeable is IERC721Upgradeable {\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n enum RecoverError {\n NoError,\n InvalidSignature,\n InvalidSignatureLength,\n InvalidSignatureS,\n InvalidSignatureV\n }\n\n function _throwError(RecoverError error) private pure {\n if (error == RecoverError.NoError) {\n return; // no error: do nothing\n } else if (error == RecoverError.InvalidSignature) {\n revert(\"ECDSA: invalid signature\");\n } else if (error == RecoverError.InvalidSignatureLength) {\n revert(\"ECDSA: invalid signature length\");\n } else if (error == RecoverError.InvalidSignatureS) {\n revert(\"ECDSA: invalid signature 's' value\");\n } else if (error == RecoverError.InvalidSignatureV) {\n revert(\"ECDSA: invalid signature 'v' value\");\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature` or error string. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n *\n * Documentation for signature generation:\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n *\n * _Available since v4.3._\n */\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n // ecrecover takes the signature parameters, and the only way to get them\n // currently is to use assembly.\n /// @solidity memory-safe-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n return tryRecover(hash, v, r, s);\n } else {\n return (address(0), RecoverError.InvalidSignatureLength);\n }\n }\n\n /**\n * @dev Returns the address that signed a hashed message (`hash`) with\n * `signature`. This address can then be used for verification purposes.\n *\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n * this function rejects them by requiring the `s` value to be in the lower\n * half order, and the `v` value to be either 27 or 28.\n *\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n * verification to be secure: it is possible to craft signatures that\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n * this is by receiving a hash of the original message (which may otherwise\n * be too long), and then calling {toEthSignedMessageHash} on it.\n */\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, signature);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n *\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address, RecoverError) {\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n uint8 v = uint8((uint256(vs) >> 255) + 27);\n return tryRecover(hash, v, r, s);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n *\n * _Available since v4.2._\n */\n function recover(\n bytes32 hash,\n bytes32 r,\n bytes32 vs\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n * `r` and `s` signature fields separately.\n *\n * _Available since v4.3._\n */\n function tryRecover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address, RecoverError) {\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n //\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n // these malleable signatures as well.\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n return (address(0), RecoverError.InvalidSignatureS);\n }\n if (v != 27 && v != 28) {\n return (address(0), RecoverError.InvalidSignatureV);\n }\n\n // If the signature is valid (and not malleable), return the signer address\n address signer = ecrecover(hash, v, r, s);\n if (signer == address(0)) {\n return (address(0), RecoverError.InvalidSignature);\n }\n\n return (signer, RecoverError.NoError);\n }\n\n /**\n * @dev Overload of {ECDSA-recover} that receives the `v`,\n * `r` and `s` signature fields separately.\n */\n function recover(\n bytes32 hash,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal pure returns (address) {\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n _throwError(error);\n return recovered;\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n // 32 is the length in bytes of hash,\n // enforced by the type signature above\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n }\n\n /**\n * @dev Returns an Ethereum Signed Message, created from `s`. This\n * produces hash corresponding to the one signed with the\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n * JSON-RPC method as part of EIP-191.\n *\n * See {recover}.\n */\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n }\n\n /**\n * @dev Returns an Ethereum Signed Typed Data, created from a\n * `domainSeparator` and a `structHash`. This produces hash corresponding\n * to the one signed with the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n * JSON-RPC method as part of EIP-712.\n *\n * See {recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/governance/utils/VotesUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (governance/utils/Votes.sol)\npragma solidity ^0.8.0;\n\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"../../utils/CountersUpgradeable.sol\";\nimport \"../../utils/CheckpointsUpgradeable.sol\";\nimport \"../../utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"./IVotesUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be\n * transferred, and provides a system of vote delegation, where an account can delegate its voting units to a sort of\n * \"representative\" that will pool delegated voting units from different accounts and can then use it to vote in\n * decisions. In fact, voting units _must_ be delegated in order to count as actual votes, and an account has to\n * delegate those votes to itself if it wishes to participate in decisions and does not have a trusted representative.\n *\n * This contract is often combined with a token contract such that voting units correspond to token units. For an\n * example, see {ERC721Votes}.\n *\n * The full history of delegate votes is tracked on-chain so that governance protocols can consider votes as distributed\n * at a particular block number to protect against flash loans and double voting. The opt-in delegate system makes the\n * cost of this history tracking optional.\n *\n * When using this module the derived contract must implement {_getVotingUnits} (for example, make it return\n * {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the\n * previous example, it would be included in {ERC721-_beforeTokenTransfer}).\n *\n * _Available since v4.5._\n */\nabstract contract VotesUpgradeable is Initializable, IVotesUpgradeable, ContextUpgradeable, EIP712Upgradeable {\n function __Votes_init() internal onlyInitializing {\n }\n\n function __Votes_init_unchained() internal onlyInitializing {\n }\n using CheckpointsUpgradeable for CheckpointsUpgradeable.History;\n using CountersUpgradeable for CountersUpgradeable.Counter;\n\n bytes32 private constant _DELEGATION_TYPEHASH =\n keccak256(\"Delegation(address delegatee,uint256 nonce,uint256 expiry)\");\n\n mapping(address => address) private _delegation;\n mapping(address => CheckpointsUpgradeable.History) private _delegateCheckpoints;\n CheckpointsUpgradeable.History private _totalCheckpoints;\n\n mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n /**\n * @dev Returns the current amount of votes that `account` has.\n */\n function getVotes(address account) public view virtual override returns (uint256) {\n return _delegateCheckpoints[account].latest();\n }\n\n /**\n * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {\n return _delegateCheckpoints[account].getAtBlock(blockNumber);\n }\n\n /**\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\n *\n * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.\n * Votes that have not been delegated are still part of total supply, even though they would not participate in a\n * vote.\n *\n * Requirements:\n *\n * - `blockNumber` must have been already mined\n */\n function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {\n require(blockNumber < block.number, \"Votes: block not yet mined\");\n return _totalCheckpoints.getAtBlock(blockNumber);\n }\n\n /**\n * @dev Returns the current total supply of votes.\n */\n function _getTotalSupply() internal view virtual returns (uint256) {\n return _totalCheckpoints.latest();\n }\n\n /**\n * @dev Returns the delegate that `account` has chosen.\n */\n function delegates(address account) public view virtual override returns (address) {\n return _delegation[account];\n }\n\n /**\n * @dev Delegates votes from the sender to `delegatee`.\n */\n function delegate(address delegatee) public virtual override {\n address account = _msgSender();\n _delegate(account, delegatee);\n }\n\n /**\n * @dev Delegates votes from signer to `delegatee`.\n */\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) public virtual override {\n require(block.timestamp <= expiry, \"Votes: signature expired\");\n address signer = ECDSAUpgradeable.recover(\n _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),\n v,\n r,\n s\n );\n require(nonce == _useNonce(signer), \"Votes: invalid nonce\");\n _delegate(signer, delegatee);\n }\n\n /**\n * @dev Delegate all of `account`'s voting units to `delegatee`.\n *\n * Emits events {DelegateChanged} and {DelegateVotesChanged}.\n */\n function _delegate(address account, address delegatee) internal virtual {\n address oldDelegate = delegates(account);\n _delegation[account] = delegatee;\n\n emit DelegateChanged(account, oldDelegate, delegatee);\n _moveDelegateVotes(oldDelegate, delegatee, _getVotingUnits(account));\n }\n\n /**\n * @dev Transfers, mints, or burns voting units. To register a mint, `from` should be zero. To register a burn, `to`\n * should be zero. Total supply of voting units will be adjusted with mints and burns.\n */\n function _transferVotingUnits(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n if (from == address(0)) {\n _totalCheckpoints.push(_add, amount);\n }\n if (to == address(0)) {\n _totalCheckpoints.push(_subtract, amount);\n }\n _moveDelegateVotes(delegates(from), delegates(to), amount);\n }\n\n /**\n * @dev Moves delegated votes from one delegate to another.\n */\n function _moveDelegateVotes(\n address from,\n address to,\n uint256 amount\n ) private {\n if (from != to && amount > 0) {\n if (from != address(0)) {\n (uint256 oldValue, uint256 newValue) = _delegateCheckpoints[from].push(_subtract, amount);\n emit DelegateVotesChanged(from, oldValue, newValue);\n }\n if (to != address(0)) {\n (uint256 oldValue, uint256 newValue) = _delegateCheckpoints[to].push(_add, amount);\n emit DelegateVotesChanged(to, oldValue, newValue);\n }\n }\n }\n\n function _add(uint256 a, uint256 b) private pure returns (uint256) {\n return a + b;\n }\n\n function _subtract(uint256 a, uint256 b) private pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Consumes a nonce.\n *\n * Returns the current value and increments nonce.\n */\n function _useNonce(address owner) internal virtual returns (uint256 current) {\n CountersUpgradeable.Counter storage nonce = _nonces[owner];\n current = nonce.current();\n nonce.increment();\n }\n\n /**\n * @dev Returns an address nonce.\n */\n function nonces(address owner) public view virtual returns (uint256) {\n return _nonces[owner].current();\n }\n\n /**\n * @dev Returns the contract's {EIP712} domain separator.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32) {\n return _domainSeparatorV4();\n }\n\n /**\n * @dev Must return the voting units held by an account.\n */\n function _getVotingUnits(address) internal view virtual returns (uint256);\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[46] private __gap;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/CheckpointsUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Checkpoints.sol)\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\nimport \"./math/SafeCastUpgradeable.sol\";\n\n/**\n * @dev This library defines the `History` struct, for checkpointing values as they change at different points in\n * time, and later looking up past values by block number. See {Votes} as an example.\n *\n * To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new\n * checkpoint for the current transaction block using the {push} function.\n *\n * _Available since v4.5._\n */\nlibrary CheckpointsUpgradeable {\n struct Checkpoint {\n uint32 _blockNumber;\n uint224 _value;\n }\n\n struct History {\n Checkpoint[] _checkpoints;\n }\n\n /**\n * @dev Returns the value in the latest checkpoint, or zero if there are no checkpoints.\n */\n function latest(History storage self) internal view returns (uint256) {\n uint256 pos = self._checkpoints.length;\n return pos == 0 ? 0 : self._checkpoints[pos - 1]._value;\n }\n\n /**\n * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one\n * before it is returned, or zero otherwise.\n */\n function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) {\n require(blockNumber < block.number, \"Checkpoints: block not yet mined\");\n\n uint256 high = self._checkpoints.length;\n uint256 low = 0;\n while (low < high) {\n uint256 mid = MathUpgradeable.average(low, high);\n if (self._checkpoints[mid]._blockNumber > blockNumber) {\n high = mid;\n } else {\n low = mid + 1;\n }\n }\n return high == 0 ? 0 : self._checkpoints[high - 1]._value;\n }\n\n /**\n * @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block.\n *\n * Returns previous value and new value.\n */\n function push(History storage self, uint256 value) internal returns (uint256, uint256) {\n uint256 pos = self._checkpoints.length;\n uint256 old = latest(self);\n if (pos > 0 && self._checkpoints[pos - 1]._blockNumber == block.number) {\n self._checkpoints[pos - 1]._value = SafeCastUpgradeable.toUint224(value);\n } else {\n self._checkpoints.push(\n Checkpoint({_blockNumber: SafeCastUpgradeable.toUint32(block.number), _value: SafeCastUpgradeable.toUint224(value)})\n );\n }\n return (old, value);\n }\n\n /**\n * @dev Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will\n * be set to `op(latest, delta)`.\n *\n * Returns previous value and new value.\n */\n function push(\n History storage self,\n function(uint256, uint256) view returns (uint256) op,\n uint256 delta\n ) internal returns (uint256, uint256) {\n return push(self, op(latest(self), delta));\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (governance/utils/IVotes.sol)\npragma solidity ^0.8.0;\n\n/**\n * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.\n *\n * _Available since v4.5._\n */\ninterface IVotesUpgradeable {\n /**\n * @dev Emitted when an account changes their delegate.\n */\n event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);\n\n /**\n * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.\n */\n event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);\n\n /**\n * @dev Returns the current amount of votes that `account` has.\n */\n function getVotes(address account) external view returns (uint256);\n\n /**\n * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).\n */\n function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);\n\n /**\n * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).\n *\n * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.\n * Votes that have not been delegated are still part of total supply, even though they would not participate in a\n * vote.\n */\n function getPastTotalSupply(uint256 blockNumber) external view returns (uint256);\n\n /**\n * @dev Returns the delegate that `account` has chosen.\n */\n function delegates(address account) external view returns (address);\n\n /**\n * @dev Delegates votes from the sender to `delegatee`.\n */\n function delegate(address delegatee) external;\n\n /**\n * @dev Delegates votes from signer to `delegatee`.\n */\n function delegateBySig(\n address delegatee,\n uint256 nonce,\n uint256 expiry,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a >= b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. It the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`.\n // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.\n // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.\n // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a\n // good first aproximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1;\n uint256 x = a;\n if (x >> 128 > 0) {\n x >>= 128;\n result <<= 64;\n }\n if (x >> 64 > 0) {\n x >>= 64;\n result <<= 32;\n }\n if (x >> 32 > 0) {\n x >>= 32;\n result <<= 16;\n }\n if (x >> 16 > 0) {\n x >>= 16;\n result <<= 8;\n }\n if (x >> 8 > 0) {\n x >>= 8;\n result <<= 4;\n }\n if (x >> 4 > 0) {\n x >>= 4;\n result <<= 2;\n }\n if (x >> 2 > 0) {\n result <<= 1;\n }\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n uint256 result = sqrt(a);\n if (rounding == Rounding.Up && result * result < a) {\n result += 1;\n }\n return result;\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SafeCastUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCastUpgradeable {\n /**\n * @dev Returns the downcasted uint248 from uint256, reverting on\n * overflow (when the input is greater than largest uint248).\n *\n * Counterpart to Solidity's `uint248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n *\n * _Available since v4.7._\n */\n function toUint248(uint256 value) internal pure returns (uint248) {\n require(value <= type(uint248).max, \"SafeCast: value doesn't fit in 248 bits\");\n return uint248(value);\n }\n\n /**\n * @dev Returns the downcasted uint240 from uint256, reverting on\n * overflow (when the input is greater than largest uint240).\n *\n * Counterpart to Solidity's `uint240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n *\n * _Available since v4.7._\n */\n function toUint240(uint256 value) internal pure returns (uint240) {\n require(value <= type(uint240).max, \"SafeCast: value doesn't fit in 240 bits\");\n return uint240(value);\n }\n\n /**\n * @dev Returns the downcasted uint232 from uint256, reverting on\n * overflow (when the input is greater than largest uint232).\n *\n * Counterpart to Solidity's `uint232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n *\n * _Available since v4.7._\n */\n function toUint232(uint256 value) internal pure returns (uint232) {\n require(value <= type(uint232).max, \"SafeCast: value doesn't fit in 232 bits\");\n return uint232(value);\n }\n\n /**\n * @dev Returns the downcasted uint224 from uint256, reverting on\n * overflow (when the input is greater than largest uint224).\n *\n * Counterpart to Solidity's `uint224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n *\n * _Available since v4.2._\n */\n function toUint224(uint256 value) internal pure returns (uint224) {\n require(value <= type(uint224).max, \"SafeCast: value doesn't fit in 224 bits\");\n return uint224(value);\n }\n\n /**\n * @dev Returns the downcasted uint216 from uint256, reverting on\n * overflow (when the input is greater than largest uint216).\n *\n * Counterpart to Solidity's `uint216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n *\n * _Available since v4.7._\n */\n function toUint216(uint256 value) internal pure returns (uint216) {\n require(value <= type(uint216).max, \"SafeCast: value doesn't fit in 216 bits\");\n return uint216(value);\n }\n\n /**\n * @dev Returns the downcasted uint208 from uint256, reverting on\n * overflow (when the input is greater than largest uint208).\n *\n * Counterpart to Solidity's `uint208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n *\n * _Available since v4.7._\n */\n function toUint208(uint256 value) internal pure returns (uint208) {\n require(value <= type(uint208).max, \"SafeCast: value doesn't fit in 208 bits\");\n return uint208(value);\n }\n\n /**\n * @dev Returns the downcasted uint200 from uint256, reverting on\n * overflow (when the input is greater than largest uint200).\n *\n * Counterpart to Solidity's `uint200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n *\n * _Available since v4.7._\n */\n function toUint200(uint256 value) internal pure returns (uint200) {\n require(value <= type(uint200).max, \"SafeCast: value doesn't fit in 200 bits\");\n return uint200(value);\n }\n\n /**\n * @dev Returns the downcasted uint192 from uint256, reverting on\n * overflow (when the input is greater than largest uint192).\n *\n * Counterpart to Solidity's `uint192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n *\n * _Available since v4.7._\n */\n function toUint192(uint256 value) internal pure returns (uint192) {\n require(value <= type(uint192).max, \"SafeCast: value doesn't fit in 192 bits\");\n return uint192(value);\n }\n\n /**\n * @dev Returns the downcasted uint184 from uint256, reverting on\n * overflow (when the input is greater than largest uint184).\n *\n * Counterpart to Solidity's `uint184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n *\n * _Available since v4.7._\n */\n function toUint184(uint256 value) internal pure returns (uint184) {\n require(value <= type(uint184).max, \"SafeCast: value doesn't fit in 184 bits\");\n return uint184(value);\n }\n\n /**\n * @dev Returns the downcasted uint176 from uint256, reverting on\n * overflow (when the input is greater than largest uint176).\n *\n * Counterpart to Solidity's `uint176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n *\n * _Available since v4.7._\n */\n function toUint176(uint256 value) internal pure returns (uint176) {\n require(value <= type(uint176).max, \"SafeCast: value doesn't fit in 176 bits\");\n return uint176(value);\n }\n\n /**\n * @dev Returns the downcasted uint168 from uint256, reverting on\n * overflow (when the input is greater than largest uint168).\n *\n * Counterpart to Solidity's `uint168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n *\n * _Available since v4.7._\n */\n function toUint168(uint256 value) internal pure returns (uint168) {\n require(value <= type(uint168).max, \"SafeCast: value doesn't fit in 168 bits\");\n return uint168(value);\n }\n\n /**\n * @dev Returns the downcasted uint160 from uint256, reverting on\n * overflow (when the input is greater than largest uint160).\n *\n * Counterpart to Solidity's `uint160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n *\n * _Available since v4.7._\n */\n function toUint160(uint256 value) internal pure returns (uint160) {\n require(value <= type(uint160).max, \"SafeCast: value doesn't fit in 160 bits\");\n return uint160(value);\n }\n\n /**\n * @dev Returns the downcasted uint152 from uint256, reverting on\n * overflow (when the input is greater than largest uint152).\n *\n * Counterpart to Solidity's `uint152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n *\n * _Available since v4.7._\n */\n function toUint152(uint256 value) internal pure returns (uint152) {\n require(value <= type(uint152).max, \"SafeCast: value doesn't fit in 152 bits\");\n return uint152(value);\n }\n\n /**\n * @dev Returns the downcasted uint144 from uint256, reverting on\n * overflow (when the input is greater than largest uint144).\n *\n * Counterpart to Solidity's `uint144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n *\n * _Available since v4.7._\n */\n function toUint144(uint256 value) internal pure returns (uint144) {\n require(value <= type(uint144).max, \"SafeCast: value doesn't fit in 144 bits\");\n return uint144(value);\n }\n\n /**\n * @dev Returns the downcasted uint136 from uint256, reverting on\n * overflow (when the input is greater than largest uint136).\n *\n * Counterpart to Solidity's `uint136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n *\n * _Available since v4.7._\n */\n function toUint136(uint256 value) internal pure returns (uint136) {\n require(value <= type(uint136).max, \"SafeCast: value doesn't fit in 136 bits\");\n return uint136(value);\n }\n\n /**\n * @dev Returns the downcasted uint128 from uint256, reverting on\n * overflow (when the input is greater than largest uint128).\n *\n * Counterpart to Solidity's `uint128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v2.5._\n */\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return uint128(value);\n }\n\n /**\n * @dev Returns the downcasted uint120 from uint256, reverting on\n * overflow (when the input is greater than largest uint120).\n *\n * Counterpart to Solidity's `uint120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n *\n * _Available since v4.7._\n */\n function toUint120(uint256 value) internal pure returns (uint120) {\n require(value <= type(uint120).max, \"SafeCast: value doesn't fit in 120 bits\");\n return uint120(value);\n }\n\n /**\n * @dev Returns the downcasted uint112 from uint256, reverting on\n * overflow (when the input is greater than largest uint112).\n *\n * Counterpart to Solidity's `uint112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n *\n * _Available since v4.7._\n */\n function toUint112(uint256 value) internal pure returns (uint112) {\n require(value <= type(uint112).max, \"SafeCast: value doesn't fit in 112 bits\");\n return uint112(value);\n }\n\n /**\n * @dev Returns the downcasted uint104 from uint256, reverting on\n * overflow (when the input is greater than largest uint104).\n *\n * Counterpart to Solidity's `uint104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n *\n * _Available since v4.7._\n */\n function toUint104(uint256 value) internal pure returns (uint104) {\n require(value <= type(uint104).max, \"SafeCast: value doesn't fit in 104 bits\");\n return uint104(value);\n }\n\n /**\n * @dev Returns the downcasted uint96 from uint256, reverting on\n * overflow (when the input is greater than largest uint96).\n *\n * Counterpart to Solidity's `uint96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n *\n * _Available since v4.2._\n */\n function toUint96(uint256 value) internal pure returns (uint96) {\n require(value <= type(uint96).max, \"SafeCast: value doesn't fit in 96 bits\");\n return uint96(value);\n }\n\n /**\n * @dev Returns the downcasted uint88 from uint256, reverting on\n * overflow (when the input is greater than largest uint88).\n *\n * Counterpart to Solidity's `uint88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n *\n * _Available since v4.7._\n */\n function toUint88(uint256 value) internal pure returns (uint88) {\n require(value <= type(uint88).max, \"SafeCast: value doesn't fit in 88 bits\");\n return uint88(value);\n }\n\n /**\n * @dev Returns the downcasted uint80 from uint256, reverting on\n * overflow (when the input is greater than largest uint80).\n *\n * Counterpart to Solidity's `uint80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n *\n * _Available since v4.7._\n */\n function toUint80(uint256 value) internal pure returns (uint80) {\n require(value <= type(uint80).max, \"SafeCast: value doesn't fit in 80 bits\");\n return uint80(value);\n }\n\n /**\n * @dev Returns the downcasted uint72 from uint256, reverting on\n * overflow (when the input is greater than largest uint72).\n *\n * Counterpart to Solidity's `uint72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n *\n * _Available since v4.7._\n */\n function toUint72(uint256 value) internal pure returns (uint72) {\n require(value <= type(uint72).max, \"SafeCast: value doesn't fit in 72 bits\");\n return uint72(value);\n }\n\n /**\n * @dev Returns the downcasted uint64 from uint256, reverting on\n * overflow (when the input is greater than largest uint64).\n *\n * Counterpart to Solidity's `uint64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v2.5._\n */\n function toUint64(uint256 value) internal pure returns (uint64) {\n require(value <= type(uint64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return uint64(value);\n }\n\n /**\n * @dev Returns the downcasted uint56 from uint256, reverting on\n * overflow (when the input is greater than largest uint56).\n *\n * Counterpart to Solidity's `uint56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n *\n * _Available since v4.7._\n */\n function toUint56(uint256 value) internal pure returns (uint56) {\n require(value <= type(uint56).max, \"SafeCast: value doesn't fit in 56 bits\");\n return uint56(value);\n }\n\n /**\n * @dev Returns the downcasted uint48 from uint256, reverting on\n * overflow (when the input is greater than largest uint48).\n *\n * Counterpart to Solidity's `uint48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n *\n * _Available since v4.7._\n */\n function toUint48(uint256 value) internal pure returns (uint48) {\n require(value <= type(uint48).max, \"SafeCast: value doesn't fit in 48 bits\");\n return uint48(value);\n }\n\n /**\n * @dev Returns the downcasted uint40 from uint256, reverting on\n * overflow (when the input is greater than largest uint40).\n *\n * Counterpart to Solidity's `uint40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n *\n * _Available since v4.7._\n */\n function toUint40(uint256 value) internal pure returns (uint40) {\n require(value <= type(uint40).max, \"SafeCast: value doesn't fit in 40 bits\");\n return uint40(value);\n }\n\n /**\n * @dev Returns the downcasted uint32 from uint256, reverting on\n * overflow (when the input is greater than largest uint32).\n *\n * Counterpart to Solidity's `uint32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v2.5._\n */\n function toUint32(uint256 value) internal pure returns (uint32) {\n require(value <= type(uint32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return uint32(value);\n }\n\n /**\n * @dev Returns the downcasted uint24 from uint256, reverting on\n * overflow (when the input is greater than largest uint24).\n *\n * Counterpart to Solidity's `uint24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n *\n * _Available since v4.7._\n */\n function toUint24(uint256 value) internal pure returns (uint24) {\n require(value <= type(uint24).max, \"SafeCast: value doesn't fit in 24 bits\");\n return uint24(value);\n }\n\n /**\n * @dev Returns the downcasted uint16 from uint256, reverting on\n * overflow (when the input is greater than largest uint16).\n *\n * Counterpart to Solidity's `uint16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v2.5._\n */\n function toUint16(uint256 value) internal pure returns (uint16) {\n require(value <= type(uint16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return uint16(value);\n }\n\n /**\n * @dev Returns the downcasted uint8 from uint256, reverting on\n * overflow (when the input is greater than largest uint8).\n *\n * Counterpart to Solidity's `uint8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v2.5._\n */\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value <= type(uint8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return uint8(value);\n }\n\n /**\n * @dev Converts a signed int256 into an unsigned uint256.\n *\n * Requirements:\n *\n * - input must be greater than or equal to 0.\n *\n * _Available since v3.0._\n */\n function toUint256(int256 value) internal pure returns (uint256) {\n require(value >= 0, \"SafeCast: value must be positive\");\n return uint256(value);\n }\n\n /**\n * @dev Returns the downcasted int248 from int256, reverting on\n * overflow (when the input is less than smallest int248 or\n * greater than largest int248).\n *\n * Counterpart to Solidity's `int248` operator.\n *\n * Requirements:\n *\n * - input must fit into 248 bits\n *\n * _Available since v4.7._\n */\n function toInt248(int256 value) internal pure returns (int248) {\n require(value >= type(int248).min && value <= type(int248).max, \"SafeCast: value doesn't fit in 248 bits\");\n return int248(value);\n }\n\n /**\n * @dev Returns the downcasted int240 from int256, reverting on\n * overflow (when the input is less than smallest int240 or\n * greater than largest int240).\n *\n * Counterpart to Solidity's `int240` operator.\n *\n * Requirements:\n *\n * - input must fit into 240 bits\n *\n * _Available since v4.7._\n */\n function toInt240(int256 value) internal pure returns (int240) {\n require(value >= type(int240).min && value <= type(int240).max, \"SafeCast: value doesn't fit in 240 bits\");\n return int240(value);\n }\n\n /**\n * @dev Returns the downcasted int232 from int256, reverting on\n * overflow (when the input is less than smallest int232 or\n * greater than largest int232).\n *\n * Counterpart to Solidity's `int232` operator.\n *\n * Requirements:\n *\n * - input must fit into 232 bits\n *\n * _Available since v4.7._\n */\n function toInt232(int256 value) internal pure returns (int232) {\n require(value >= type(int232).min && value <= type(int232).max, \"SafeCast: value doesn't fit in 232 bits\");\n return int232(value);\n }\n\n /**\n * @dev Returns the downcasted int224 from int256, reverting on\n * overflow (when the input is less than smallest int224 or\n * greater than largest int224).\n *\n * Counterpart to Solidity's `int224` operator.\n *\n * Requirements:\n *\n * - input must fit into 224 bits\n *\n * _Available since v4.7._\n */\n function toInt224(int256 value) internal pure returns (int224) {\n require(value >= type(int224).min && value <= type(int224).max, \"SafeCast: value doesn't fit in 224 bits\");\n return int224(value);\n }\n\n /**\n * @dev Returns the downcasted int216 from int256, reverting on\n * overflow (when the input is less than smallest int216 or\n * greater than largest int216).\n *\n * Counterpart to Solidity's `int216` operator.\n *\n * Requirements:\n *\n * - input must fit into 216 bits\n *\n * _Available since v4.7._\n */\n function toInt216(int256 value) internal pure returns (int216) {\n require(value >= type(int216).min && value <= type(int216).max, \"SafeCast: value doesn't fit in 216 bits\");\n return int216(value);\n }\n\n /**\n * @dev Returns the downcasted int208 from int256, reverting on\n * overflow (when the input is less than smallest int208 or\n * greater than largest int208).\n *\n * Counterpart to Solidity's `int208` operator.\n *\n * Requirements:\n *\n * - input must fit into 208 bits\n *\n * _Available since v4.7._\n */\n function toInt208(int256 value) internal pure returns (int208) {\n require(value >= type(int208).min && value <= type(int208).max, \"SafeCast: value doesn't fit in 208 bits\");\n return int208(value);\n }\n\n /**\n * @dev Returns the downcasted int200 from int256, reverting on\n * overflow (when the input is less than smallest int200 or\n * greater than largest int200).\n *\n * Counterpart to Solidity's `int200` operator.\n *\n * Requirements:\n *\n * - input must fit into 200 bits\n *\n * _Available since v4.7._\n */\n function toInt200(int256 value) internal pure returns (int200) {\n require(value >= type(int200).min && value <= type(int200).max, \"SafeCast: value doesn't fit in 200 bits\");\n return int200(value);\n }\n\n /**\n * @dev Returns the downcasted int192 from int256, reverting on\n * overflow (when the input is less than smallest int192 or\n * greater than largest int192).\n *\n * Counterpart to Solidity's `int192` operator.\n *\n * Requirements:\n *\n * - input must fit into 192 bits\n *\n * _Available since v4.7._\n */\n function toInt192(int256 value) internal pure returns (int192) {\n require(value >= type(int192).min && value <= type(int192).max, \"SafeCast: value doesn't fit in 192 bits\");\n return int192(value);\n }\n\n /**\n * @dev Returns the downcasted int184 from int256, reverting on\n * overflow (when the input is less than smallest int184 or\n * greater than largest int184).\n *\n * Counterpart to Solidity's `int184` operator.\n *\n * Requirements:\n *\n * - input must fit into 184 bits\n *\n * _Available since v4.7._\n */\n function toInt184(int256 value) internal pure returns (int184) {\n require(value >= type(int184).min && value <= type(int184).max, \"SafeCast: value doesn't fit in 184 bits\");\n return int184(value);\n }\n\n /**\n * @dev Returns the downcasted int176 from int256, reverting on\n * overflow (when the input is less than smallest int176 or\n * greater than largest int176).\n *\n * Counterpart to Solidity's `int176` operator.\n *\n * Requirements:\n *\n * - input must fit into 176 bits\n *\n * _Available since v4.7._\n */\n function toInt176(int256 value) internal pure returns (int176) {\n require(value >= type(int176).min && value <= type(int176).max, \"SafeCast: value doesn't fit in 176 bits\");\n return int176(value);\n }\n\n /**\n * @dev Returns the downcasted int168 from int256, reverting on\n * overflow (when the input is less than smallest int168 or\n * greater than largest int168).\n *\n * Counterpart to Solidity's `int168` operator.\n *\n * Requirements:\n *\n * - input must fit into 168 bits\n *\n * _Available since v4.7._\n */\n function toInt168(int256 value) internal pure returns (int168) {\n require(value >= type(int168).min && value <= type(int168).max, \"SafeCast: value doesn't fit in 168 bits\");\n return int168(value);\n }\n\n /**\n * @dev Returns the downcasted int160 from int256, reverting on\n * overflow (when the input is less than smallest int160 or\n * greater than largest int160).\n *\n * Counterpart to Solidity's `int160` operator.\n *\n * Requirements:\n *\n * - input must fit into 160 bits\n *\n * _Available since v4.7._\n */\n function toInt160(int256 value) internal pure returns (int160) {\n require(value >= type(int160).min && value <= type(int160).max, \"SafeCast: value doesn't fit in 160 bits\");\n return int160(value);\n }\n\n /**\n * @dev Returns the downcasted int152 from int256, reverting on\n * overflow (when the input is less than smallest int152 or\n * greater than largest int152).\n *\n * Counterpart to Solidity's `int152` operator.\n *\n * Requirements:\n *\n * - input must fit into 152 bits\n *\n * _Available since v4.7._\n */\n function toInt152(int256 value) internal pure returns (int152) {\n require(value >= type(int152).min && value <= type(int152).max, \"SafeCast: value doesn't fit in 152 bits\");\n return int152(value);\n }\n\n /**\n * @dev Returns the downcasted int144 from int256, reverting on\n * overflow (when the input is less than smallest int144 or\n * greater than largest int144).\n *\n * Counterpart to Solidity's `int144` operator.\n *\n * Requirements:\n *\n * - input must fit into 144 bits\n *\n * _Available since v4.7._\n */\n function toInt144(int256 value) internal pure returns (int144) {\n require(value >= type(int144).min && value <= type(int144).max, \"SafeCast: value doesn't fit in 144 bits\");\n return int144(value);\n }\n\n /**\n * @dev Returns the downcasted int136 from int256, reverting on\n * overflow (when the input is less than smallest int136 or\n * greater than largest int136).\n *\n * Counterpart to Solidity's `int136` operator.\n *\n * Requirements:\n *\n * - input must fit into 136 bits\n *\n * _Available since v4.7._\n */\n function toInt136(int256 value) internal pure returns (int136) {\n require(value >= type(int136).min && value <= type(int136).max, \"SafeCast: value doesn't fit in 136 bits\");\n return int136(value);\n }\n\n /**\n * @dev Returns the downcasted int128 from int256, reverting on\n * overflow (when the input is less than smallest int128 or\n * greater than largest int128).\n *\n * Counterpart to Solidity's `int128` operator.\n *\n * Requirements:\n *\n * - input must fit into 128 bits\n *\n * _Available since v3.1._\n */\n function toInt128(int256 value) internal pure returns (int128) {\n require(value >= type(int128).min && value <= type(int128).max, \"SafeCast: value doesn't fit in 128 bits\");\n return int128(value);\n }\n\n /**\n * @dev Returns the downcasted int120 from int256, reverting on\n * overflow (when the input is less than smallest int120 or\n * greater than largest int120).\n *\n * Counterpart to Solidity's `int120` operator.\n *\n * Requirements:\n *\n * - input must fit into 120 bits\n *\n * _Available since v4.7._\n */\n function toInt120(int256 value) internal pure returns (int120) {\n require(value >= type(int120).min && value <= type(int120).max, \"SafeCast: value doesn't fit in 120 bits\");\n return int120(value);\n }\n\n /**\n * @dev Returns the downcasted int112 from int256, reverting on\n * overflow (when the input is less than smallest int112 or\n * greater than largest int112).\n *\n * Counterpart to Solidity's `int112` operator.\n *\n * Requirements:\n *\n * - input must fit into 112 bits\n *\n * _Available since v4.7._\n */\n function toInt112(int256 value) internal pure returns (int112) {\n require(value >= type(int112).min && value <= type(int112).max, \"SafeCast: value doesn't fit in 112 bits\");\n return int112(value);\n }\n\n /**\n * @dev Returns the downcasted int104 from int256, reverting on\n * overflow (when the input is less than smallest int104 or\n * greater than largest int104).\n *\n * Counterpart to Solidity's `int104` operator.\n *\n * Requirements:\n *\n * - input must fit into 104 bits\n *\n * _Available since v4.7._\n */\n function toInt104(int256 value) internal pure returns (int104) {\n require(value >= type(int104).min && value <= type(int104).max, \"SafeCast: value doesn't fit in 104 bits\");\n return int104(value);\n }\n\n /**\n * @dev Returns the downcasted int96 from int256, reverting on\n * overflow (when the input is less than smallest int96 or\n * greater than largest int96).\n *\n * Counterpart to Solidity's `int96` operator.\n *\n * Requirements:\n *\n * - input must fit into 96 bits\n *\n * _Available since v4.7._\n */\n function toInt96(int256 value) internal pure returns (int96) {\n require(value >= type(int96).min && value <= type(int96).max, \"SafeCast: value doesn't fit in 96 bits\");\n return int96(value);\n }\n\n /**\n * @dev Returns the downcasted int88 from int256, reverting on\n * overflow (when the input is less than smallest int88 or\n * greater than largest int88).\n *\n * Counterpart to Solidity's `int88` operator.\n *\n * Requirements:\n *\n * - input must fit into 88 bits\n *\n * _Available since v4.7._\n */\n function toInt88(int256 value) internal pure returns (int88) {\n require(value >= type(int88).min && value <= type(int88).max, \"SafeCast: value doesn't fit in 88 bits\");\n return int88(value);\n }\n\n /**\n * @dev Returns the downcasted int80 from int256, reverting on\n * overflow (when the input is less than smallest int80 or\n * greater than largest int80).\n *\n * Counterpart to Solidity's `int80` operator.\n *\n * Requirements:\n *\n * - input must fit into 80 bits\n *\n * _Available since v4.7._\n */\n function toInt80(int256 value) internal pure returns (int80) {\n require(value >= type(int80).min && value <= type(int80).max, \"SafeCast: value doesn't fit in 80 bits\");\n return int80(value);\n }\n\n /**\n * @dev Returns the downcasted int72 from int256, reverting on\n * overflow (when the input is less than smallest int72 or\n * greater than largest int72).\n *\n * Counterpart to Solidity's `int72` operator.\n *\n * Requirements:\n *\n * - input must fit into 72 bits\n *\n * _Available since v4.7._\n */\n function toInt72(int256 value) internal pure returns (int72) {\n require(value >= type(int72).min && value <= type(int72).max, \"SafeCast: value doesn't fit in 72 bits\");\n return int72(value);\n }\n\n /**\n * @dev Returns the downcasted int64 from int256, reverting on\n * overflow (when the input is less than smallest int64 or\n * greater than largest int64).\n *\n * Counterpart to Solidity's `int64` operator.\n *\n * Requirements:\n *\n * - input must fit into 64 bits\n *\n * _Available since v3.1._\n */\n function toInt64(int256 value) internal pure returns (int64) {\n require(value >= type(int64).min && value <= type(int64).max, \"SafeCast: value doesn't fit in 64 bits\");\n return int64(value);\n }\n\n /**\n * @dev Returns the downcasted int56 from int256, reverting on\n * overflow (when the input is less than smallest int56 or\n * greater than largest int56).\n *\n * Counterpart to Solidity's `int56` operator.\n *\n * Requirements:\n *\n * - input must fit into 56 bits\n *\n * _Available since v4.7._\n */\n function toInt56(int256 value) internal pure returns (int56) {\n require(value >= type(int56).min && value <= type(int56).max, \"SafeCast: value doesn't fit in 56 bits\");\n return int56(value);\n }\n\n /**\n * @dev Returns the downcasted int48 from int256, reverting on\n * overflow (when the input is less than smallest int48 or\n * greater than largest int48).\n *\n * Counterpart to Solidity's `int48` operator.\n *\n * Requirements:\n *\n * - input must fit into 48 bits\n *\n * _Available since v4.7._\n */\n function toInt48(int256 value) internal pure returns (int48) {\n require(value >= type(int48).min && value <= type(int48).max, \"SafeCast: value doesn't fit in 48 bits\");\n return int48(value);\n }\n\n /**\n * @dev Returns the downcasted int40 from int256, reverting on\n * overflow (when the input is less than smallest int40 or\n * greater than largest int40).\n *\n * Counterpart to Solidity's `int40` operator.\n *\n * Requirements:\n *\n * - input must fit into 40 bits\n *\n * _Available since v4.7._\n */\n function toInt40(int256 value) internal pure returns (int40) {\n require(value >= type(int40).min && value <= type(int40).max, \"SafeCast: value doesn't fit in 40 bits\");\n return int40(value);\n }\n\n /**\n * @dev Returns the downcasted int32 from int256, reverting on\n * overflow (when the input is less than smallest int32 or\n * greater than largest int32).\n *\n * Counterpart to Solidity's `int32` operator.\n *\n * Requirements:\n *\n * - input must fit into 32 bits\n *\n * _Available since v3.1._\n */\n function toInt32(int256 value) internal pure returns (int32) {\n require(value >= type(int32).min && value <= type(int32).max, \"SafeCast: value doesn't fit in 32 bits\");\n return int32(value);\n }\n\n /**\n * @dev Returns the downcasted int24 from int256, reverting on\n * overflow (when the input is less than smallest int24 or\n * greater than largest int24).\n *\n * Counterpart to Solidity's `int24` operator.\n *\n * Requirements:\n *\n * - input must fit into 24 bits\n *\n * _Available since v4.7._\n */\n function toInt24(int256 value) internal pure returns (int24) {\n require(value >= type(int24).min && value <= type(int24).max, \"SafeCast: value doesn't fit in 24 bits\");\n return int24(value);\n }\n\n /**\n * @dev Returns the downcasted int16 from int256, reverting on\n * overflow (when the input is less than smallest int16 or\n * greater than largest int16).\n *\n * Counterpart to Solidity's `int16` operator.\n *\n * Requirements:\n *\n * - input must fit into 16 bits\n *\n * _Available since v3.1._\n */\n function toInt16(int256 value) internal pure returns (int16) {\n require(value >= type(int16).min && value <= type(int16).max, \"SafeCast: value doesn't fit in 16 bits\");\n return int16(value);\n }\n\n /**\n * @dev Returns the downcasted int8 from int256, reverting on\n * overflow (when the input is less than smallest int8 or\n * greater than largest int8).\n *\n * Counterpart to Solidity's `int8` operator.\n *\n * Requirements:\n *\n * - input must fit into 8 bits\n *\n * _Available since v3.1._\n */\n function toInt8(int256 value) internal pure returns (int8) {\n require(value >= type(int8).min && value <= type(int8).max, \"SafeCast: value doesn't fit in 8 bits\");\n return int8(value);\n }\n\n /**\n * @dev Converts an unsigned uint256 into a signed int256.\n *\n * Requirements:\n *\n * - input must be less than or equal to maxInt256.\n *\n * _Available since v3.0._\n */\n function toInt256(uint256 value) internal pure returns (int256) {\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n require(value <= uint256(type(int256).max), \"SafeCast: value doesn't fit in an int256\");\n return int256(value);\n }\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/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeaconUpgradeable.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 *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967UpgradeUpgradeable is Initializable {\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 Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\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(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (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 Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\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 Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\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(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);\n }\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(address target, bytes memory data) private returns (bytes memory) {\n require(AddressUpgradeable.isContract(target), \"Address: delegate call to non-contract\");\n\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return AddressUpgradeable.verifyCallResult(success, returndata, \"Address: low-level delegate call failed\");\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/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/utils/StorageSlotUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary 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 /**\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" + }, + "contracts/v2/MiniID_v2.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.9;\n\nimport \"../miniID/MiniID.sol\";\n\n// Clone of MiniID used for testing upgrades\n// When making enhancements would code them here\ncontract MiniID_v2 is MiniID {\n\n}\n" + }, + "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlEnumerableUpgradeable.sol\";\nimport \"./AccessControlUpgradeable.sol\";\nimport \"../utils/structs/EnumerableSetUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Extension of {AccessControl} that allows enumerating the members of each role.\n */\nabstract contract AccessControlEnumerableUpgradeable is Initializable, IAccessControlEnumerableUpgradeable, AccessControlUpgradeable {\n function __AccessControlEnumerable_init() internal onlyInitializing {\n }\n\n function __AccessControlEnumerable_init_unchained() internal onlyInitializing {\n }\n using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;\n\n mapping(bytes32 => EnumerableSetUpgradeable.AddressSet) private _roleMembers;\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControlEnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {\n return _roleMembers[role].at(index);\n }\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {\n return _roleMembers[role].length();\n }\n\n /**\n * @dev Overload {_grantRole} to track enumerable memberships\n */\n function _grantRole(bytes32 role, address account) internal virtual override {\n super._grantRole(role, account);\n _roleMembers[role].add(account);\n }\n\n /**\n * @dev Overload {_revokeRole} to track enumerable memberships\n */\n function _revokeRole(bytes32 role, address account) internal virtual override {\n super._revokeRole(role, account);\n _roleMembers[role].remove(account);\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/access/IAccessControlEnumerableUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControlUpgradeable.sol\";\n\n/**\n * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.\n */\ninterface IAccessControlEnumerableUpgradeable is IAccessControlUpgradeable {\n /**\n * @dev Returns one of the accounts that have `role`. `index` must be a\n * value between 0 and {getRoleMemberCount}, non-inclusive.\n *\n * Role bearers are not sorted in any particular way, and their ordering may\n * change at any point.\n *\n * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure\n * you perform all queries on the same block. See the following\n * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]\n * for more information.\n */\n function getRoleMember(bytes32 role, uint256 index) external view returns (address);\n\n /**\n * @dev Returns the number of accounts that have `role`. Can be used\n * together with {getRoleMember} to enumerate all bearers of a role.\n */\n function getRoleMemberCount(bytes32 role) external view returns (uint256);\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n * // Add the library methods\n * using EnumerableSet for EnumerableSet.AddressSet;\n *\n * // Declare a set state variable\n * EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n *\n * [WARNING]\n * ====\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\n *\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.\n * ====\n */\nlibrary EnumerableSetUpgradeable {\n // To implement this library for multiple types with as little code\n // repetition as possible, we write it in terms of a generic Set type with\n // bytes32 values.\n // The Set implementation uses private functions, and user-facing\n // implementations (such as AddressSet) are just wrappers around the\n // underlying Set.\n // This means that we can only create new EnumerableSets for types that fit\n // in bytes32.\n\n struct Set {\n // Storage of set values\n bytes32[] _values;\n // Position of the value in the `values` array, plus 1 because index 0\n // means a value is not in the set.\n mapping(bytes32 => uint256) _indexes;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function _add(Set storage set, bytes32 value) private returns (bool) {\n if (!_contains(set, value)) {\n set._values.push(value);\n // The value is stored at length-1, but we add 1 to all indexes\n // and use 0 as a sentinel value\n set._indexes[value] = set._values.length;\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function _remove(Set storage set, bytes32 value) private returns (bool) {\n // We read and store the value's index to prevent multiple reads from the same storage slot\n uint256 valueIndex = set._indexes[value];\n\n if (valueIndex != 0) {\n // Equivalent to contains(set, value)\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n // the array, and then remove the last element (sometimes called as 'swap and pop').\n // This modifies the order of the array, as noted in {at}.\n\n uint256 toDeleteIndex = valueIndex - 1;\n uint256 lastIndex = set._values.length - 1;\n\n if (lastIndex != toDeleteIndex) {\n bytes32 lastValue = set._values[lastIndex];\n\n // Move the last value to the index where the value to delete is\n set._values[toDeleteIndex] = lastValue;\n // Update the index for the moved value\n set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex\n }\n\n // Delete the slot where the moved value was stored\n set._values.pop();\n\n // Delete the index for the deleted slot\n delete set._indexes[value];\n\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\n return set._indexes[value] != 0;\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function _length(Set storage set) private view returns (uint256) {\n return set._values.length;\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\n return set._values[index];\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function _values(Set storage set) private view returns (bytes32[] memory) {\n return set._values;\n }\n\n // Bytes32Set\n\n struct Bytes32Set {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _add(set._inner, value);\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n return _remove(set._inner, value);\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n return _contains(set._inner, value);\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(Bytes32Set storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n return _at(set._inner, index);\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n return _values(set._inner);\n }\n\n // AddressSet\n\n struct AddressSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(AddressSet storage set, address value) internal returns (bool) {\n return _add(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(AddressSet storage set, address value) internal returns (bool) {\n return _remove(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(AddressSet storage set, address value) internal view returns (bool) {\n return _contains(set._inner, bytes32(uint256(uint160(value))));\n }\n\n /**\n * @dev Returns the number of values in the set. O(1).\n */\n function length(AddressSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\n return address(uint160(uint256(_at(set._inner, index))));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(AddressSet storage set) internal view returns (address[] memory) {\n bytes32[] memory store = _values(set._inner);\n address[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n\n // UintSet\n\n struct UintSet {\n Set _inner;\n }\n\n /**\n * @dev Add a value to a set. O(1).\n *\n * Returns true if the value was added to the set, that is if it was not\n * already present.\n */\n function add(UintSet storage set, uint256 value) internal returns (bool) {\n return _add(set._inner, bytes32(value));\n }\n\n /**\n * @dev Removes a value from a set. O(1).\n *\n * Returns true if the value was removed from the set, that is if it was\n * present.\n */\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\n return _remove(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns true if the value is in the set. O(1).\n */\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n return _contains(set._inner, bytes32(value));\n }\n\n /**\n * @dev Returns the number of values on the set. O(1).\n */\n function length(UintSet storage set) internal view returns (uint256) {\n return _length(set._inner);\n }\n\n /**\n * @dev Returns the value stored at position `index` in the set. O(1).\n *\n * Note that there are no guarantees on the ordering of values inside the\n * array, and it may change when more values are added or removed.\n *\n * Requirements:\n *\n * - `index` must be strictly less than {length}.\n */\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n return uint256(_at(set._inner, index));\n }\n\n /**\n * @dev Return the entire set in an array\n *\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n */\n function values(UintSet storage set) internal view returns (uint256[] memory) {\n bytes32[] memory store = _values(set._inner);\n uint256[] memory result;\n\n /// @solidity memory-safe-assembly\n assembly {\n result := store\n }\n\n return result;\n }\n}\n" + }, + "contracts/miniWallet/MiniWallet.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.9;\n\n// import \"hardhat/console.sol\";\nimport \"./libraries/SafeCast.sol\";\nimport \"./libraries/Enums.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport \"@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\n\n/**\n @title An asset management contract for low value tokens and assets.\n @author John Whitton https://github.com/johnwhitton/\n @notice This contract allows users to transfer native tokens and authorize recipients\n (such as games) to receive these tokens. Once approved it can transfer the native tokens on behalf of the user.\n It also can transfer ERC20, ERC721 and ERC1155 tokens on behalf of the user, after the user approves the MiniWallet contract to do so.\n @dev The MiniWallet is designed to simplify management and transfer of tokens\n by light clients such as the sms-wallet.\n */\ncontract MiniWallet is\n Initializable,\n PausableUpgradeable,\n AccessControlEnumerableUpgradeable,\n UUPSUpgradeable,\n EIP712Upgradeable\n{\n using SafeCast for *;\n using SafeMathUpgradeable for uint256;\n\n /**\n * @dev Emitted when a `user` deposits native tokens (`amount`) into the MiniWallet\n * `balance` is the users new balance held.\n * @param user The user depositing the native token\n * @param amount The amount of native tokens deposited\n * @param balance The users balance of native tokens held by the MiniWallet contract after the deposit\n */\n event DepositSuccessful(\n address indexed user,\n uint256 amount,\n uint256 balance\n );\n\n /**\n * @dev Emitted when a `user` withdraws native tokens (`amount`) from the MiniWallet\n * `balance` is the users new balance held.\n * @param user The user withdrawing the native token\n * @param amount The amount of native tokens withdrawn\n * @param balance The users balance of native tokens held by the MiniWallet contract after the withdrawal\n */\n event WithdrawalSuccessful(\n address indexed user,\n uint256 amount,\n uint256 balance\n );\n\n /**\n * @dev Emitted when an attempt by a `user` to withdraw native tokens `amount` fails\n * `balance` is the users balance held and `reason` gives the reason for failure.\n * e.g. `Insufficient Locked Funds to Withdraw`.\n * @param user The user attempting to withdraw the native token\n * @param amount The amount of native tokens requested to withdraw\n * @param balance The users balance of native tokens held by the MiniWallet contract\n */\n error WithdrawalFailed(\n address user,\n uint256 amount,\n uint256 balance,\n string reason\n );\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 * @param owner The owner of the native token which are being approved\n * @param spender The spender who can spend the native tokens (actual transferring of the funds is done by the operator)\n * @param allowance The allowance of native tokens which can be transferred by the MiniWallet Operator to the spender\n */\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 allowance\n );\n\n /**\n * @dev Emitted when native tokens have been successfully sent by the operator on behalf of the `from` account\n * @param from The sender of the native token\n * @param to The recipient of the native token\n * @param amount The amount of native token sent\n * @param newBalance The updated balance of native tokens held by the MiniWallet contract on behalf of the user\n * @param newAllowance The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender\n */\n event SendSuccessful(\n address indexed from,\n address indexed to,\n uint256 amount,\n uint256 newBalance,\n uint256 newAllowance\n );\n\n /**\n * @dev Emitted when attempting to send native tokens by the operator on behalf of the `from` account to the `to` account fails\n * e.g. if they have insufficient native tokens locked or insufficient funds approved for the to account\n * @param from The sender of the native token\n * @param to The recipient of the native token\n * @param amount The amount of native token sent\n * @param balance The updated balance of native tokens held by the MiniWallet contract on behalf of the user\n * @param allowance The updated allowance of native tokens which can be transferred by the MiniWallet Operator to the spender\n * @param reason The reason the Send Failed\n */\n error SendFailed(\n address from,\n address to,\n uint256 amount,\n uint256 balance,\n uint256 allowance,\n string reason\n );\n\n /**\n * @dev Emitted when transferring tokens (ERC20, ERC721, ERC1155) by the operator on behalf of the `from` account to the `to` account\n * @param amount The amount of the token sent\n * @param tokenType an enumerated value indicating the type of token being sent\n * @param tokenAddress the address of the token contract\n * @param from The sender of the token\n * @param to The recipient of the token\n */\n event TransferSuccessful(\n uint256 amount,\n Enums.TokenType tokenType,\n uint256 tokenId,\n address tokenAddress,\n address indexed from,\n address indexed to\n );\n\n /**\n * @dev Emitted when an attempt to transfer tokens (ERC20, ERC721, ERC1155) by the operator on behalf of the `from` account to the `to` account fails\n * @param amount The amount of the token sent\n * @param tokenType an enumerated value indicating the type of token being sent\n * @param tokenAddress the address of the token contract\n * @param from The sender of the token\n * @param to The recipient of the token\n * @param reason The reason for the failure\n */\n error TransferFailed(\n uint256 amount,\n Enums.TokenType tokenType,\n uint256 tokenId,\n address tokenAddress,\n address from,\n address to,\n string reason\n );\n\n /**\n * @dev Emitted when the `DEFAULT_ADMIN` updates the maximum number of operators allowed\n * @param newThreshold The updated maximum number of operators\n */\n event OperatorThresholdChanged(uint256 newThreshold);\n\n /**\n * @dev Emitted when the `DEFAULT_ADMIN` adds some operators\n * @param operators The operators added\n */\n event OperatorsAdded(address[] operators);\n\n /**\n * @dev Emitted when the `DEFAULT_ADMIN` removes some operators\n * @param operators The operators removed\n */\n event OperatorsRemoved(address[] operators);\n\n /**\n * @dev Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can authorize per recipient\n * @param newGlobalUserAuthLimit The updated global limit of native tokens a user can authorize\n */\n event GlobalUserAuthLimitChanged(uint256 newGlobalUserAuthLimit);\n\n /**\n * @dev Emitted when the `DEFAULT_ADMIN` changes the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract\n * @param newGlobalUserLimit The updated global limit of native tokens a user can hold\n */\n event GlobalUserLimitChanged(uint256 newGlobalUserLimit);\n\n /**\n * @dev The global limit for the amount of Native Tokens a user can authorize per recipient\n * This value is checked when creating allowances.\n */\n uint256 public globalUserAuthLimit;\n\n /**\n * @dev The global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract.\n * This value is checked when depositing funds.\n */\n uint256 public globalUserLimit;\n\n /**\n * @dev This mapping tracks the balances of native tokens stored in the MiniWallet contract for each user\n */\n mapping(address => uint256) public userBalances;\n\n /**\n * @dev `_allowances` is a two layer mapping tracking the allowance each user has given each recipient.\n * It is a many to one relationship i.e. One User can create allowances for multiple recipients.\n */\n mapping(address => mapping(address => uint256)) private _allowances;\n\n /**\n * @dev `operatorThreshold` tracks the maximum number of allowed operators\n * Operators are responsible for transferring tokens on the users behalf.\n * There may be more than one `operator` per `relayer`\n * A `relayer` is an api server which interacts with the client (e.g. sms-wallet).\n * Multiple relayers can be run for performance and load balancing reasons.\n */\n uint8 public operatorThreshold;\n\n /**\n * @dev `OPERATOR_ROLE` is the role assigned to operators\n */\n bytes32 public constant OPERATOR_ROLE = keccak256(\"OPERATOR_ROLE\");\n bytes32 public constant UPGRADER_ROLE = keccak256(\"UPGRADER_ROLE\");\n\n /**\n * @dev `onlyAdmin` modifier is used on functions which only administrators can run\n * e.g. Updating global limits or operator Thresholds and pausing the MiniWallet contract.\n */\n modifier onlyAdmin() {\n require(\n hasRole(DEFAULT_ADMIN_ROLE, msg.sender),\n \"sender doesn't have admin role\"\n );\n _;\n }\n\n /**\n * @dev `onlyOperators` modifier is used on functions which only operators can run\n * e.g. Transferring tokens on behalf of users.\n */\n modifier onlyOperators() {\n require(\n hasRole(OPERATOR_ROLE, msg.sender),\n \"sender doesn't have operator role\"\n );\n _;\n }\n\n /**\n * @dev `adminPauseMiniWallet` pauses the `MiniWallet` contract\n */\n function adminPauseMiniWallet() external onlyAdmin {\n _pause();\n }\n\n /**\n * @dev `adminUnpauseMiniWallet` unpauses the `MiniWallet` contract\n */\n function adminUnpauseMiniWallet() external onlyAdmin {\n _unpause();\n }\n\n /**\n * @dev `renounceAdmin` can only be called by the current administrator\n * It creates a new administrator and renounce the administrator role from the `msg.sender`\n * @param newAdmin the new administrator\n */\n function renounceAdmin(address newAdmin) external onlyAdmin {\n require(msg.sender != newAdmin, \"cannot renounce self\");\n grantRole(DEFAULT_ADMIN_ROLE, newAdmin);\n renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);\n }\n\n /**\n * @dev `adminChangeOperatorThreshold` updates the maximum number of allowed operators\n * @param newThreshold The updated maximum number of operators\n */\n function adminChangeOperatorThreshold(uint256 newThreshold)\n external\n onlyAdmin\n {\n operatorThreshold = newThreshold.toUint8();\n emit OperatorThresholdChanged(newThreshold);\n }\n\n /**\n * @dev `adminAddOperators` adds some new operators (can only be called by admin)\n * @param operatorAddresses The addresses of the new operators\n */\n function adminAddOperators(address[] calldata operatorAddresses)\n external\n onlyAdmin\n {\n for (uint256 i = 0; i < operatorAddresses.length; i++) {\n address operatorAddress = operatorAddresses[i];\n require(\n !hasRole(OPERATOR_ROLE, operatorAddress),\n \"already has operator role\"\n );\n require(\n (getRoleMemberCount(OPERATOR_ROLE) < operatorThreshold),\n \"too many operators\"\n );\n grantRole(OPERATOR_ROLE, operatorAddress);\n }\n emit OperatorsAdded(operatorAddresses);\n }\n\n /**\n * @dev `adminRemoveOperators` removes an operator (can only be called by admin)\n * @param operatorAddresses The addresses of the operators to be removed\n */\n function adminRemoveOperators(address[] calldata operatorAddresses)\n external\n onlyAdmin\n {\n for (uint256 i = 0; i < operatorAddresses.length; i++) {\n address operatorAddress = operatorAddresses[i];\n require(\n hasRole(OPERATOR_ROLE, operatorAddress),\n \"removing non-operator\"\n );\n revokeRole(OPERATOR_ROLE, operatorAddress);\n }\n emit OperatorsRemoved(operatorAddresses);\n }\n\n /**\n * @dev `adminChangeGlobalUserLimit` updates the global limit for the amount of Native Tokens a user can hold in the MiniWallet Contract.\n * This value is checked when depositing funds.\n * This function can only be called by the administrator.\n * @param newGlobalUserLimit The updated global limit.\n */\n function adminChangeGlobalUserLimit(uint256 newGlobalUserLimit)\n external\n onlyAdmin\n {\n globalUserLimit = newGlobalUserLimit;\n emit GlobalUserLimitChanged(newGlobalUserLimit);\n }\n\n /**\n * @dev `adminChangeGlobalUserAuthLimit` updates the global limit for the amount of Native Tokens a user can authorize per recipient\n * This value is checked when creating allowances.\n * This function can only be called by an administrator\n * @param newGlobalUserAuthLimit updated Global User Auth Limit\n */\n function adminChangeGlobalUserAuthLimit(uint256 newGlobalUserAuthLimit)\n external\n onlyAdmin\n {\n globalUserAuthLimit = newGlobalUserAuthLimit;\n emit GlobalUserAuthLimitChanged(newGlobalUserAuthLimit);\n }\n\n /**\n * @dev `initialize` initializes the MiniWallet contract. It should be called directly after the deploy.\n * It is used instead of a `constructor` as the `MiniWallet` is upgradeable.\n * The `msg.sender` is granted the `DEFAULT_ADMIN_ROLE`.\n * @param initialOperatorThreshold The initial maximum number of operators allowed\n * @param initialOperators The address of the initial operators (each will be granted the `OPERATOR_ROLE`)\n * @param globalUserLimit_ The initial limit of how many native tokens a user can deposit\n * @param globalUserAuthLimit_ The initial limit of how many native tokens a user can approve for a recipient\n */\n function initialize(\n uint8 initialOperatorThreshold,\n address[] calldata initialOperators,\n uint256 globalUserLimit_,\n uint256 globalUserAuthLimit_\n ) external initializer {\n address owner = msg.sender;\n // solhint-disable-next-line security/no-inline-assembly\n assembly {\n sstore(\n 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103,\n owner\n )\n }\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\n _grantRole(UPGRADER_ROLE, msg.sender);\n operatorThreshold = initialOperatorThreshold;\n for (uint256 i; i < initialOperators.length; i++) {\n grantRole(OPERATOR_ROLE, initialOperators[i]);\n }\n globalUserLimit = globalUserLimit_;\n globalUserAuthLimit = globalUserAuthLimit_;\n }\n\n /**\n * @dev `deposit` allows a user to deposit funds to the `MiniWallet` contract.\n * It uses `msg.sender` to determine the user and the `msg.value` to determine the amount to deposit.\n * The `amount` deposited needs to be less than or equal to the `globalUserLimit`\n */\n function deposit() public payable whenNotPaused {\n require(\n (userBalances[address(msg.sender)] + msg.value) <= globalUserLimit,\n \"MiniWallet: deposit greater than global limit\"\n );\n userBalances[msg.sender] += msg.value;\n // update the userBalance\n emit DepositSuccessful(msg.sender, msg.value, userBalances[msg.sender]);\n }\n\n /**\n * @dev `withdraw` withdraws an `amount` of native tokens (previously deposited by the user) and transfers them back to the user.\n * `msg.sender` is used to determine the user. If a zero amount is passed then all the native tokens held for that user are withdrawn.\n * @param amount The amount of native tokens to withdraw (zero means withdraw all tokens held for the user)\n */\n function withdraw(uint256 amount) public whenNotPaused {\n uint256 balance = userBalances[msg.sender];\n // if zero is passed withdraw all funds\n if (amount == 0) {\n amount = balance;\n }\n // check msg.senders balance\n if (amount > balance) {\n revert WithdrawalFailed(\n msg.sender,\n amount,\n balance,\n \"Insufficient locked funds to withdraw\"\n );\n }\n\n // withdraw funds from the contract (update userBalance before transfer to protect from reentrancy attack)\n uint256 newBalance = balance - amount;\n userBalances[msg.sender] = newBalance;\n payable(msg.sender).transfer(amount);\n\n // update the userBalance\n emit WithdrawalSuccessful(\n msg.sender,\n amount,\n userBalances[address(msg.sender)]\n );\n }\n\n /**\n * @dev `allowance` returns the number of tokens the `owner` has allowed the `operator` to send to the user.\n * @param owner The owner of the native tokens\n * @param spender The recipient of the native tokens\n * @return Number of tokens allowed\n */\n function allowance(address owner, address spender)\n public\n view\n returns (uint256)\n {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev `approve` approves an amount of native tokens that the operator is allowed to send on behalf of the `msg.sender` to the `spender`.\n * The amount needs to be less than the `globalUserAuthLimit` and the `owner` and `spender` cannot be the zero address.\n * Also if funds are sent they are deposited to the users account, if the value and the users current balance exceeds the `globalUserLimit`\n * the transaction is rejected.\n * @param spender The approved recipient of the native tokens.\n * @param amount The amount of native tokens approved.\n * @return true if the amount is approved\n */\n function approve(address spender, uint256 amount)\n public\n payable\n whenNotPaused\n returns (bool)\n {\n address owner = msg.sender;\n require(\n owner != address(0),\n \"MiniWallet: approve from the zero address\"\n );\n require(\n spender != address(0),\n \"MiniWallet: approve to the zero address\"\n );\n require(\n amount <= globalUserAuthLimit,\n \"MiniWallet: approve greater than global limit\"\n );\n if (msg.value > 0) {\n deposit();\n }\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev `send` is called by an `operator` to send native tokens on behalf of the user.\n * It checks the approved amount for the from and to combination and decreases the approved amount by the amount sent.\n * @param amount The amount of native tokens to send.\n * @param from The account on whose behalf the operator is sending the native tokens from\n * @param to The recipient of the native tokens.\n */\n function send(\n uint256 amount,\n address from,\n address to\n ) public onlyOperators whenNotPaused {\n uint256 balance = userBalances[from];\n uint256 currentAllowance = allowance(from, to);\n if (amount == 0) {\n revert SendFailed(\n from,\n to,\n amount,\n balance,\n currentAllowance,\n \"Send amount cannot equal 0\"\n );\n }\n // check from balance\n if (amount > balance) {\n revert SendFailed(\n from,\n to,\n amount,\n balance,\n currentAllowance,\n \"Insufficient locked funds to send\"\n );\n }\n // check from balance\n if (amount > currentAllowance) {\n revert SendFailed(\n from,\n to,\n amount,\n balance,\n currentAllowance,\n \"Insufficient approved funds to send\"\n );\n }\n // withdraw funds from the contract (update userBalance before transfer to protect from reentrancy attack)\n uint256 newBalance = balance - amount;\n userBalances[from] = newBalance;\n\n // update the approved amount.\n uint256 newLimit = currentAllowance - amount;\n _allowances[from][to] = newLimit;\n payable(to).transfer(amount);\n\n emit SendSuccessful(from, to, amount, newBalance, newLimit);\n }\n\n /**\n * @dev `transfer` transfers tokens (ERC20, ERC721, ERC1155).\n * The user account must have previously approved the `MiniWallet` contract to send the funds.\n * @param amount The amount of the token sent\n * @param tokenType an enumerated value indicating the type of token being sent\n * @param tokenAddress the address of the token contract\n * @param from The sender of the token\n * @param to The recipient of the token\n */\n function transfer(\n uint256 amount,\n Enums.TokenType tokenType,\n uint256 tokenId,\n address tokenAddress,\n address from,\n address to\n ) public onlyOperators whenNotPaused {\n if (tokenType == Enums.TokenType.ERC20) {\n bool success = ERC20(tokenAddress).transferFrom(from, to, amount);\n if (success) {\n emit TransferSuccessful(\n amount,\n tokenType,\n tokenId,\n tokenAddress,\n from,\n to\n );\n } else {\n revert TransferFailed(\n amount,\n tokenType,\n tokenId,\n tokenAddress,\n from,\n to,\n \"ERC20 transfer failure\"\n );\n }\n } else if (tokenType == Enums.TokenType.ERC721) {\n ERC721(tokenAddress).safeTransferFrom(from, to, tokenId);\n emit TransferSuccessful(\n amount,\n tokenType,\n tokenId,\n tokenAddress,\n from,\n to\n );\n } else if (tokenType == Enums.TokenType.ERC1155) {\n ERC1155(tokenAddress).safeTransferFrom(\n from,\n to,\n tokenId,\n amount,\n \"\"\n );\n emit TransferSuccessful(\n amount,\n tokenType,\n tokenId,\n tokenAddress,\n from,\n to\n );\n } else {\n revert TransferFailed(\n amount,\n tokenType,\n tokenId,\n tokenAddress,\n from,\n to,\n \"Invalid tokenType\"\n );\n }\n }\n\n function _authorizeUpgrade(address newImplementation)\n internal\n override\n onlyRole(UPGRADER_ROLE)\n {}\n}\n" + }, + "contracts/miniWallet/libraries/SafeCast.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.9;\n\nlibrary SafeCast {\n function toUint200(uint256 value) internal pure returns (uint200) {\n require(value < 2**200, \"value does not fit in 200 bits\");\n return uint200(value);\n }\n\n function toUint128(uint256 value) internal pure returns (uint128) {\n require(value < 2**128, \"value does not fit in 128 bits\");\n return uint128(value);\n }\n\n function toUint40(uint256 value) internal pure returns (uint40) {\n require(value < 2**40, \"value does not fit in 40 bits\");\n return uint40(value);\n }\n\n function toUint8(uint256 value) internal pure returns (uint8) {\n require(value < 2**8, \"value does not fit in 8 bits\");\n return uint8(value);\n }\n}\n" + }, + "contracts/miniWallet/libraries/Enums.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.9;\n\nlibrary Enums {\n enum TokenType {\n ERC20,\n ERC721,\n ERC1155,\n NONE\n }\n}\n" + }, + "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)\n\npragma solidity ^0.8.0;\n\n// CAUTION\n// This version of SafeMath should only be used with Solidity 0.8 or later,\n// because it relies on the compiler's built in overflow checks.\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations.\n *\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\n * now has built in overflow checking.\n */\nlibrary SafeMathUpgradeable {\n /**\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n uint256 c = a + b;\n if (c < a) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b > a) return (false, 0);\n return (true, a - b);\n }\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n *\n * _Available since v3.4._\n */\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) return (true, 0);\n uint256 c = a * b;\n if (c / a != b) return (false, 0);\n return (true, c);\n }\n }\n\n /**\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a / b);\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n *\n * _Available since v3.4._\n */\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n unchecked {\n if (b == 0) return (false, 0);\n return (true, a % b);\n }\n }\n\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n *\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n return a + b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return a - b;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n *\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n return a * b;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator.\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return a / b;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return a % b;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {trySub}.\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n *\n * - Subtraction cannot overflow.\n */\n function sub(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b <= a, errorMessage);\n return a - b;\n }\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function div(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a / b;\n }\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * reverting with custom message when dividing by zero.\n *\n * CAUTION: This function is deprecated because it requires allocating memory for the error\n * message unnecessarily. For custom revert reasons use {tryMod}.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n *\n * - The divisor cannot be zero.\n */\n function mod(\n uint256 a,\n uint256 b,\n string memory errorMessage\n ) internal pure returns (uint256) {\n unchecked {\n require(b > 0, errorMessage);\n return a % b;\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n }\n _balances[to] += amount;\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n using Address for address;\n using Strings for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: address zero is not a valid owner\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _owners[tokenId];\n require(owner != address(0), \"ERC721: invalid token ID\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n _requireMinted(tokenId);\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overridden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not token owner nor approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n _requireMinted(tokenId);\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: caller is not token owner nor approved\");\n _safeTransfer(from, to, tokenId, data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _owners[tokenId] != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(\n address to,\n uint256 tokenId,\n bytes memory data\n ) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(\n address owner,\n address operator,\n bool approved\n ) internal virtual {\n require(owner != operator, \"ERC721: approve to caller\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n /// @solidity memory-safe-assembly\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1155.sol\";\nimport \"./IERC1155Receiver.sol\";\nimport \"./extensions/IERC1155MetadataURI.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\n using Address for address;\n\n // Mapping from token ID to account balances\n mapping(uint256 => mapping(address => uint256)) private _balances;\n\n // Mapping from account to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n string private _uri;\n\n /**\n * @dev See {_setURI}.\n */\n constructor(string memory uri_) {\n _setURI(uri_);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC1155).interfaceId ||\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC1155MetadataURI-uri}.\n *\n * This implementation returns the same URI for *all* token types. It relies\n * on the token type ID substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * Clients calling this function must replace the `\\{id\\}` substring with the\n * actual token type ID.\n */\n function uri(uint256) public view virtual override returns (string memory) {\n return _uri;\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n require(account != address(0), \"ERC1155: address zero is not a valid owner\");\n return _balances[id][account];\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\n public\n view\n virtual\n override\n returns (uint256[] memory)\n {\n require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i < accounts.length; ++i) {\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) public virtual override {\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not token owner nor approved\"\n );\n _safeTransferFrom(from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) public virtual override {\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not token owner nor approved\"\n );\n _safeBatchTransferFrom(from, to, ids, amounts, data);\n }\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 * - `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(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n address operator = _msgSender();\n uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n _balances[id][to] += amount;\n\n emit TransferSingle(operator, from, to, id, amount);\n\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\n\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n }\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 * - 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[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n _balances[id][to] += amount;\n }\n\n emit TransferBatch(operator, from, to, ids, amounts);\n\n _afterTokenTransfer(operator, from, to, ids, amounts, data);\n\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n }\n\n /**\n * @dev Sets a new URI for all token types, by relying on the token type ID\n * substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n * URI or any of the amounts in the JSON file at said URI will be replaced by\n * clients with the token type ID.\n *\n * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n * interpreted by clients as\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n * for token type ID 0x4cce0.\n *\n * See {uri}.\n *\n * Because these URIs cannot be meaningfully represented by the {URI} event,\n * this function emits no events.\n */\n function _setURI(string memory newuri) internal virtual {\n _uri = newuri;\n }\n\n /**\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _mint(\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n\n address operator = _msgSender();\n uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _balances[id][to] += amount;\n emit TransferSingle(operator, address(0), to, id, amount);\n\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\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 _mintBatch(\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; i++) {\n _balances[ids[i]][to] += amounts[i];\n }\n\n emit TransferBatch(operator, address(0), to, ids, amounts);\n\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n }\n\n /**\n * @dev Destroys `amount` tokens of token type `id` from `from`\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `from` must have at least `amount` tokens of token type `id`.\n */\n function _burn(\n address from,\n uint256 id,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC1155: burn from the zero address\");\n\n address operator = _msgSender();\n uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n\n emit TransferSingle(operator, from, address(0), id, amount);\n\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n */\n function _burnBatch(\n address from,\n uint256[] memory ids,\n uint256[] memory amounts\n ) internal virtual {\n require(from != address(0), \"ERC1155: burn from the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n for (uint256 i = 0; i < ids.length; i++) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n }\n\n emit TransferBatch(operator, from, address(0), ids, amounts);\n\n _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {ApprovalForAll} event.\n */\n function _setApprovalForAll(\n address owner,\n address operator,\n bool approved\n ) internal virtual {\n require(owner != operator, \"ERC1155: setting approval status for self\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `ids` and `amounts` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `id` and `amount` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {}\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n if (response != IERC1155Receiver.onERC1155Received.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\n bytes4 response\n ) {\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n\n return array;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.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 IERC721Receiver {\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/token/ERC721/extensions/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(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 require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(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 require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason 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 // 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}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n }\n}\n" + }, + "@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/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/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.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 IERC1155 is IERC165 {\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(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n 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(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) 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/token/ERC1155/IERC1155Receiver.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/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\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/token/ERC1155/extensions/IERC1155MetadataURI.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n /**\n * @dev Returns the URI for token type `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n" + }, + "contracts/v2/MiniWallet_v2.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.9;\n\nimport \"../miniWallet/MiniWallet.sol\";\n\n// Clone of MiniWallet used for testing upgrades\n// When making enhancements would code them here\ncontract MiniWallet_v2 is MiniWallet {\n\n}\n" + }, + "contracts/miniWallet/mocks/TestTokens.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.9;\n\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/ERC721.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\n\ncontract TestERC20 is ERC20 {\n string constant NAME = \"Test20\";\n string constant SYMBOL = \"T20\";\n address admin;\n\n constructor(uint256 _amount) ERC20(NAME, SYMBOL) {\n admin = msg.sender;\n _mint(msg.sender, _amount);\n }\n\n modifier isAdmin() {\n require(msg.sender == admin, \"Only admin can do this\");\n _;\n }\n\n function mint(address dest, uint256 amount) public isAdmin {\n ERC20._mint(dest, amount);\n }\n\n function burn(address dest, uint256 amount) public isAdmin {\n ERC20._burn(dest, amount);\n }\n}\n\ncontract TestERC20Decimals9 is ERC20 {\n string constant NAME = \"Test20_D9\";\n string constant SYMBOL = \"T20D9\";\n address admin;\n\n constructor(uint256 _amount) ERC20(NAME, SYMBOL) {\n admin = msg.sender;\n _mint(msg.sender, _amount);\n }\n\n modifier isAdmin() {\n require(msg.sender == admin, \"Only admin can do this\");\n _;\n }\n\n function mint(address dest, uint256 amount) public isAdmin {\n ERC20._mint(dest, amount);\n }\n\n function burn(address dest, uint256 amount) public isAdmin {\n ERC20._burn(dest, amount);\n }\n\n function decimals() public pure override returns (uint8) {\n return 9;\n }\n}\n\ncontract TestERC721 is ERC721 {\n string constant NAME = \"Test721\";\n string constant SYMBOL = \"T721\";\n address admin;\n mapping(uint256 => string) uris;\n\n constructor(uint256[] memory tokenIds, string[] memory uris_)\n ERC721(NAME, SYMBOL)\n {\n admin = msg.sender;\n for (uint32 i = 0; i < tokenIds.length; i++) {\n ERC721._mint(msg.sender, tokenIds[i]);\n uris[tokenIds[i]] = uris_[i];\n }\n }\n\n modifier isAdmin() {\n require(msg.sender == admin, \"Only admin can do this\");\n _;\n }\n\n function mint(address dest, uint256 tokenId) external isAdmin {\n ERC721._mint(dest, tokenId);\n }\n\n function burn(uint256 tokenId) external isAdmin {\n ERC721._burn(tokenId);\n }\n\n function setTokenUri(uint256 tokenId, string memory uri) external isAdmin {\n uris[tokenId] = uri;\n }\n\n function tokenURI(uint256 tokenId)\n public\n view\n override\n returns (string memory)\n {\n return uris[tokenId];\n }\n}\n\ncontract TestERC1155 is ERC1155 {\n address admin;\n mapping(uint256 => string) metadataUris;\n\n constructor(\n uint256[] memory tokenIds,\n uint256[] memory amounts,\n string[] memory uris_\n ) ERC1155(\"\") {\n admin = msg.sender;\n for (uint32 i = 0; i < tokenIds.length; i++) {\n ERC1155._mint(msg.sender, tokenIds[i], amounts[i], \"\");\n metadataUris[tokenIds[i]] = uris_[i];\n }\n }\n\n modifier isAdmin() {\n require(msg.sender == admin, \"Only admin can do this\");\n _;\n }\n\n function mint(\n uint256 tokenId,\n uint256 amount,\n address dest,\n string memory metadataUri\n ) public isAdmin {\n ERC1155._mint(dest, tokenId, amount, \"\");\n metadataUris[tokenId] = metadataUri;\n }\n\n function payToMint(\n uint256 tokenId,\n uint256 amount,\n address dest,\n string memory metadataUri\n ) external payable {\n require(msg.value >= (amount * 1 ether), \"Insufficient payment\");\n uint256 excess = msg.value - (amount * 1 ether);\n if (excess > 0) {\n (bool success, bytes memory data) = msg.sender.call{value: excess}(\n \"\"\n );\n if (!success) revert(string(data));\n }\n ERC1155._mint(dest, tokenId, amount, \"\");\n metadataUris[tokenId] = metadataUri;\n }\n\n function setUri(uint256 id, string memory uri_) public isAdmin {\n metadataUris[id] = uri_;\n }\n\n function uri(uint256 id) public view override returns (string memory) {\n return metadataUris[id];\n }\n\n function burn(\n address dest,\n uint256 tokenId,\n uint256 amount\n ) public isAdmin {\n ERC1155._burn(dest, tokenId, amount);\n }\n}\n" + }, + "contracts/miniNFTs/Mini1155.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/security/Pausable.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol\";\nimport \"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol\";\n// import \"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\nimport \"./rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol\";\nimport \"./rarible/royalties/contracts/LibPart.sol\";\nimport \"./rarible/royalties/contracts/LibRoyaltiesV2.sol\";\n\n/// Developed by: John Whitton (github: johnwhittton), Aaron Li (github: polymorpher)\ncontract Mini1155 is\n ERC1155,\n Ownable,\n Pausable,\n ERC1155Burnable,\n ERC1155Supply,\n RoyaltiesV2Impl\n{\n // Contract logic variables\n string public contractURI;\n string public baseUri;\n bytes32 public salt;\n uint256 public mintPrice;\n uint256 public maxPerMint;\n uint256 public standardTokenId;\n uint256 public rareTokenId;\n uint256 public exchangeRatio; // # standard needed to get 1 rare\n uint256 public rareProbabilityPercentage; // chance to get rare token during minting\n\n // Contract admin variables\n address public revenueAccount;\n string public name;\n string public symbol;\n bool public saleIsActive;\n bool public saleStarted;\n bool public metadataFrozen;\n\n // Token specific public variables\n mapping(uint256 => uint256) public maxSupply;\n mapping(uint256 => uint256) public maxPersonalCap;\n mapping(uint256 => string) public metadataUris;\n\n bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;\n\n event SetBaseUri(string baseUri);\n event Mini1155Mint(\n uint256 standardTokenId,\n uint256 numStandardTokens,\n uint256 rareTokenId,\n uint256 numRareTokens,\n address initialOwner\n );\n event Mini1155MintCommunity(\n uint256 tokenId,\n uint256 numTokens,\n address initialOwner\n );\n event Mini1155Transfer(\n uint256 id,\n address from,\n address to,\n address operator\n );\n\n constructor(\n bool _saleIsActive,\n bool _metadataFrozen,\n uint256 _mintPrice,\n uint256 _maxPerMint,\n uint256 _standardTokenId,\n uint256 _rareTokenId,\n uint256 _exchangeRatio,\n uint256 _rareProbabilityPercentage,\n bytes32 _salt,\n string memory _baseUri,\n string memory _contractUri\n ) ERC1155(_baseUri) {\n saleIsActive = _saleIsActive;\n if (saleIsActive) {\n saleStarted = true;\n }\n metadataFrozen = _metadataFrozen;\n mintPrice = _mintPrice;\n maxPerMint = _maxPerMint;\n standardTokenId = _standardTokenId;\n rareTokenId = _rareTokenId;\n exchangeRatio = _exchangeRatio;\n rareProbabilityPercentage = _rareProbabilityPercentage;\n salt = _salt;\n contractURI = _contractUri;\n baseUri = _baseUri;\n setURI(_contractUri);\n }\n\n function setURI(string memory newuri) public onlyOwner {\n _setURI(newuri);\n }\n\n function pause() public onlyOwner {\n _pause();\n }\n\n function unpause() public onlyOwner {\n _unpause();\n }\n\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal override(ERC1155, ERC1155Supply) whenNotPaused {\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n }\n\n // Begin Mini1155 Enhancements\n modifier whenSaleActive() {\n require(saleIsActive, \"sale not active\");\n _;\n }\n\n modifier whenMetadataNotFrozen() {\n require(!metadataFrozen, \"metadata frozen\");\n _;\n }\n\n function supportsInterface(bytes4 interfaceId)\n public\n view\n override\n returns (bool)\n {\n return\n interfaceId == this.name.selector ||\n interfaceId == this.symbol.selector ||\n interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES ||\n interfaceId == _INTERFACE_ID_ERC2981 ||\n super.supportsInterface(interfaceId);\n }\n\n function mint(uint256 _amount) external payable whenSaleActive {\n require(_amount > 0, \"minting too few\");\n require(_amount <= maxPerMint, \"exceeded per mint limit\");\n require(mintPrice * _amount <= msg.value, \"insufficient payment\");\n uint256 excess = msg.value - (_amount * mintPrice);\n if (excess > 0) {\n payable(msg.sender).transfer(excess);\n }\n\n bool isRare = false;\n uint256 standardBalance = ERC1155.balanceOf(\n msg.sender,\n standardTokenId\n );\n uint256 rareBalance = ERC1155.balanceOf(msg.sender, rareTokenId);\n uint256 rareSupply = ERC1155Supply.totalSupply(rareTokenId);\n if (\n rareSupply < maxSupply[rareTokenId] &&\n rareBalance < maxPersonalCap[rareTokenId]\n ) {\n uint256 roll = uint256(\n keccak256(\n bytes.concat(\n salt,\n bytes20(msg.sender),\n bytes32(standardBalance),\n bytes32(rareBalance)\n )\n )\n ) % 100;\n if (roll < (rareProbabilityPercentage * _amount)) {\n isRare = true;\n }\n }\n if (isRare) {\n _amount -= 1;\n _mint(msg.sender, rareTokenId, 1, \"\");\n }\n if (_amount > 0) {\n require(\n totalSupply(standardTokenId) + _amount <=\n maxSupply[standardTokenId],\n \"standard token supply cap exceeded\"\n );\n require(\n standardBalance + _amount <= maxPersonalCap[standardTokenId],\n \"standard token personal cap exceeded\"\n );\n _mint(msg.sender, standardTokenId, _amount, \"\");\n }\n emit Mini1155Mint(\n standardTokenId,\n _amount,\n rareTokenId,\n isRare ? 1 : 0,\n msg.sender\n );\n }\n\n function exchange() public {\n require(exchangeRatio > 0, \"exchange not enabled\");\n uint256 standardBalance = ERC1155.balanceOf(\n msg.sender,\n standardTokenId\n );\n require(standardBalance >= exchangeRatio, \"too few standard tokens\");\n _burn(msg.sender, standardTokenId, exchangeRatio);\n _mint(msg.sender, rareTokenId, 1, \"\");\n }\n\n function uri(uint256 id) public view override returns (string memory) {\n if (bytes(metadataUris[id]).length == 0) {\n // return string(abi.encodePacked(baseUri, uint2str(id), \".json\"));\n return string(abi.encodePacked(baseUri, uint2str(id)));\n }\n return metadataUris[id];\n }\n\n // ------------------\n // Functions for the owner (MiniWallet minting contracts)\n // ------------------\n\n // Explicit Overrides\n function burn(\n address _address,\n uint256 _tokenId,\n uint256 _amount\n ) public override(ERC1155Burnable) onlyOwner {\n ERC1155Burnable.burn(_address, _tokenId, _amount);\n }\n\n function burnBatch(\n address _address,\n uint256[] memory _tokenIds,\n uint256[] memory _amounts\n ) public override(ERC1155Burnable) onlyOwner {\n ERC1155Burnable.burnBatch(_address, _tokenIds, _amounts);\n }\n\n function freezeMetadata() external onlyOwner whenMetadataNotFrozen {\n metadataFrozen = true;\n }\n\n function toggleSaleState() external onlyOwner {\n // require ((saleIsActive || (offsetValue != 0)), \"cannot start sale until airdrop is complete and offset set\");\n saleIsActive = !saleIsActive;\n if (saleIsActive && !saleStarted) {\n saleStarted = true;\n }\n }\n\n function setContractUri(string memory uri_)\n public\n whenMetadataNotFrozen\n onlyOwner\n {\n contractURI = uri_;\n }\n\n function setMaxPerMint(uint256 _maxPerMint) external onlyOwner {\n maxPerMint = _maxPerMint;\n }\n\n function setMintPrice(uint256 _mintPrice) external onlyOwner {\n mintPrice = _mintPrice;\n }\n\n function setMaxSupply(uint256 _tokenId, uint256 _cap) external onlyOwner {\n maxSupply[_tokenId] = _cap;\n }\n\n function setMaxPersonalCap(uint256 _tokenId, uint256 _cap)\n external\n onlyOwner\n {\n maxPersonalCap[_tokenId] = _cap;\n }\n\n function setStandardTokenId(uint256 _tokenId) external onlyOwner {\n standardTokenId = _tokenId;\n }\n\n function setRareTokenId(uint256 _tokenId) external onlyOwner {\n rareTokenId = _tokenId;\n }\n\n function setExchangeRatio(uint256 _exchangeRatio) external onlyOwner {\n exchangeRatio = _exchangeRatio;\n }\n\n function setRareProbabilityPercentage(uint256 _rareProbabilityPercentage)\n external\n onlyOwner\n {\n rareProbabilityPercentage = _rareProbabilityPercentage;\n }\n\n function setBaseUri(string memory _baseUri)\n external\n onlyOwner\n whenMetadataNotFrozen\n {\n baseUri = _baseUri;\n emit SetBaseUri(baseUri);\n }\n\n function mintAsOwner(\n address _to,\n uint256 _tokenId,\n uint256 _numberOfTokens\n ) external onlyOwner {\n require(_to != address(0), \"zero to-address\");\n if (maxSupply[_tokenId] > 0) {\n require(\n totalSupply(_tokenId) + _numberOfTokens <= maxSupply[_tokenId],\n \"supply exceeded\"\n );\n }\n _mint(_to, _tokenId, _numberOfTokens, \"\");\n emit Mini1155MintCommunity(_tokenId, _numberOfTokens, _to);\n }\n\n function withdraw(uint256 amount, bool shouldUseRevenueAccount) public {\n require(\n msg.sender == Ownable.owner() || msg.sender == revenueAccount,\n \"unauthorized\"\n );\n address a = shouldUseRevenueAccount ? revenueAccount : Ownable.owner();\n (bool success, ) = a.call{value: amount}(\"\");\n require(success);\n }\n\n function setUri(uint256 id, string memory uri_)\n public\n onlyOwner\n whenMetadataNotFrozen\n {\n metadataUris[id] = uri_;\n }\n\n function uint2str(uint256 _i)\n internal\n pure\n returns (string memory _uintAsString)\n {\n if (_i == 0) {\n return \"0\";\n }\n uint256 j = _i;\n uint256 len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint256 k = len;\n while (_i != 0) {\n k = k - 1;\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\n bytes1 b1 = bytes1(temp);\n bstr[k] = b1;\n _i /= 10;\n }\n return string(bstr);\n }\n\n function setRevenueAccount(address account) public onlyOwner {\n revenueAccount = account;\n }\n\n function setSalt(bytes32 _salt) public onlyOwner {\n salt = _salt;\n }\n\n function setNameSymbol(string memory name_, string memory symbol_)\n public\n onlyOwner\n {\n name = name_;\n symbol = symbol_;\n }\n\n function setRoyalties(\n uint256 _tokenId,\n address payable _royaltiesReceipientAddress,\n uint96 _percentageBasisPoints\n ) public onlyOwner {\n LibPart.Part[] memory _royalties = new LibPart.Part[](1);\n _royalties[0].value = _percentageBasisPoints;\n _royalties[0].account = _royaltiesReceipientAddress;\n _saveRoyalties(_tokenId, _royalties);\n }\n\n // royalty stuff\n\n function royaltyInfo(uint256 _tokenId, uint256 _salePrice)\n external\n view\n returns (address receiver, uint256 royaltyAmount)\n {\n LibPart.Part[] memory _royalties = royalties[_tokenId];\n if (_royalties.length > 0) {\n return (\n _royalties[0].account,\n (_salePrice * _royalties[0].value) / 10000\n );\n }\n return (address(0), 0);\n }\n\n // accept deposit\n\n receive() external payable {}\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n _requireNotPaused();\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n _requirePaused();\n _;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155.sol\";\n\n/**\n * @dev Extension of {ERC1155} that allows token holders to destroy both their\n * own tokens and those that they have been approved to use.\n *\n * _Available since v3.1._\n */\nabstract contract ERC1155Burnable is ERC1155 {\n function burn(\n address account,\n uint256 id,\n uint256 value\n ) public virtual {\n require(\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\n \"ERC1155: caller is not token owner nor approved\"\n );\n\n _burn(account, id, value);\n }\n\n function burnBatch(\n address account,\n uint256[] memory ids,\n uint256[] memory values\n ) public virtual {\n require(\n account == _msgSender() || isApprovedForAll(account, _msgSender()),\n \"ERC1155: caller is not token owner nor approved\"\n );\n\n _burnBatch(account, ids, values);\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155.sol\";\n\n/**\n * @dev Extension of ERC1155 that adds tracking of total supply per id.\n *\n * Useful for scenarios where Fungible and Non-fungible tokens have to be\n * clearly identified. Note: While a totalSupply of 1 might mean the\n * corresponding is an NFT, there is no guarantees that no other token with the\n * same id are not going to be minted.\n */\nabstract contract ERC1155Supply is ERC1155 {\n mapping(uint256 => uint256) private _totalSupply;\n\n /**\n * @dev Total amount of tokens in with a given id.\n */\n function totalSupply(uint256 id) public view virtual returns (uint256) {\n return _totalSupply[id];\n }\n\n /**\n * @dev Indicates whether any token exist with a given id, or not.\n */\n function exists(uint256 id) public view virtual returns (bool) {\n return ERC1155Supply.totalSupply(id) > 0;\n }\n\n /**\n * @dev See {ERC1155-_beforeTokenTransfer}.\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual override {\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n if (from == address(0)) {\n for (uint256 i = 0; i < ids.length; ++i) {\n _totalSupply[ids[i]] += amounts[i];\n }\n }\n\n if (to == address(0)) {\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n uint256 supply = _totalSupply[id];\n require(supply >= amount, \"ERC1155: burn amount exceeds totalSupply\");\n unchecked {\n _totalSupply[id] = supply - amount;\n }\n }\n }\n }\n}\n" + }, + "contracts/miniNFTs/rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.0;\n\nimport \"./AbstractRoyalties.sol\";\nimport \"../RoyaltiesV2.sol\";\n\ncontract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 {\n function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) {\n return royalties[id];\n }\n\n function _onRoyaltiesSet(uint256 _id, LibPart.Part[] memory _royalties) override internal {\n emit RoyaltiesSet(_id, _royalties);\n }\n}\n" + }, + "contracts/miniNFTs/rarible/royalties/contracts/LibPart.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.0;\n\nlibrary LibPart {\n bytes32 public constant TYPE_HASH = keccak256(\"Part(address account,uint96 value)\");\n\n struct Part {\n address payable account;\n uint96 value;\n }\n\n function hash(Part memory part) internal pure returns (bytes32) {\n return keccak256(abi.encode(TYPE_HASH, part.account, part.value));\n }\n}\n" + }, + "contracts/miniNFTs/rarible/royalties/contracts/LibRoyaltiesV2.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.0;\n\nlibrary LibRoyaltiesV2 {\n /*\n * bytes4(keccak256('getRoyalties(LibAsset.AssetType)')) == 0x44c74bcc\n */\n bytes4 constant _INTERFACE_ID_ROYALTIES = 0x44c74bcc;\n}\n" + }, + "contracts/miniNFTs/rarible/royalties/contracts/impl/AbstractRoyalties.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.0;\n\nimport \"../LibPart.sol\";\n\nabstract contract AbstractRoyalties {\n mapping (uint256 => LibPart.Part[]) public royalties;\n\n function _saveRoyalties(uint256 _id, LibPart.Part[] memory _royalties) internal {\n for (uint i = 0; i < _royalties.length; i++) {\n require(_royalties[i].account != address(0x0), \"Recipient should be present\");\n require(_royalties[i].value != 0, \"Royalty value should be positive\");\n royalties[_id].push(_royalties[i]);\n }\n _onRoyaltiesSet(_id, _royalties);\n }\n\n function _updateAccount(uint256 _id, address _from, address _to) internal {\n uint length = royalties[_id].length;\n for(uint i = 0; i < length; i++) {\n if (royalties[_id][i].account == _from) {\n royalties[_id][i].account = payable(address(uint160(_to)));\n }\n }\n }\n\n function _onRoyaltiesSet(uint256 _id, LibPart.Part[] memory _royalties) virtual internal;\n}\n" + }, + "contracts/miniNFTs/rarible/royalties/contracts/RoyaltiesV2.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.0;\n\nimport \"./LibPart.sol\";\n\ninterface RoyaltiesV2 {\n event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties);\n\n function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory);\n}\n" + }, + "contracts/miniNFTs/Mini721.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.4;\n\nimport \"./ERC721M/ERC721M.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"./rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol\";\nimport \"./rarible/royalties/contracts/LibPart.sol\";\nimport \"./rarible/royalties/contracts/LibRoyaltiesV2.sol\";\n\ncontract Mini721 is ERC721M, Ownable, RoyaltiesV2Impl {\n bytes32 internal salt;\n uint256 public maxMiniTokens;\n uint256 public mintPrice;\n uint256 public maxPerMint;\n uint256 public startIndex;\n\n string public provenanceHash = \"\";\n uint256 public offsetValue;\n\n bool public metadataFrozen;\n bool public provenanceFrozen;\n bool public saleIsActive;\n bool public saleStarted;\n\n mapping(uint256 => string) internal metadataUris;\n string internal _contractUri;\n string public temporaryTokenUri;\n string internal baseUri;\n address internal revenueAccount;\n\n bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;\n\n event SetBaseUri(string baseUri);\n event SetStartIndex(uint256 index);\n event MiniMint(\n uint256 lastTokenId,\n uint256 numTokens,\n address initialOwner\n );\n event MiniMintCommunity(\n uint256 lastTokenId,\n uint256 numTokens,\n address initialOwner\n );\n event MiniBurn(uint256 id);\n event MiniBatchBurn(uint256[] ids);\n event MiniTransfer(uint256 id, address from, address to, address operator);\n event MiniSetup(\n uint32 coolingPeriod_,\n uint32 shipNumber_,\n string contractUri\n );\n\n constructor(\n bool _saleIsActive,\n bool _metadataFrozen,\n bool _provenanceFrozen,\n uint256 _maxMiniTokens,\n uint256 _mintPrice,\n uint256 _maxPerMint,\n string memory _baseUri,\n string memory contractUri_\n ) ERC721M(\"MiniWallet NFT\", \"Mini721\") {\n saleIsActive = _saleIsActive;\n if (saleIsActive) {\n saleStarted = true;\n }\n // false\n metadataFrozen = _metadataFrozen;\n //false\n provenanceFrozen = _provenanceFrozen;\n //false\n maxMiniTokens = _maxMiniTokens;\n // 10000\n mintPrice = _mintPrice;\n // 100000000000000000 = 0.01 ETH\n maxPerMint = _maxPerMint;\n // 10;\n baseUri = _baseUri;\n // \"ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/\";\n _contractUri = contractUri_;\n //\"ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/contract.json\"; //TODO review URI\n }\n\n modifier whenSaleActive() {\n require(saleIsActive, \"Mini721: Sale is not active\");\n _;\n }\n\n modifier whenMetadataNotFrozen() {\n require(!metadataFrozen, \"Mini721: Metadata is frozen\");\n _;\n }\n\n modifier whenProvenanceNotFrozen() {\n require(!provenanceFrozen, \"Mini721: Provenance is frozen\");\n _;\n }\n\n // ------------------\n // Explicit overrides\n // ------------------\n\n function _burn(uint256 tokenId) internal virtual override(ERC721M) {\n super._burn(tokenId);\n }\n\n function setTemporaryTokenUri(string memory uri) public onlyOwner {\n temporaryTokenUri = uri;\n }\n\n function tokenURI(uint256 tokenId)\n public\n view\n virtual\n override(ERC721M)\n returns (string memory)\n {\n if (!metadataFrozen && bytes(temporaryTokenUri).length > 0) {\n return temporaryTokenUri;\n }\n if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n uint256 tid = tokenId;\n if (tid >= offsetValue) {\n tid =\n ((startIndex + tid - offsetValue) %\n (maxMiniTokens - offsetValue)) +\n offsetValue;\n }\n\n if (bytes(metadataUris[tokenId]).length == 0) {\n return\n bytes(baseUri).length != 0\n ? string(abi.encodePacked(baseUri, uint2str(tid)))\n : \"\";\n }\n return metadataUris[tokenId];\n }\n\n function setStartIndex() external onlyOwner {\n startIndex =\n uint256(\n keccak256(\n abi.encodePacked(\n blockhash(block.number - 2),\n bytes20(msg.sender),\n bytes32(totalSupply())\n )\n )\n ) %\n (maxMiniTokens - offsetValue);\n emit SetStartIndex(startIndex);\n }\n\n function _baseURI() internal view override returns (string memory) {\n return baseUri;\n }\n\n function supportsInterface(bytes4 interfaceId)\n public\n view\n override\n returns (bool)\n {\n return\n interfaceId == this.name.selector ||\n interfaceId == this.symbol.selector ||\n interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES ||\n interfaceId == _INTERFACE_ID_ERC2981 ||\n ERC721M.supportsInterface(interfaceId);\n }\n\n // ------------------\n // Utility view functions\n // ------------------\n\n function exists(uint256 _tokenId) public view returns (bool) {\n return _exists(_tokenId);\n }\n\n //TODO review if we need to override the contractURI\n function contractURI() public view returns (string memory) {\n return _contractUri;\n }\n\n // ------------------\n // Functions for external (user) minting\n // ------------------\n\n function mintMini(uint256 amount) external payable whenSaleActive {\n require(\n totalSupply() + amount < maxMiniTokens,\n \"Mini721: Purchase would exceed cap\"\n );\n require(amount <= maxPerMint, \"Mini721: Amount exceeds max per mint\");\n require(\n mintPrice * amount <= msg.value,\n \"Mini721: Ether value sent is not correct\"\n );\n uint256 excess = msg.value - (amount * mintPrice);\n if (excess > 0) {\n payable(msg.sender).transfer(excess);\n }\n _safeMint(msg.sender, amount);\n emit MiniMint(totalSupply(), amount, msg.sender);\n }\n\n function burn(uint256 id) public onlyOwner whenMetadataNotFrozen {\n ERC721M._burn(id);\n emit MiniBurn(id);\n }\n\n function batchBurn(uint256[] memory ids)\n public\n onlyOwner\n whenMetadataNotFrozen\n {\n for (uint32 i = 0; i < ids.length; i++) {\n uint256 id = ids[i];\n ERC721M._burn(id);\n }\n emit MiniBatchBurn(ids);\n }\n\n // ------------------\n // Functions for the owner (Mini minting contracts)\n // ------------------\n\n function freezeMetadata() external onlyOwner whenMetadataNotFrozen {\n metadataFrozen = true;\n }\n\n function freezeProvenance() external onlyOwner whenProvenanceNotFrozen {\n provenanceFrozen = true;\n }\n\n function toggleSaleState() external onlyOwner {\n require(\n (saleIsActive || (offsetValue != 0)),\n \"cannot start sale until airdrop is complete and offset set\"\n );\n saleIsActive = !saleIsActive;\n if (saleIsActive && !saleStarted) {\n saleStarted = true;\n }\n }\n\n function setContractUri(string memory uri_) public onlyOwner {\n _contractUri = uri_;\n }\n\n function setProvenanceHash(string memory _provenanceHash)\n external\n onlyOwner\n whenProvenanceNotFrozen\n {\n provenanceHash = _provenanceHash;\n }\n\n function setOffsetValue(uint256 _offsetValue) external onlyOwner {\n require(!saleStarted, \"sale already begun\");\n offsetValue = _offsetValue;\n }\n\n function setMaxPerMint(uint256 _maxPerMint) external onlyOwner {\n maxPerMint = _maxPerMint;\n }\n\n function setMintPrice(uint256 _mintPrice) external onlyOwner {\n mintPrice = _mintPrice;\n }\n\n function setBaseUri(string memory _baseUri)\n external\n onlyOwner\n whenMetadataNotFrozen\n {\n baseUri = _baseUri;\n emit SetBaseUri(baseUri);\n }\n\n function mintForCommunity(address _to, uint256 _numberOfTokens)\n external\n onlyOwner\n {\n require(_to != address(0), \"Mini721: Cannot mint to zero address.\");\n require(\n totalSupply() + _numberOfTokens < maxMiniTokens,\n \"Mini721: Minting would exceed cap\"\n );\n _safeMint(_to, _numberOfTokens);\n emit MiniMintCommunity(totalSupply(), _numberOfTokens, _to);\n }\n\n function withdraw(uint256 amount, bool shouldUseRevenueAccount) public {\n require(\n msg.sender == Ownable.owner() || msg.sender == revenueAccount,\n \"unauthorized\"\n );\n address a = shouldUseRevenueAccount ? revenueAccount : Ownable.owner();\n (bool success, ) = a.call{value: amount}(\"\");\n require(success);\n }\n\n function setUri(uint256 id, string memory uri_)\n public\n onlyOwner\n whenMetadataNotFrozen\n {\n metadataUris[id] = uri_;\n }\n\n function uint2str(uint256 _i)\n internal\n pure\n returns (string memory _uintAsString)\n {\n if (_i == 0) {\n return \"0\";\n }\n uint256 j = _i;\n uint256 len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint256 k = len;\n while (_i != 0) {\n k = k - 1;\n uint8 temp = (48 + uint8(_i - (_i / 10) * 10));\n bytes1 b1 = bytes1(temp);\n bstr[k] = b1;\n _i /= 10;\n }\n return string(bstr);\n }\n\n function setRevenueAccount(address account) public onlyOwner {\n revenueAccount = account;\n }\n\n function setRoyalties(\n uint256 _tokenId,\n address payable _royaltiesReceipientAddress,\n uint96 _percentageBasisPoints\n ) public onlyOwner {\n LibPart.Part[] memory _royalties = new LibPart.Part[](1);\n _royalties[0].value = _percentageBasisPoints;\n _royalties[0].account = _royaltiesReceipientAddress;\n _saveRoyalties(_tokenId, _royalties);\n }\n\n function royaltyInfo(uint256 _tokenId, uint256 _salePrice)\n external\n view\n returns (address receiver, uint256 royaltyAmount)\n {\n LibPart.Part[] memory _royalties = royalties[_tokenId];\n if (_royalties.length > 0) {\n return (\n _royalties[0].account,\n (_salePrice * _royalties[0].value) / 10000\n );\n }\n return (address(0), 0);\n }\n\n receive() external payable {}\n\n // ------------------\n // Utility function for getting the tokens of a certain address\n // ------------------\n\n function tokensOfOwner(address _owner)\n external\n view\n returns (uint256[] memory)\n {\n uint256 tokenCount = balanceOf(_owner);\n if (tokenCount == 0) {\n return new uint256[](0);\n } else {\n uint256[] memory result = new uint256[](tokenCount);\n for (uint256 index; index < tokenCount; index++) {\n result[index] = tokenOfOwnerByIndex(_owner, index);\n }\n return result;\n }\n }\n}\n" + }, + "contracts/miniNFTs/ERC721M/ERC721M.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\n// Creator: Chiru Labs\n// Feb 23rd 2022, Modification for sms-wallet by John Whitton\n\npragma solidity ^0.8.4;\n\nimport \"@openzeppelin/contracts/token/ERC721/IERC721.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\";\nimport \"@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol\";\nimport \"@openzeppelin/contracts/utils/Address.sol\";\nimport \"@openzeppelin/contracts/utils/Context.sol\";\nimport \"@openzeppelin/contracts/utils/Strings.sol\";\nimport \"@openzeppelin/contracts/utils/introspection/ERC165.sol\";\n\nerror ApprovalCallerNotOwnerNorApproved();\nerror ApprovalQueryForNonexistentToken();\nerror ApproveToCaller();\nerror ApprovalToCurrentOwner();\nerror BalanceQueryForZeroAddress();\nerror MintedQueryForZeroAddress();\nerror BurnedQueryForZeroAddress();\nerror MintToZeroAddress();\nerror MintZeroQuantity();\nerror OwnerIndexOutOfBounds();\nerror OwnerQueryForNonexistentToken();\nerror TokenIndexOutOfBounds();\nerror TransferCallerNotOwnerNorApproved();\nerror TransferFromIncorrectOwner();\nerror TransferToNonERC721ReceiverImplementer();\nerror TransferToZeroAddress();\nerror URIQueryForNonexistentToken();\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.\n *\n * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..).\n *\n * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.\n *\n * Assumes that the maximum token id cannot exceed 2**128 - 1 (max value of uint128).\n */\ncontract ERC721M is\n Context,\n ERC165,\n IERC721,\n IERC721Metadata,\n IERC721Enumerable\n{\n using Address for address;\n using Strings for uint256;\n\n // Compiler will pack this into a single 256bit word.\n struct TokenOwnership {\n // The address of the owner.\n address addr;\n // Keeps track of the start time of ownership with minimal overhead for tokenomics.\n uint64 startTimestamp;\n // Whether the token has been burned.\n bool burned;\n }\n\n // Compiler will pack this into a single 256bit word.\n struct AddressData {\n // Realistically, 2**64-1 is more than enough.\n uint64 balance;\n // Keeps track of mint count with minimal overhead for tokenomics.\n uint64 numberMinted;\n // Keeps track of burn count with minimal overhead for tokenomics.\n uint64 numberBurned;\n }\n\n // Compiler will pack the following\n // _currentIndex and _burnCounter into a single 256bit word.\n\n // The tokenId of the next token to be minted.\n uint128 internal _currentIndex;\n\n // The number of tokens burned.\n uint128 internal _burnCounter;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to ownership details\n // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details.\n mapping(uint256 => TokenOwnership) internal _ownerships;\n\n // Mapping owner address to address data\n mapping(address => AddressData) private _addressData;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC721Enumerable-totalSupply}.\n */\n function totalSupply() public view override returns (uint256) {\n // Counter underflow is impossible as _burnCounter cannot be incremented\n // more than _currentIndex times\n unchecked {\n return _currentIndex - _burnCounter;\n }\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenByIndex}.\n * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.\n * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.\n */\n function tokenByIndex(uint256 index)\n public\n view\n override\n returns (uint256)\n {\n uint256 numMintedSoFar = _currentIndex;\n uint256 tokenIdsIdx;\n\n // Counter overflow is impossible as the loop breaks when\n // uint256 i is equal to another uint256 numMintedSoFar.\n unchecked {\n for (uint256 i; i < numMintedSoFar; i++) {\n TokenOwnership memory ownership = _ownerships[i];\n if (!ownership.burned) {\n if (tokenIdsIdx == index) {\n return i;\n }\n tokenIdsIdx++;\n }\n }\n }\n revert TokenIndexOutOfBounds();\n }\n\n /**\n * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.\n * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first.\n * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index)\n public\n view\n override\n returns (uint256)\n {\n if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds();\n uint256 numMintedSoFar = _currentIndex;\n uint256 tokenIdsIdx;\n address currOwnershipAddr;\n\n // Counter overflow is impossible as the loop breaks when\n // uint256 i is equal to another uint256 numMintedSoFar.\n unchecked {\n for (uint256 i; i < numMintedSoFar; i++) {\n TokenOwnership memory ownership = _ownerships[i];\n if (ownership.burned) {\n continue;\n }\n if (ownership.addr != address(0)) {\n currOwnershipAddr = ownership.addr;\n }\n if (currOwnershipAddr == owner) {\n if (tokenIdsIdx == index) {\n return i;\n }\n tokenIdsIdx++;\n }\n }\n }\n\n // Execution should never reach this point.\n revert();\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId)\n public\n view\n virtual\n override(ERC165, IERC165)\n returns (bool)\n {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n interfaceId == type(IERC721Enumerable).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view override returns (uint256) {\n if (owner == address(0)) revert BalanceQueryForZeroAddress();\n return uint256(_addressData[owner].balance);\n }\n\n function _numberMinted(address owner) internal view returns (uint256) {\n if (owner == address(0)) revert MintedQueryForZeroAddress();\n return uint256(_addressData[owner].numberMinted);\n }\n\n function _numberBurned(address owner) internal view returns (uint256) {\n if (owner == address(0)) revert BurnedQueryForZeroAddress();\n return uint256(_addressData[owner].numberBurned);\n }\n\n /**\n * Gas spent here starts off proportional to the maximum mint batch size.\n * It gradually moves to O(1) as tokens get transferred around in the collection over time.\n */\n function ownershipOf(uint256 tokenId)\n internal\n view\n returns (TokenOwnership memory)\n {\n uint256 curr = tokenId;\n\n unchecked {\n if (curr < _currentIndex) {\n TokenOwnership memory ownership = _ownerships[curr];\n if (!ownership.burned) {\n if (ownership.addr != address(0)) {\n return ownership;\n }\n // Invariant:\n // There will always be an ownership that has an address and is not burned\n // before an ownership that does not have an address and is not burned.\n // Hence, curr will not underflow.\n while (true) {\n curr--;\n ownership = _ownerships[curr];\n if (ownership.addr != address(0)) {\n return ownership;\n }\n }\n }\n }\n }\n revert OwnerQueryForNonexistentToken();\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view override returns (address) {\n return ownershipOf(tokenId).addr;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId)\n public\n view\n virtual\n override\n returns (string memory)\n {\n if (!_exists(tokenId)) revert URIQueryForNonexistentToken();\n\n string memory baseURI = _baseURI();\n return\n bytes(baseURI).length != 0\n ? string(abi.encodePacked(baseURI, tokenId.toString()))\n : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overriden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public override {\n address owner = ERC721M.ownerOf(tokenId);\n if (to == owner) revert ApprovalToCurrentOwner();\n\n if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {\n revert ApprovalCallerNotOwnerNorApproved();\n }\n\n _approve(to, tokenId, owner);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId)\n public\n view\n override\n returns (address)\n {\n if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved)\n public\n override\n {\n if (operator == _msgSender()) revert ApproveToCaller();\n\n _operatorApprovals[_msgSender()][operator] = approved;\n emit ApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator)\n public\n view\n virtual\n override\n returns (bool)\n {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) public virtual override {\n _transfer(from, to, tokenId);\n if (!_checkOnERC721Received(from, to, tokenId, _data)) {\n revert TransferToNonERC721ReceiverImplementer();\n }\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n */\n function _exists(uint256 tokenId) internal view returns (bool) {\n return tokenId < _currentIndex && !_ownerships[tokenId].burned;\n }\n\n function _safeMint(address to, uint256 quantity) internal {\n _safeMint(to, quantity, \"\");\n }\n\n /**\n * @dev Safely mints `quantity` tokens and transfers them to `to`.\n *\n * Requirements:\n *\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.\n * - `quantity` must be greater than 0.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(\n address to,\n uint256 quantity,\n bytes memory _data\n ) internal {\n _mint(to, quantity, _data, true);\n }\n\n /**\n * @dev Mints `quantity` tokens and transfers them to `to`.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `quantity` must be greater than 0.\n *\n * Emits a {Transfer} event.\n */\n function _mint(\n address to,\n uint256 quantity,\n bytes memory _data,\n bool safe\n ) internal {\n uint256 startTokenId = _currentIndex;\n if (to == address(0)) revert MintToZeroAddress();\n if (quantity == 0) revert MintZeroQuantity();\n\n _beforeTokenTransfers(address(0), to, startTokenId, quantity);\n\n // Overflows are incredibly unrealistic.\n // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1\n // updatedIndex overflows if _currentIndex + quantity > 3.4e38 (2**128) - 1\n unchecked {\n _addressData[to].balance += uint64(quantity);\n _addressData[to].numberMinted += uint64(quantity);\n\n _ownerships[startTokenId].addr = to;\n _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);\n\n uint256 updatedIndex = startTokenId;\n\n for (uint256 i; i < quantity; i++) {\n emit Transfer(address(0), to, updatedIndex);\n if (\n safe &&\n !_checkOnERC721Received(address(0), to, updatedIndex, _data)\n ) {\n revert TransferToNonERC721ReceiverImplementer();\n }\n updatedIndex++;\n }\n\n _currentIndex = uint128(updatedIndex);\n }\n _afterTokenTransfers(address(0), to, startTokenId, quantity);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) private {\n TokenOwnership memory prevOwnership = ownershipOf(tokenId);\n\n bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||\n isApprovedForAll(prevOwnership.addr, _msgSender()) ||\n getApproved(tokenId) == _msgSender());\n\n if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();\n if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();\n if (to == address(0)) revert TransferToZeroAddress();\n\n _beforeTokenTransfers(from, to, tokenId, 1);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId, prevOwnership.addr);\n\n // Underflow of the sender's balance is impossible because we check for\n // ownership above and the recipient's balance can't realistically overflow.\n // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128.\n unchecked {\n _addressData[from].balance -= 1;\n _addressData[to].balance += 1;\n\n _ownerships[tokenId].addr = to;\n _ownerships[tokenId].startTimestamp = uint64(block.timestamp);\n\n // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.\n // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.\n uint256 nextTokenId = tokenId + 1;\n if (_ownerships[nextTokenId].addr == address(0)) {\n // This will suffice for checking _exists(nextTokenId),\n // as a burned slot cannot contain the zero address.\n if (nextTokenId < _currentIndex) {\n _ownerships[nextTokenId].addr = prevOwnership.addr;\n _ownerships[nextTokenId].startTimestamp = prevOwnership\n .startTimestamp;\n }\n }\n }\n\n emit Transfer(from, to, tokenId);\n _afterTokenTransfers(from, to, tokenId, 1);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n TokenOwnership memory prevOwnership = ownershipOf(tokenId);\n\n _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId, prevOwnership.addr);\n\n // Underflow of the sender's balance is impossible because we check for\n // ownership above and the recipient's balance can't realistically overflow.\n // Counter overflow is incredibly unrealistic as tokenId would have to be 2**128.\n unchecked {\n _addressData[prevOwnership.addr].balance -= 1;\n _addressData[prevOwnership.addr].numberBurned += 1;\n\n // Keep track of who burned the token, and the timestamp of burning.\n _ownerships[tokenId].addr = prevOwnership.addr;\n _ownerships[tokenId].startTimestamp = uint64(block.timestamp);\n _ownerships[tokenId].burned = true;\n\n // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.\n // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.\n uint256 nextTokenId = tokenId + 1;\n if (_ownerships[nextTokenId].addr == address(0)) {\n // This will suffice for checking _exists(nextTokenId),\n // as a burned slot cannot contain the zero address.\n if (nextTokenId < _currentIndex) {\n _ownerships[nextTokenId].addr = prevOwnership.addr;\n _ownerships[nextTokenId].startTimestamp = prevOwnership\n .startTimestamp;\n }\n }\n }\n\n emit Transfer(prevOwnership.addr, address(0), tokenId);\n _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1);\n\n // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.\n unchecked {\n _burnCounter++;\n }\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits a {Approval} event.\n */\n function _approve(\n address to,\n uint256 tokenId,\n address owner\n ) private {\n _tokenApprovals[tokenId] = to;\n emit Approval(owner, to, tokenId);\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) private returns (bool) {\n if (to.isContract()) {\n try\n IERC721Receiver(to).onERC721Received(\n _msgSender(),\n from,\n tokenId,\n _data\n )\n returns (bytes4 retval) {\n return retval == IERC721Receiver(to).onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert TransferToNonERC721ReceiverImplementer();\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.\n * And also called before burning one token.\n *\n * startTokenId - the first token id to be transferred\n * quantity - the amount to be transferred\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, `tokenId` will be burned by `from`.\n * - `from` and `to` are never both zero.\n */\n function _beforeTokenTransfers(\n address from,\n address to,\n uint256 startTokenId,\n uint256 quantity\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes\n * minting.\n * And also called after one token has been burned.\n *\n * startTokenId - the first token id to be transferred\n * quantity - the amount to be transferred\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been\n * transferred to `to`.\n * - When `from` is zero, `tokenId` has been minted for `to`.\n * - When `to` is zero, `tokenId` has been burned by `from`.\n * - `from` and `to` are never both zero.\n */\n function _afterTokenTransfers(\n address from,\n address to,\n uint256 startTokenId,\n uint256 quantity\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Enumerable is IERC721 {\n /**\n * @dev Returns the total amount of tokens stored by the contract.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns a token ID owned by `owner` at a given `index` of its token list.\n * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);\n\n /**\n * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.\n * Use along with {totalSupply} to enumerate all tokens.\n */\n function tokenByIndex(uint256 index) external view returns (uint256);\n}\n" + }, + "contracts/miniNFTs/rarible/royalties/contracts/IRoyaltiesProvider.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\npragma solidity ^0.8.0;\nimport \"./LibPart.sol\";\ninterface IRoyaltiesProvider {\n function getRoyalties(address token, uint tokenId) external returns (LibPart.Part[] memory);\n}\n" + }, + "contracts/miniNFTs/ERC721M/extensions/ERC721MBurnable.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\n// Creator: Chiru Labs\n// Sep 1st 2022, Modification for MiniWallet by John Whitton\n\npragma solidity ^0.8.4;\n\nimport \"../ERC721M.sol\";\nimport \"@openzeppelin/contracts/utils/Context.sol\";\n\n/**\n * @title ERC721M Burnable Token\n * @dev ERC721M Token that can be irreversibly burned (destroyed).\n */\nabstract contract ERC721MBurnable is Context, ERC721M {\n /**\n * @dev Burns `tokenId`. See {ERC721M-_burn}.\n *\n * Requirements:\n *\n * - The caller must own `tokenId` or be an approved operator.\n */\n function burn(uint256 tokenId) public virtual {\n TokenOwnership memory prevOwnership = ownershipOf(tokenId);\n\n bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||\n isApprovedForAll(prevOwnership.addr, _msgSender()) ||\n getApproved(tokenId) == _msgSender());\n\n if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();\n\n _burn(tokenId);\n }\n}\n" + }, + "contracts/miniNFTs/ERC721M/extensions/ERC721MOwnersExplicit.sol": { + "content": "// SPDX-License-Identifier: Apache-2.0\n\n// Creator: Chiru Labs\n// Sep 1st 2022, Modification for MiniWallet by John Whitton\n\npragma solidity ^0.8.4;\n\nimport \"../ERC721M.sol\";\n\nerror AllOwnershipsHaveBeenSet();\nerror QuantityMustBeNonZero();\nerror NoTokensMintedYet();\n\nabstract contract ERC721MOwnersExplicit is ERC721M {\n uint256 public nextOwnerToExplicitlySet;\n\n /**\n * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().\n */\n function _setOwnersExplicit(uint256 quantity) internal {\n if (quantity == 0) revert QuantityMustBeNonZero();\n if (_currentIndex == 0) revert NoTokensMintedYet();\n uint256 _nextOwnerToExplicitlySet = nextOwnerToExplicitlySet;\n if (_nextOwnerToExplicitlySet >= _currentIndex)\n revert AllOwnershipsHaveBeenSet();\n\n // Index underflow is impossible.\n // Counter or index overflow is incredibly unrealistic.\n unchecked {\n uint256 endIndex = _nextOwnerToExplicitlySet + quantity - 1;\n\n // Set the end index to be the last token index\n if (endIndex + 1 > _currentIndex) {\n endIndex = _currentIndex - 1;\n }\n\n for (uint256 i = _nextOwnerToExplicitlySet; i <= endIndex; i++) {\n if (\n _ownerships[i].addr == address(0) && !_ownerships[i].burned\n ) {\n TokenOwnership memory ownership = ownershipOf(i);\n _ownerships[i].addr = ownership.addr;\n _ownerships[i].startTimestamp = ownership.startTimestamp;\n }\n }\n\n nextOwnerToExplicitlySet = endIndex + 1;\n }\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "devdoc", + "userdoc" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/miniwallet/devlog/CONFIGURATION.md b/miniwallet/devlog/CONFIGURATION.md new file mode 100644 index 0000000..2c1d80e --- /dev/null +++ b/miniwallet/devlog/CONFIGURATION.md @@ -0,0 +1,50 @@ +# Overview +Miniwallet has three streams of smart contract development, they are miniWallet, miniID and miniNFT's. We also have requirements around both deployment and testing. To support these requirements we need the ability to independently deploy and test each work stream. + +## Directory Structure +Two types of directory structures were considered. +1. Independent high level folders for each stream similar to projects such as [sushiswap](https://github.com/sushiswap/sushiswap/tree/master/protocols) +2. Sub Folders under both contracts and testing similar to projects such as [aave](https://github.com/aave/aave-v3-core/tree/master/contracts) + +Initially it was felt that the individual streams being developed closely together so we chose option 2. This may be revisited as further development in each stream is progressed. + +## Configuration and Environment Variables +We wished to support the following +1. Deployment for each environment without changing the codebase through the use of environment variables. +2. Reducing complexity of configuration by breaking the configuration into functional components. + +To achieve this we have used the following folder structures +1. `.env` folder +``` +miniID.env +miniNFTs.env +miniWallet.env +networks.env +users.env +``` +2. `.config` folder +``` +getConfig.ts +miniID.ts +miniNFTs.ts +miniWallet.ts +users.ts +``` + +### Deploying to multiple environments. +If no network specific configuration is needed then by default we will use the standard Configuration and Environment variables above. + +Currently to deploy to a new environment two files must be created. +`./config/<>_<>.ts` +`./env/<>_<>.env` + +The deploy scripts leverage `getConfig.ts` which takes as input parameters the `identifier` and `networkName`. + +For example when deploying the miniWallet on Harmony mainnet, the following files would be created +`./config/miniWallet_mainnet.ts` +`./env/miniWallet_mainnet.env` + +### Future considerations +1. Improve deployment to only need a new `.env` file not a config file +2. Consider whether the deployment configuration can just use a config file rather than a config file using a `.env` file. +3. Evaluate whether to separate the Folders into a more independent directory as stated in Directory Structure 1. above. diff --git a/miniwallet/devlog/NFTID.md b/miniwallet/devlog/NFTID.md new file mode 100644 index 0000000..e508b6f --- /dev/null +++ b/miniwallet/devlog/NFTID.md @@ -0,0 +1,233 @@ +# Overview + +When registering their phone number for sms-wallet we would like to issue an NFT to users and creators which they can use later for identity Verification. + +In terms of Decentralized Identity. SMS-Wallet is attesting to the digital identity of the creators and users. + +## Requirements/Considerations +* Gas Payment (should the user pay for the mint cost)? +* Use of MultiSig Wallets for the Operators +* NFT Contract supports Multiple Operators Minting NFT's +* Image would be useful to support encoding information like chainId and address in qrcode +* Metadata : could store country and region +* NFT Contract should be upgradeable + + +## Registration Flow +A semi-protected API can be added on miniwallet server for this. The API can be called by the client, but the client should provide its address and a valid signature. The miniwallet server can then call the server backend (or simply lookup from datastore) and verify the address is indeed a registered user, before issuing the NFT. [comment is here](https://github.com/polymorpher/sms-wallet/issues/10#issuecomment-1236012684) + +Alternate approach (validating signature optional) +When registering the server calls the miniserver endpoint apicreate with the phone number of the registered user. Miniserver queries the datastore to get the address of the user. It checks that the user does not have an existing NFTId (`tokensOfOwner(address) = 0`). Generates Metadata and Persist an image. Mints a new token to the address. + +## Airdrop Flow +All registered users are read from the datastore. There addresses are collected. Metadata and Images are persisted for each address. A multicall `CommunityMint` is called to iterate through the users minting tokens. + + + +# Phase 1 Implementation and Data + +## Actors + +We model three actors + +**Operator**(+1 737 232 7333): The SMS Operator has multiple operator accounts for test purposes. However it’s unique identifier in the system is it’s phone number and the registered address associated with it. +![The Operator](https://1wallet.mypinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx/0.png) + + +**Creator**(+1 650 547 3175): The Creator has one account and requests authorizations from users via the miniwallet and asks operators to make payments +![The Creator](https://1wallet.mypinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx/1.png) + +**Community Member**(+1 415 840 1410): Community Member uses the sms-wallet to hold native tokens, ERC20, ERC721 and ERC115's. They can deposit funds and nft's in the miniwallet and approve operators to automatically transfer those funds (e.g. to creators) when needed. +![The First Community Member](https://1wallet.mypinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx/2.png) + +## Tokens + +**MiniID**: [Soulbound](https://vitalik.ca/general/2022/01/26/soulbound.html) Token (assigned to Phone Number, can not be transferred) 1 per phone number. QR Code (TokenId, Phone, Address, Country) + +**Mini721**: These are NFT collections airdropped by Operators to each Registered User. For Initial Phase we will use [Minion Images](https://pngimg.com/images/heroes/minions). Attributes (TokenId, Phone, Address, Country) + +**Mini1155**: Minted by MiniID Holders to friends/fans 1 to 1 correlation between MiniID TokenId and Mini1155 TokenId (can issue many 1155s to Addresses). Think of it as a friends list. Could also be event based an issued and burned by the Owner before and after an event. Attributes (IssuerTokenId, IssuerPhone, IssuerAddress, IssuerCountry) + +**Mini721C**: These are NFT collections created by Creators (could have it’s own factory) For Initial Phase we will use [Minion Images](https://pngimg.com/images/heroes/minions) + +**Mini1155C**: These are NFT Access Passes Given by Creators (could have it’s own factory) + +## [Attestations](https://ethereum.org/en/decentralized-identity/#what-are-attestations) + +Each MiniId is effectively an [on-chain attestation](https://ethereum.org/en/decentralized-identity/#onchain-attestations) by the operator that this token is owned by this phone number. + +Each Mini1155 is effectively an on-chain attestation that the Mini1155 holder is a friend/fan of the MiniID owner. + +Additional [off-chain attestations](https://ethereum.org/en/decentralized-identity/#offchain-attestations-with-persistent-access) can be developed as the ecosystem evolves. + +## **Local Test Data** + +**Operator**(+1 737 232 7333) 0 + +**Community Member**(+1 415 840 1410) 1 (johnwhitton) + +**Creator**(+1 650 547 3175) 2 (john.a.whitton) + +[Minions Images](https://gateway.pinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx) : [https://gateway.pinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx](https://gateway.pinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx) + +**Notes on Test Data** +For our user (+14158401410 address 0x864966c7483155C090BB07AB3Fb130c159c18daf) we have issued the following Tokens +1. MiniID: There Soulbound Identity +2. Mini721: A collectible issued to them (Minion Image) +3. Mini1155: A friends or fans token issued from the operator +4. Mini1155: A friends or fans token issued by the creator + +The sms-wallet UI looks as follows (on a phone it shows the first image and then you can scroll up and down) + +![Screenshot 2022-09-10 at 11 51 05 AM](https://user-images.githubusercontent.com/1572027/189497841-7b218e3f-8286-4dcb-854e-7f19ba52722e.png) + +For our creator (+16505473175 address 0x7A78C8A0F61a9015440ac970D390f596836C9872) we have issued the following Tokens +1. MiniID: There Soulbound Identity +2. Mini721: A collectible issued to them (Minion Image) +3. Mini1155: A friends or fans token issued from the operator + +Screenshot 2022-09-10 at 12 04 45 PM +## Sample Metadata + +[MinID](https://gateway.pinata.cloud/ipfs/Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/MiniID/2) (Image URL to be replaced with QR Code) +https://gateway.pinata.cloud/ipfs/Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/MiniID + +``` +{ + "description": "MiniID +1 415 840 1410 (Soulbound)", + "external_url": "https://sms-wallet.xyz/miniID/2", + "image": "https://1wallet.mypinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx/2.png", + "name": "MiniID +1 415 840 1410", + "attributes": [ + { + "trait_type": "TokenId", + "value": "2" + }, + { + "trait_type": "Phone", + "value": "+1 415 840 1410" + }, + { + "trait_type": "Address", + "value": "0x864966c7483155C090BB07AB3Fb130c159c18daf" + }, + { + "trait_type": "Country", + "value": "US" + } + ] +} +``` + +[Min721](https://gateway.pinata.cloud/ipfs/Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini721/2) + +https://gateway.pinata.cloud/ipfs/Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini721 + +``` +{ + "description": "Collectible +1 415 840 1410", + "external_url": "https://sms-wallet.xyz/mini721/2", + "image": "https://1wallet.mypinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx/2.png", + "name": "Collectible +1 450 840 1410", + "attributes": [ + { + "trait_type": "TokenId", + "value": "0" + }, + { + "trait_type": "Phone", + "value": "+1 415 840 1410" + }, + { + "trait_type": "Address", + "value": "0x864966c7483155C090BB07AB3Fb130c159c18daf" + }, + { + "trait_type": "Country", + "value": "US" + } + ] +} +``` + +[Mini1155](https://gateway.pinata.cloud/ipfs/Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/2) (Image URL to be replaced with QR Code) + +https://gateway.pinata.cloud/ipfs/Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155 + +``` +{ + "description": "Friend of +1 415 840 1410(Transferable)", + "external_url": "https://sms-wallet.xyz/mini1155/2", + "image": "https://1wallet.mypinata.cloud/ipfs/QmUgueVH4cQgBEB8aJ3JJT8hMaDS4yHaHvBugGhGLyz9Nx/2.png", + "name": "Friend of +1 415 840 1410", + "attributes": [ + { + "trait_type": "TokenId", + "value": "2" + }, + { + "trait_type": "Phone", + "value": "+1 415 840 1410" + }, + { + "trait_type": "Address", + "value": "0x864966c7483155C090BB07AB3Fb130c159c18daf" + }, + { + "trait_type": "Country", + "value": "US" + } + ] +} +``` + +## Technical Components + +### Frontend + +* Make DummyNFT's configurable [here](https://github.com/polymorpher/sms-wallet/blob/main/client/src/pages/NFT.jsx#L295) +* Add MiniID to DummyNFT's + +### Contract +Contract base can be generated using [OpenZepplin Solidity Wizard](https://wizard.openzeppelin.com/#erc721) and then enhanced for the following +* No Limit on Number of NFT Tokens +* Operator Logic added and Minting of Tokens can only be done by Operator +* Minting allows only one token per address +* Approval Mechanism for allowing other users to use your identity +* Remove Sales Logic +* Provenance is never frozen +* Metadata is never frozen + +### Contract Configuration +``` +NAME=MiniID +SYMBOL=NFTID +TEST_MINI721_DEPLOY_SALES_IS_ACTIVE=false +TEST_MINI721_DEPLOY_METADATA_FROZEN=false +TEST_MINI721_DEPLOY_PROVENANCE_FROZEN=false +TEST_MINI721_DEPLOY_MAX721_TOKENS=1000000000000 +TEST_MINI721_DEPLOY_MINT_PRICE=0 +TEST_MINI721_DEPLOY_MAX_PER_MINT=1 +TEST_MINI721_DEPLOY_BASE_URI=ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/ +TEST_MINI721_DEPLOY_CONTRACT_URI=ipfs://Qmezo5wDKz7kHwAPRUSJby96rnCfvhqgVqDD7Zorx9rqy8 +``` + +### Persistence +* [Pintata API](https://docs.pinata.cloud/pinata-api) +* [Pinata Pin File or Directory](https://docs.pinata.cloud/pinata-api/pinning/pin-file-or-directory) +* [Pinata Update Metadata](https://docs.pinata.cloud/pinata-api/pinning/update-metadata) + + +### MiniServer +* /nftCreate endpoint +* Signature Verification [see Demo Signature code](https://github.com/polymorpher/sms-wallet/blob/main/demo/src/pages/SignatureDemo.jsx) + +# References + * [Decentralized Identity](https://ethereum.org/en/decentralized-identity/) + * [SpruceID](https://www.spruceid.dev/) [Wayne Chang](https://www.linkedin.com/in/waynebuilds/) + * [OpenSea Metadata Standards](https://docs.opensea.io/docs/metadata-standards) + * [Chainlink NFT Tutorial](https://blog.chain.link/build-deploy-and-sell-your-own-dynamic-nft/) + * [Sample NFT Generation CodeBase](https://github.com/PatrickAlphaC/dungeons-and-dragons-nft) + + + diff --git a/miniwallet/devlog/PROXY.md b/miniwallet/devlog/PROXY.md new file mode 100644 index 0000000..e9679a4 --- /dev/null +++ b/miniwallet/devlog/PROXY.md @@ -0,0 +1,185 @@ +# Proxy Deployment Overview + +## Overview + +We have used hardhat deploy and a proxy type of EIP173 (the default hardhat proxy). +There are two deployment scripts +* 001_deploy_miniWallet.ts: Does initial Deployof the MiniWallet Proxy and Implementation. +* 002_upgrade_miniWallet.ts: Deploys a new implementation contract and updates the MiniWallet Proxy to point to the new implementation. + +See [Sample Deployments](#sample-deployments) below + +**Notes** +1. Contract addresses for each chain are held in the deployments folder ` "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",` +2. Upgrade logic reads these addresses +3. When testing upgrades locally you need to set `ethLocal` to `` in `hardhat.config.ts` +``` + ethLocal: { + url: process.env.ETH_LOCAL_URL, + gasPrice: 20000000000, + gas: 6000000, + live: false, + saveDeployments: true, + tags: ['local'] + }, +``` + +## Deployments + +`yarn deploy --network ethLocal` : Does initial Deployof the MiniWallet Proxy and Implementation. + +`yarn deploy-upgrade --network ethLocal` : Deploys a new implementation contract and updates the MiniWallet Proxy to point to the new implementation. + + +## Improvements + +### Improve transparency and readabilty +A cleaner solution was proposed in [Pull Request #12](https://github.com/polymorpher/sms-wallet/pull/12#pullrequestreview-1095436440) +For each chain, we only need three things: proxy contract, deployed proxy address, and logic contract address. Rather than keeping a bunch of JSON files and irrelevant information in those files, I think it is better to just store these three pieces of information in a file inside a folder (similar to relayer/cache, but can be simpler, e.g. the versions can be hash of contracts instead). When we need to upgrade the contract later, we just read from that file and call relevant functions accordingly (i.e. (1) deploy a new logic contract, (2) redirect proxy to the address of the new logic contract). I have read https://github.com/wighawag/hardhat-deploy#deploying-and-upgrading-proxies and examined underlying types (ProxyOptionsBase, etc.) but I am not sure whether hardhat-deploy library supports manual selection (of logic contract address) during upgrade. It would be nice if it does, but even if it doesn't, it seems not hard to just implement on our own - should be just a few lines. + +**Decisions** +* To enable greater control of the deployment process we have implemented our own Proxy which is a copy of Open Zeppelins `ERC1967.sol`. +* We chose to use the `ERC1967.sol` as the proxy because it enabled compliance with Open Zeppelin Token Contracts. +* We populated the `ADMIN_SLOT` to enable the use of hardhat-deploy with Open Zepplin UUPS Proxy [see here](https://github.com/wighawag/hardhat-deploy/issues/146#issuecomment-1244642086). + +**We have implemented the following** +1. Implemented our own UUPS Compliant Proxy [ERC1967.sol](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/ERC1967/ERC1967Proxy.sol). +2. Updated MiniWallet and MiniId to populate `ADMIN_SLOT` for [hardhat-deploy compatability](https://github.com/wighawag/hardhat-deploy/issues/146#issuecomment-1244642086) +2. Update the Deployment scripts to use this proxy ` proxyContract: 'ERC1967',` +3. Update the upgrade script to call MiniWallet Deploy and MiniWalletProxy.upgradeTo explicitly. +4. Tested Upgrades of both MiniWallet and MiniID in `miniwallet/deploy/999_test.ts` + +**Still to be implemented** +1. Use [deterministicDeployment](https://github.com/wighawag/hardhat-deploy#deploymentsdeployname-options) ` deterministicDeployment? boolean | string; // if true, it will deploy the contract at a deterministic address based on bytecode and constructor arguments. The address will be the same across all network. It use create2 opcode for that, if it is a string, the string will be used as the salt.` +2. Test using different deployers (can do this by changing mnemonic when starting chain locally) +3. If desired create our our Deployment Factory using a `create3` opcode based deterministic deploy. +4. Capture the MiniWalletProxy and MiniWallet Logic contract deployed addresses in the Deployment Scripts and persist them under a separate folder (e.g. `cache`). +5. Make Mini721 and Mini1155 upgradeable (using a UUPS proxy) + +**Note: [OpenZepplin UUPS Hardhat Deploy Support Issue](https://github.com/wighawag/hardhat-deploy/issues/146)** + +### Improve Modularity (NFT Identity) +As we develop NFT Identity we may want to have the MiniWallet Proxy point to multiple (MiniWallet and Mini721 and Mini1155) contracts (facets). We can support this using [EIP-2535: Diamonds, Multi-Facet Proxy](https://eips.ethereum.org/EIPS/eip-2535) as implemented in [Hardhat Deploy: Built-In Support for Diamonds](https://github.com/wighawag/hardhat-deploy#builtin-in-support-for-diamonds-eip2535.) + + +### NFT Factory Support +If we decide we want to provide the ability for Creators to deploy their own contract we can implement this using the [Clones Proxy](https://docs.openzeppelin.com/contracts/4.x/api/proxy#Clones) + + + +## References + +- [Proxy Overview by Open Zeppelin](https://docs.openzeppelin.com/contracts/4.x/api/proxy) +- [Hardhat Deploy: Deploying and Upgrading Proxies](https://github.com/wighawag/hardhat-deploy#deploying-and-upgrading-proxies) +- [Hardhat Deploy: Examples of Deploying Open Zeppelin Proxies](https://github.com/wighawag/template-ethereum-contracts/tree/examples/openzeppelin-proxies/deploy) + +- Proxy Contracts Source Code + - [EIP173: Hardhat Deploy](https://github.com/wighawag/hardhat-deploy/blob/master/solc_0.8/proxy/EIP173Proxy.sol): The default proxy + - [ERC1967: Hardhat Deploy](https://github.com/wighawag/hardhat-deploy/tree/master/solc_0.8/openzeppelin/proxy/ERC1967): UUPS Proxy + - [ERC1697: Open Zeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol): This abstract contract provides getters and event emitting update functions for [EIP1967](https://eips.ethereum.org/EIPS/eip-1967) slots. + - [UUPSUpgradeable: Open Zeppelin](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/master/contracts/proxy/utils/UUPSUpgradeable.sol) + - [ProxyAdmin: Hardhat Deploy](https://github.com/wighawag/hardhat-deploy/blob/master/solc_0.8/openzeppelin/proxy/transparent/ProxyAdmin.sol): This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. + +- Deterministic Deploy (not based of deployer) + - [EIP-1014: Skinny CREATE2](https://eips.ethereum.org/EIPS/eip-1014) + - [Hardhat Deploy specifing a deployment factory](https://github.com/wighawag/hardhat-deploy#4-deterministicdeployment-ability-to-specify-a-deployment-factory) + - [OpenZepplin Deploying Smart Contracts Using CREATE2](https://docs.openzeppelin.com/cli/2.8/deploying-with-create2) + - [0xsequence create3](https://github.com/0xsequence/create3) + - [Zoltu Deterministic Deploy Proxy](https://github.com/Zoltu/deterministic-deployment-proxy) + +- Ethereum Improvement Proposals + - [EIP-173: Contract Ownership Standard](https://eips.ethereum.org/EIPS/eip-173) + - [EIP-1014: Skinny CREATE2](https://eips.ethereum.org/EIPS/eip-1014) + - [EIP-1967: Standard Proxy Storage Slots](https://eips.ethereum.org/EIPS/eip-1967) + - [EIP-1822: Universal Upgradeable Proxy Standard (UUPS)](https://eips.ethereum.org/EIPS/eip-1822) + - [EIP-2535: Diamonds, Multi-Facet Proxy](https://eips.ethereum.org/EIPS/eip-2535) + + +## Sample Deployments + +### EIP173 +``` +johnlaptop miniwallet (miniV0) $ yarn deploy --network ethLocal +yarn run v1.22.19 +warning ../../../package.json: No license field +$ npx hardhat deploy --tags deploy --network ethLocal +Nothing to compile +No need to generate any newer typings. +✅ Generated documentation for 53 contracts + ·-----------------|--------------|----------------· + | Contract Name · Size (KiB) · Change (KiB) │ + ··················|··············|················· + | MiniWallet · 9.128 · │ + ·-----------------|--------------|----------------· +chainId: 1337 +operators: ["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","0x70997970C51812dc3A010C7d01b50e0d17dc79C8","0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC","0x90F79bf6EB2c4f870365E785982E1f101E93b906"] +deploying "MiniWallet_Implementation" (tx: 0xd44c9c54ccc53dd82c064381048acd7f17ee179b3b8c5bfc8520b91cbbb5bd80)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 2071284 gas +deploying "MiniWallet_Proxy" (tx: 0x3b2a5ae1dae25c879c78c6611c57e6b08a9c1371f99a2ecdf702d9c37e1e32b2)...: deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 with 1137279 gas +MiniWallet deployed to: 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 +MiniWallet Operator Threshold: 10 +operatorCount : 4 +Operator [0]: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 +Operator [1]: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 +Operator [2]: 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC +Operator [3]: 0x90F79bf6EB2c4f870365E785982E1f101E93b906 +MiniWallet Global User Auth Limit: 1000000.0 +MiniWallet Global User Auth Limit: 100000.0 +✨ Done in 8.70s. +``` +### EIP173 Upgrade +``` +johnlaptop miniwallet (miniV0) $ yarn deploy-upgrade --network ethLocal +yarn run v1.22.19 +warning ../../../package.json: No license field +$ npx hardhat deploy --tags upgrade --network ethLocal +Nothing to compile +No need to generate any newer typings. +✅ Generated documentation for 53 contracts + ·-----------------|--------------|----------------· + | Contract Name · Size (KiB) · Change (KiB) │ + ··················|··············|················· + | MiniWallet · 9.128 · │ + ·-----------------|--------------|----------------· +chainId: 1337 +operators: ["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","0x70997970C51812dc3A010C7d01b50e0d17dc79C8","0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC","0x90F79bf6EB2c4f870365E785982E1f101E93b906"] +deploying "MiniWallet_Implementation" (tx: 0x53920c94944923fa427919e6b12c44a032c72038b54d65a82fe5fea1dd222700)...: deployed at 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0 with 2071284 gas +executing MiniWallet.upgradeTo (tx: 0x63bcfd3b262d0126a2c523015bcc2f78c917cc24f11dcf9a10b9670993b73eba) ...: performed with 30538 gas +MiniWallet_v2 deployed to: 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 +MiniWallet_v2 Operator Threshold: 10 +operatorCount : 4 +Operator [0]: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 +Operator [1]: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 +Operator [2]: 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC +Operator [3]: 0x90F79bf6EB2c4f870365E785982E1f101E93b906 +MiniWallet_v2 Global User Auth Limit: 1000000.0 +MiniWallet_v2 Global User Auth Limit: 100000.0 +✨ Done in 8.31s. +``` + +### Transparent Proxy +``` +$ npx hardhat deploy --tags deploy +Nothing to compile +No need to generate any newer typings. +✅ Generated documentation for 53 contracts + ·-----------------|--------------|----------------· + | Contract Name · Size (KiB) · Change (KiB) │ + ··················|··············|················· + | MiniWallet · 9.128 · │ + ·-----------------|--------------|----------------· +chainId: 31337 +Local Testing Deploy +operators: ["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","0x70997970C51812dc3A010C7d01b50e0d17dc79C8","0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC","0x90F79bf6EB2c4f870365E785982E1f101E93b906"] +deploying "DefaultProxyAdmin" (tx: 0x2ed786fc77f31d787afda812b568e819e2272e7da6873e20b2b1fef018aacb94)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 643983 gas +deploying "MiniWallet_Implementation" (tx: 0x3e629375db5c4500892cb9123a1c64c62bca768958a29a35c58c3ca4f6d8cca4)...: deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 with 2071284 gas +deploying "MiniWallet_Proxy" (tx: 0xcf8731798c9fdcb2817956f144d341806c081474897a306d996d60429bf360cb)...: deployed at 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0 with 1142610 gas +MiniWallet deployed to: 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0 +MiniWallet Operator Threshold: 10 +operatorCount : 3 +Operator [0]: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 +Operator [1]: 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC +Operator [2]: 0x90F79bf6EB2c4f870365E785982E1f101E93b906 +MiniWallet Global User Auth Limit: 1000.0 +MiniWallet Global User Auth Limit: 100.0 +✨ Done in 13.70s. +``` \ No newline at end of file diff --git a/miniwallet/devlog/README.md b/miniwallet/devlog/README.md new file mode 100644 index 0000000..131ebbf --- /dev/null +++ b/miniwallet/devlog/README.md @@ -0,0 +1,7 @@ +# Development Log + + The documents in this folder are development notes for internal discussions. + + They are not meant for documentation or guiding users or developers. + + diff --git a/miniwallet/env_example/miniID.env b/miniwallet/env_example/miniID.env new file mode 100644 index 0000000..34e99de --- /dev/null +++ b/miniwallet/env_example/miniID.env @@ -0,0 +1,2 @@ +## MiniID +BASE_URI=ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/MiniID \ No newline at end of file diff --git a/miniwallet/env_example/miniNFTs.env b/miniwallet/env_example/miniNFTs.env new file mode 100644 index 0000000..1652b39 --- /dev/null +++ b/miniwallet/env_example/miniNFTs.env @@ -0,0 +1,60 @@ +## Mini721 +MINI721_DEPLOY_SALES_IS_ACTIVE=false +MINI721_DEPLOY_METADATA_FROZEN=false +MINI721_DEPLOY_PROVENANCE_FROZEN=false +MINI721_DEPLOY_MAX721_TOKENS=1000000000000 +MINI721_DEPLOY_MINT_PRICE=0 +MINI721_DEPLOY_MAX_PER_MINT=1 +MINI721_DEPLOY_BASE_URI=ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini721/ +MINI721_DEPLOY_CONTRACT_URI=ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini721/contract.json + +## Mini1155 +### Deployment +MINI1155_DEPLOY_NAME='Mini Wallet' +MINI1155_DEPLOY_SYMBOL='Mini1155' +MINI1155_DEPLOY_SALE_IS_ACTIVE=false +MINI1155_DEPLOY_METADATA_FROZEN=false +# MINT PRICE IS DIVIDED BY 10^18 TO GIVE NATIVE TOKEN AMOUNT i.e. 1000000000000000000 +MINI1155_DEPLOY_MINT_PRICE='420000000000000000' +MINI1155_DEPLOY_MAX_PER_MINT=10 +MINI1155_DEPLOY_STANDARD_TOKEN_ID=1 +MINI1155_DEPLOY_RARE_TOKEN_ID=2 +MINI1155_DEPLOY_EXCHANGE_RATIO=0 +# SALT is calculated using ethers.utils.formatBytes32String('1') replace '1' with your preferred salt +MINI1155_DEPLOY_SALT='0x3100000000000000000000000000000000000000000000000000000000000000' +MINI1155_DEPLOY_BASE_URI=ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/ +MINI1155_DEPLOY_CONTRACT_URI=ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/contract.json +MINI1155_DEPLOY_REVENUE_ACCOUNT='0xa636a88102a7821b7e42292a4A3920A25a5d49b5' +MINI1155_DEPLOY_RARE_PROBABLITY_PERCENTAGE=1 +MINI1155_DEPLOY_STANDARD_TOKEN_MAX_SUPPLY=770 +MINI1155_DEPLOY_STANDARD_TOKEN_PERSONAL_CAP=10 +MINI1155_DEPLOY_RARE_TOKEN_MAX_SUPPLY=7 +MINI1155_DEPLOY_RARE_TOKEN_PERSONAL_CAP=1 + +#### Collection 1 +MINI1155_COLLECTION1_REVENUE_ACCOUNT='0xa636a88102a7821b7e42292a4A3920A25a5d49b5' +MINI1155_COLLECTION1_MAX_PER_MINT=10 +# MINT PRICE IS DIVIDED BY 10^18 TO GIVE NATIVE TOKEN AMOUNT i.e. 1000000000000000000 +MINI1155_COLLECTION1_MINT_PRICE='420000000000000000' +MINI1155_COLLECTION1_EXCHANGE_RATIO=0 +MINI1155_COLLECTION1_RARE_PROBABLITY_PERCENTAGE=1 +MINI1155_COLLECTION1_STANDARD_TOKEN_ID=1 +MINI1155_COLLECTION1_STANDARD_TOKEN_MAX_SUPPLY=770 +MINI1155_COLLECTION1_STANDARD_TOKEN_PERSONAL_CAP=10 +MINI1155_COLLECTION1_RARE_TOKEN_ID=2 +MINI1155_COLLECTION1_RARE_TOKEN_MAX_SUPPLY=7 +MINI1155_COLLECTION1_RARE_TOKEN_PERSONAL_CAP=1 + +#### Collection 2 +MINI1155_COLLECTION2_REVENUE_ACCOUNT='0xa636a88102a7821b7e42292a4A3920A25a5d49b5' +MINI1155_COLLECTION2_MAX_PER_MINT=20 +# MINT PRICE IS DIVIDED BY 10^18 TO GIVE NATIVE TOKEN AMOUNT i.e. 1000000000000000000 +MINI1155_COLLECTION1_MINT_PRICE='840000000000000000' +MINI1155_COLLECTION2_EXCHANGE_RATIO=0 +MINI1155_COLLECTION2_RARE_PROBABLITY_PERCENTAGE=2 +MINI1155_COLLECTION2_STANDARD_TOKEN_ID=3 +MINI1155_COLLECTION2_STANDARD_TOKEN_MAX_SUPPLY=1540 +MINI1155_COLLECTION2_STANDARD_TOKEN_PERSONAL_CAP=20 +MINI1155_COLLECTION2_RARE_TOKEN_ID=4 +MINI1155_COLLECTION2_RARE_TOKEN_MAX_SUPPLY=28 +MINI1155_COLLECTION2_RARE_TOKEN_PERSONAL_CAP=2 diff --git a/miniwallet/env_example/miniWallet.env b/miniwallet/env_example/miniWallet.env new file mode 100644 index 0000000..876c255 --- /dev/null +++ b/miniwallet/env_example/miniWallet.env @@ -0,0 +1,6 @@ +# MiniWallet +INITIAL_OPERATOR_THRESHOLD=10 +INITIAL_OPERATORS=["0x70997970C51812dc3A010C7d01b50e0d17dc79C8","0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC","0x90F79bf6EB2c4f870365E785982E1f101E93b906"] +# USER AND AUTH LIMITS ARE DIVIDED BY 10^18 TO GIVE NATIVE TOKEN AMOUNT i.e. 1000000000000000000 +INITIAL_USER_LIMIT=100000000000000000000 +INITIAL_AUTH_LIMIT=10000000000000000000 diff --git a/miniwallet/env_example/networks.env b/miniwallet/env_example/networks.env new file mode 100644 index 0000000..8f13b69 --- /dev/null +++ b/miniwallet/env_example/networks.env @@ -0,0 +1,13 @@ +# Network config + +ETHERSCAN_API_KEY=abc123abc123abc123abc123abc123abc1 +PRIVATE_KEY=abc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 +ETH_LOCAL_URL=http://127.0.0.1:8545 +LOCALNET_URL=http://localhost:9500 +DEVNET_URL=https://api.s0.ps.hmny.io/ +TESTNET_URL=https://api.s0.b.hmny.io +MAINNET_URL=https://api.harmony.one +LOCALGETH_URL=http://localhost:8645 +ROPSTEN_URL=https://ropsten.infura.io/v3/abc123abc123abc123abc123abc123ab +SEPOLIA_URL=https://rpc.sepolia.dev +ETHEREUM_URL=https://mainnet.infura.io/v3/abc123abc123abc123abc123abc123ab diff --git a/miniwallet/env_example/users.env b/miniwallet/env_example/users.env new file mode 100644 index 0000000..01fed28 --- /dev/null +++ b/miniwallet/env_example/users.env @@ -0,0 +1,4 @@ +# Users +INITIAL_OPERATORS=["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","0x70997970C51812dc3A010C7d01b50e0d17dc79C8","0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC","0x90F79bf6EB2c4f870365E785982E1f101E93b906"] +USER1=0x143A933E79931006b3Eb89cBc938587546faF159 +CREATOR=0x58bB8c7D2c90dF970fb01a5cD29c4075C41d3FFB diff --git a/miniwallet/hardhat.config.ts b/miniwallet/hardhat.config.ts index 8f540af..cb2320e 100644 --- a/miniwallet/hardhat.config.ts +++ b/miniwallet/hardhat.config.ts @@ -1,7 +1,8 @@ -import 'dotenv/config' +// import 'dotenv/config' import { HardhatUserConfig, task } from 'hardhat/config' import '@nomiclabs/hardhat-etherscan' import '@nomiclabs/hardhat-waffle' +import '@nomiclabs/hardhat-ethers' import '@typechain/hardhat' import 'hardhat-gas-reporter' import 'hardhat-deploy' @@ -12,6 +13,8 @@ import '@atixlabs/hardhat-time-n-mine' import 'hardhat-spdx-license-identifier' import '@openzeppelin/hardhat-upgrades' import 'hardhat-contract-sizer' +import * as dotenv from 'dotenv' +dotenv.config({ path: './env/networks.env' }) const normalizeHex = (s) => s && s.startsWith('0x') ? s : `0x${s}` @@ -52,14 +55,20 @@ const hardhatUserconfig: HardhatUserConfig = { defaultNetwork: 'hardhat', networks: { hardhat: { + accounts: { + count: 200 + }, mining: { auto: true } }, - hardhatNode: { - url: process.env.HARDHAT_URL, + ethLocal: { + url: process.env.ETH_LOCAL_URL, gasPrice: 20000000000, - gas: 6000000 + gas: 6000000, + live: false, + saveDeployments: true, + tags: ['local'] }, localnet: { url: process.env.LOCALNET_URL, @@ -91,7 +100,8 @@ const hardhatUserconfig: HardhatUserConfig = { }, mainnet: { url: process.env.MAINNET_URL, - accounts: [normalizeHex(process.env.PRIVATE_KEY)] + accounts: [normalizeHex(process.env.PRIVATE_KEY)], + chainId: 1666600000 }, localgeth: { url: process.env.LOCALGETH_URL, @@ -167,7 +177,7 @@ const hardhatUserconfig: HardhatUserConfig = { disambiguatePaths: false, runOnCompile: true, strict: true, - only: [':AssetManager$'] + only: [':MiniWallet$'] } } diff --git a/miniwallet/package.json b/miniwallet/package.json index 07d0c70..afc4dfd 100644 --- a/miniwallet/package.json +++ b/miniwallet/package.json @@ -16,15 +16,21 @@ "check": "npx hardhat check", "compile": "npx hardhat compile", "coverage": "npx hardhat coverage", - "deploy": "npx hardhat deploy", + "deploy": "npx hardhat deploy --tags deploy", + "deploy-mini-wallet": "npx hardhat deploy --tags MiniWalletDeploy", + "deploy-mini-721": "npx hardhat deploy --tags Mini721", + "deploy-mini-1155": "npx hardhat deploy --tags Mini1155", + "deploy-mini-ID": "npx hardhat deploy --tags MiniID", + "deploy-upgrade": "npx hardhat deploy --tags upgrade", + "deploy-test": "npx hardhat deploy --tags Test999", "hardhat-local": "npx hardhat node --no-deploy", - "flat": "npx hardhat flatten ./contracts/AssetManager.sol >> ./flat/AssetManager.sol", + "flat": "npx hardhat flatten ./contracts/MiniWallet.sol >> ./flat/MiniWallet.sol", "gas": "REPORT_GAS=true npx hardhat test", "test": "npx hardhat test" }, "devDependencies": { "@atixlabs/hardhat-time-n-mine": "^0.0.5", - "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", + "@nomiclabs/hardhat-ethers": "yarn:hardhat-deploy-ethers", "@nomiclabs/hardhat-etherscan": "^3.0.3", "@nomiclabs/hardhat-waffle": "^2.0.3", "@openzeppelin/contracts": "^4.7.1", @@ -47,12 +53,12 @@ "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^5.2.0", "ethereum-waffle": "^3.4.4", - "ethers": "^5.6.9", + "ethers": "^5.7.0", "hardhat": "^2.9.6", "hardhat-abi-exporter": "^2.9.0", "hardhat-console": "^1.0.0", "hardhat-contract-sizer": "^2.6.1", - "hardhat-deploy": "^0.11.10", + "hardhat-deploy": "^0.11.12", "hardhat-gas-reporter": "^1.0.8", "hardhat-spdx-license-identifier": "^2.0.3", "lodash": "^4.17.21", @@ -63,5 +69,7 @@ "typechain": "^5.2.0", "typescript": "^4.6.4" }, - "dependencies": {} + "dependencies": { + "fs": "^0.0.1-security" + } } diff --git a/miniwallet/src/config.ts b/miniwallet/src/config.ts deleted file mode 100644 index 2839aa7..0000000 --- a/miniwallet/src/config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ethers } from 'ethers' -import 'dotenv/config' - -export default { - initialOperatorThreshold: process.env.INITIAL_OPERATOR_THRESHOLD, - initialOperators: JSON.parse(process.env.INITIAL_OPERATORS || '[]'), - initialUserLimit: ethers.utils.parseEther(process.env.INIITIAL_USER_LIMIT || '1000000'), - initialAuthLimit: ethers.utils.parseEther(process.env.INIITIAL_AUTH_LIMIT || '100000'), - - test: { - initialOperatorThreshold: process.env.TEST_INITIAL_OPERATOR_THRESHOLD, - initialOperators: JSON.parse(process.env.TEST_INITIAL_OPERATORS || '[]'), - initialUserLimit: ethers.utils.parseEther(process.env.TEST_INIITIAL_USER_LIMIT || '1000'), - initialAuthLimit: ethers.utils.parseEther(process.env.TEST_INIITIAL_AUTH_LIMIT || '100') - } -} diff --git a/miniwallet/test/README.md b/miniwallet/test/README.md index a1e45cd..83fc4db 100644 --- a/miniwallet/test/README.md +++ b/miniwallet/test/README.md @@ -17,7 +17,7 @@ It is recommended that you run tests against a local Hardhat instance (default). To run a specific test set, run: ``` -yarn test test/AssetManager.ts +yarn test test/MiniWallet.ts ``` To run an individual test (without compiling the contract), run @@ -34,7 +34,7 @@ Before each test, some wallets are retrieved using `ethers.getSigners`. They are All accounts are funded with 10,000 native tokens. -* deployer : an account that deploys AssetManager and test token Contracts. The address recieves the role of `DEFAULT_ADMIN` which controls the administrative functions, such as assigning operators and adjusting limits +* deployer : an account that deploys MiniWallet and test token Contracts. The address recieves the role of `DEFAULT_ADMIN` which controls the administrative functions, such as assigning operators and adjusting limits * operatorA, operatorB, operatorC : operators who are responsible for regular smart contract interactions, such as transferring assets on behalf of users * alice: primary user used for testing deposit, withrdrawal, approve and transfer functionality using native tokens, ERC20, ERC721, ERC1155 @@ -72,7 +72,7 @@ First, create a new file and write out how you expect a successful operation to * **Test and Expected Result:** Place this in comments at the top of the test -* **Test Name:** Uniquely identify the test and state what the test is for e.g. `AM-DEPOSIT-0 DEPOSIT: must be able to depoist native tokens`. Here the unique test identifier `AM-DEPOSIT-0 ` allows the test to be run individually. +* **Test Name:** Uniquely identify the test and state what the test is for e.g. `MW-DEPOSIT-0 DEPOSIT: must be able to depoist native tokens`. Here the unique test identifier `MW-DEPOSIT-0 ` allows the test to be run individually. @@ -90,84 +90,84 @@ No need to generate any newer typings. ·-----------------|--------------|----------------· | Contract Name · Size (KiB) · Change (KiB) │ ··················|··············|················· - | AssetManager · 9.131 · │ + | MiniWallet · 9.131 · │ ·-----------------|--------------|----------------· - AssetManager Admin + MiniWallet Admin Administrator: role view functions - ✔ AM-DEFAULT_ADMIN_ROLE-0: check the administrator role - ✔ AM-OPERATOR_ROLE-0: check the operator role - ✔ AM-getRoleAdmin-0: check Roleadmin role for OPERATOR_ROLE and DEFAULT_ADMIN_ROLE - ✔ AM-getRoleMemberCount-0: check the administator and operator count - ✔ AM-getRoleMember-0: check the administrator is deployer and operators are correct (49ms) + ✔ MW-DEFAULT_ADMIN_ROLE-0: check the administrator role + ✔ MW-OPERATOR_ROLE-0: check the operator role + ✔ MW-getRoleAdmin-0: check Roleadmin role for OPERATOR_ROLE and DEFAULT_ADMIN_ROLE + ✔ MW-getRoleMemberCount-0: check the administator and operator count + ✔ MW-getRoleMember-0: check the administrator is deployer and operators are correct (49ms) Administrator: admin role management using standard functions - ✔ AM-grantRole-0: change administrator (63ms) - ✔ AM-revokeRole-0: revoke operator (95ms) - ✔ AM-revokeRole-1: revert if attempting to revoke operator from non admin account (65ms) + ✔ MW-grantRole-0: change administrator (63ms) + ✔ MW-revokeRole-0: revoke operator (95ms) + ✔ MW-revokeRole-1: revert if attempting to revoke operator from non admin account (65ms) Administrator: changeing Administrator using renounceAdmin - ✔ AM-renounceAdmin-0: admin change administrator - ✔ AM-renounceAdmin-1: admin cannot renounce self - ✔ AM-renounceAdmin-2: renounceAdmin reverts if called by non admin + ✔ MW-renounceAdmin-0: admin change administrator + ✔ MW-renounceAdmin-1: admin cannot renounce self + ✔ MW-renounceAdmin-2: renounceAdmin reverts if called by non admin Administrator: admin role management using admin functions - ✔ AM-adminRemoveOperators-0: remove operator - ✔ AM-adminRemoveOperators-1: remove operator revert if when removing non-operator - ✔ AM-adminRemoveOperators-2: remove operator reverts if called by non admin - ✔ AM-adminAddOperators-0: add operator (72ms) - ✔ AM-adminAddOperators-1: add operator revert if already and operator - ✔ AM-adminAddOperators-2: add operator reverts if called by non admin + ✔ MW-adminRemoveOperators-0: remove operator + ✔ MW-adminRemoveOperators-1: remove operator revert if when removing non-operator + ✔ MW-adminRemoveOperators-2: remove operator reverts if called by non admin + ✔ MW-adminAddOperators-0: add operator (72ms) + ✔ MW-adminAddOperators-1: add operator revert if already and operator + ✔ MW-adminAddOperators-2: add operator reverts if called by non admin Administrator: OperatorThreshold management - ✔ AM-operatorThreshold-0: check the operatorThreshold - ✔ AM-getRoleMemberCount-1: check the administator and operator count - ✔ AM-getRoleMember-1: check the administrator is deployer and operators are correct - ✔ AM-adminChangeOperatorThreshold-0: update OperatorThreshold - ✔ AM-adminChangeOperatorThreshold-1: update OperatorThreshold fails if called by non Admin + ✔ MW-operatorThreshold-0: check the operatorThreshold + ✔ MW-getRoleMemberCount-1: check the administator and operator count + ✔ MW-getRoleMember-1: check the administrator is deployer and operators are correct + ✔ MW-adminChangeOperatorThreshold-0: update OperatorThreshold + ✔ MW-adminChangeOperatorThreshold-1: update OperatorThreshold fails if called by non Admin Administrator: user limit management - ✔ AM-globalUserLimit-0: check the globalUserLimit - ✔ AM-adminChangeGlobalUserLimit-0: update globalUserLimit - ✔ AM-adminChangeGlobalUserLimit-1: update globalUserLimit fails if called by non Admin + ✔ MW-globalUserLimit-0: check the globalUserLimit + ✔ MW-adminChangeGlobalUserLimit-0: update globalUserLimit + ✔ MW-adminChangeGlobalUserLimit-1: update globalUserLimit fails if called by non Admin Administrator: user auth limit management - ✔ AM-globalUserAuthLimit-0: check the globalUserAuthLimit - ✔ AM-adminChangeGlobalUserAuthLimit-0: update globalUserAuthLimit - ✔ AM-adminChangeGlobalUserAuthLimit-1: update globalUserAuthLimit fails if called by non Admin + ✔ MW-globalUserAuthLimit-0: check the globalUserAuthLimit + ✔ MW-adminChangeGlobalUserAuthLimit-0: update globalUserAuthLimit + ✔ MW-adminChangeGlobalUserAuthLimit-1: update globalUserAuthLimit fails if called by non Admin Administrator: pause functionality - ✔ AM-paused-0: check the if contract is paused - ✔ AM-adminPauseAssetManager-0: pause assetManager - ✔ AM-adminPauseAssetManager-1: pause assetManager fails if already paused - ✔ AM-adminPauseAssetManager-2: adminPauseAssetManager fails if called by non Admin - ✔ AM-adminUnpauseAssetManager-0: unpause assetManager - ✔ AM-adminUnpauseAssetManager-1: unPause assetManager fails if not paused - ✔ AM-adminUnpauseAssetManager-2: adminUnpauseAssetManager fails if called by non Admin - - AssetManager + ✔ MW-paused-0: check the if contract is paused + ✔ MW-adminPauseMiniWallet-0: pause miniWallet + ✔ MW-adminPauseMiniWallet-1: pause miniWallet fails if already paused + ✔ MW-adminPauseMiniWallet-2: adminPauseMiniWallet fails if called by non Admin + ✔ MW-adminUnpauseMiniWallet-0: unpause miniWallet + ✔ MW-adminUnpauseMiniWallet-1: unPause miniWallet fails if not paused + ✔ MW-adminUnpauseMiniWallet-2: adminUnpauseMiniWallet fails if called by non Admin + + MiniWallet approve: check approval functionality - ✔ AM-approve-0: Positive approval test (41ms) + ✔ MW-approve-0: Positive approval test (41ms) - AssetManager + MiniWallet deposit: check deposit functionality - ✔ AM-deposit-0: Positive deposit test (39ms) - ✔ AM-deposit-1: Negative deposit test amount greater global user limit - ✔ AM-deposit-2: Negative deposit test amount two deposits greater global user limit + ✔ MW-deposit-0: Positive deposit test (39ms) + ✔ MW-deposit-1: Negative deposit test amount greater global user limit + ✔ MW-deposit-2: Negative deposit test amount two deposits greater global user limit - AssetManager - extra: Additional AssetManager tests + MiniWallet + extra: Additional MiniWallet tests ✔ Positive walk-through, deposit, withdraw, approve, send (173ms) ✔ checkEventLogs ✔ checkReverts - AssetManager + MiniWallet send: check send functionality - ✔ AM-send-0: Positive send test (65ms) + ✔ MW-send-0: Positive send test (65ms) - AssetManager + MiniWallet transfer: check transfer functionality - ✔ AM-transfer-0: positive test of ERC20 transfer (126ms) - ✔ AM-transfer-1: positive test of ERC721 transfer (246ms) - ✔ AM-transfer-2: positive test of ERC1155 transfer (224ms) + ✔ MW-transfer-0: positive test of ERC20 transfer (126ms) + ✔ MW-transfer-1: positive test of ERC721 transfer (246ms) + ✔ MW-transfer-2: positive test of ERC1155 transfer (224ms) - AssetManager + MiniWallet withdraw: check withdraw functionality - ✔ AM-withdraw-0: Positive withdrawal test (43ms) + ✔ MW-withdraw-0: Positive withdrawal test (43ms) 47 passing (5s) @@ -191,7 +191,7 @@ Version Instrumenting for coverage... ============================= -> AssetManager.sol +> MiniWallet.sol > debug/TestTokens.sol > Enums.sol > lib/SafeCast.sol @@ -200,9 +200,9 @@ Compilation: ============ Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. - --> contracts/AssetManager.sol:28:1: + --> contracts/MiniWallet.sol:28:1: | -28 | contract AssetManager is Initializable, PausableUpgradeable, AccessControlEnumerableUpgradeable { +28 | contract MiniWallet is Initializable, PausableUpgradeable, AccessControlEnumerableUpgradeable { | ^ (Relevant source part starts here and spans across multiple lines). @@ -217,9 +217,9 @@ Network Info > network: hardhat Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries. - --> contracts/AssetManager.sol:28:1: + --> contracts/MiniWallet.sol:28:1: | -28 | contract AssetManager is Initializable, PausableUpgradeable, AccessControlEnumerableUpgradeable { +28 | contract MiniWallet is Initializable, PausableUpgradeable, AccessControlEnumerableUpgradeable { | ^ (Relevant source part starts here and spans across multiple lines). @@ -229,80 +229,80 @@ Compiled 33 Solidity files successfully ✅ Generated documentation for 36 contracts - AssetManager Admin + MiniWallet Admin Administrator: role view functions - ✔ AM-DEFAULT_ADMIN_ROLE-0: check the administrator role - ✔ AM-OPERATOR_ROLE-0: check the operator role - ✔ AM-getRoleAdmin-0: check Roleadmin role for OPERATOR_ROLE and DEFAULT_ADMIN_ROLE - ✔ AM-getRoleMemberCount-0: check the administator and operator count - ✔ AM-getRoleMember-0: check the administrator is deployer and operators are correct (39ms) + ✔ MW-DEFAULT_ADMIN_ROLE-0: check the administrator role + ✔ MW-OPERATOR_ROLE-0: check the operator role + ✔ MW-getRoleAdmin-0: check Roleadmin role for OPERATOR_ROLE and DEFAULT_ADMIN_ROLE + ✔ MW-getRoleMemberCount-0: check the administator and operator count + ✔ MW-getRoleMember-0: check the administrator is deployer and operators are correct (39ms) Administrator: admin role management using standard functions - ✔ AM-grantRole-0: change administrator (61ms) - ✔ AM-revokeRole-0: revoke operator (105ms) - ✔ AM-revokeRole-1: revert if attempting to revoke operator from non admin account (82ms) + ✔ MW-grantRole-0: change administrator (61ms) + ✔ MW-revokeRole-0: revoke operator (105ms) + ✔ MW-revokeRole-1: revert if attempting to revoke operator from non admin account (82ms) Administrator: changeing Administrator using renounceAdmin - ✔ AM-renounceAdmin-0: admin change administrator - ✔ AM-renounceAdmin-1: admin cannot renounce self - ✔ AM-renounceAdmin-2: renounceAdmin reverts if called by non admin + ✔ MW-renounceAdmin-0: admin change administrator + ✔ MW-renounceAdmin-1: admin cannot renounce self + ✔ MW-renounceAdmin-2: renounceAdmin reverts if called by non admin Administrator: admin role management using admin functions - ✔ AM-adminRemoveOperators-0: remove operator (48ms) - ✔ AM-adminRemoveOperators-1: remove operator revert if when removing non-operator - ✔ AM-adminRemoveOperators-2: remove operator reverts if called by non admin - ✔ AM-adminAddOperators-0: add operator (90ms) - ✔ AM-adminAddOperators-1: add operator revert if already and operator - ✔ AM-adminAddOperators-2: add operator reverts if called by non admin + ✔ MW-adminRemoveOperators-0: remove operator (48ms) + ✔ MW-adminRemoveOperators-1: remove operator revert if when removing non-operator + ✔ MW-adminRemoveOperators-2: remove operator reverts if called by non admin + ✔ MW-adminAddOperators-0: add operator (90ms) + ✔ MW-adminAddOperators-1: add operator revert if already and operator + ✔ MW-adminAddOperators-2: add operator reverts if called by non admin Administrator: OperatorThreshold management - ✔ AM-operatorThreshold-0: check the operatorThreshold - ✔ AM-getRoleMemberCount-1: check the administator and operator count - ✔ AM-getRoleMember-1: check the administrator is deployer and operators are correct - ✔ AM-adminChangeOperatorThreshold-0: update OperatorThreshold - ✔ AM-adminChangeOperatorThreshold-1: update OperatorThreshold fails if called by non Admin + ✔ MW-operatorThreshold-0: check the operatorThreshold + ✔ MW-getRoleMemberCount-1: check the administator and operator count + ✔ MW-getRoleMember-1: check the administrator is deployer and operators are correct + ✔ MW-adminChangeOperatorThreshold-0: update OperatorThreshold + ✔ MW-adminChangeOperatorThreshold-1: update OperatorThreshold fails if called by non Admin Administrator: user limit management - ✔ AM-globalUserLimit-0: check the globalUserLimit - ✔ AM-adminChangeGlobalUserLimit-0: update globalUserLimit - ✔ AM-adminChangeGlobalUserLimit-1: update globalUserLimit fails if called by non Admin + ✔ MW-globalUserLimit-0: check the globalUserLimit + ✔ MW-adminChangeGlobalUserLimit-0: update globalUserLimit + ✔ MW-adminChangeGlobalUserLimit-1: update globalUserLimit fails if called by non Admin Administrator: user auth limit management - ✔ AM-globalUserAuthLimit-0: check the globalUserAuthLimit - ✔ AM-adminChangeGlobalUserAuthLimit-0: update globalUserAuthLimit - ✔ AM-adminChangeGlobalUserAuthLimit-1: update globalUserAuthLimit fails if called by non Admin + ✔ MW-globalUserAuthLimit-0: check the globalUserAuthLimit + ✔ MW-adminChangeGlobalUserAuthLimit-0: update globalUserAuthLimit + ✔ MW-adminChangeGlobalUserAuthLimit-1: update globalUserAuthLimit fails if called by non Admin Administrator: pause functionality - ✔ AM-paused-0: check the if contract is paused - ✔ AM-adminPauseAssetManager-0: pause assetManager - ✔ AM-adminPauseAssetManager-1: pause assetManager fails if already paused - ✔ AM-adminPauseAssetManager-2: adminPauseAssetManager fails if called by non Admin - ✔ AM-adminUnpauseAssetManager-0: unpause assetManager - ✔ AM-adminUnpauseAssetManager-1: unPause assetManager fails if not paused - ✔ AM-adminUnpauseAssetManager-2: adminUnpauseAssetManager fails if called by non Admin - - AssetManager + ✔ MW-paused-0: check the if contract is paused + ✔ MW-adminPauseMiniWallet-0: pause miniWallet + ✔ MW-adminPauseMiniWallet-1: pause miniWallet fails if already paused + ✔ MW-adminPauseMiniWallet-2: adminPauseMiniWallet fails if called by non Admin + ✔ MW-adminUnpauseMiniWallet-0: unpause miniWallet + ✔ MW-adminUnpauseMiniWallet-1: unPause miniWallet fails if not paused + ✔ MW-adminUnpauseMiniWallet-2: adminUnpauseMiniWallet fails if called by non Admin + + MiniWallet approve: check approval functionality - ✔ AM-approve-0: Positive approval test (42ms) + ✔ MW-approve-0: Positive approval test (42ms) - AssetManager + MiniWallet deposit: check deposit functionality - ✔ AM-deposit-0: Positive deposit test (47ms) - ✔ AM-deposit-1: Negative deposit test amount greater global user limit - ✔ AM-deposit-2: Negative deposit test amount two deposits greater global user limit + ✔ MW-deposit-0: Positive deposit test (47ms) + ✔ MW-deposit-1: Negative deposit test amount greater global user limit + ✔ MW-deposit-2: Negative deposit test amount two deposits greater global user limit - AssetManager - extra: Additional AssetManager tests + MiniWallet + extra: Additional MiniWallet tests ✔ Positive walk-through, deposit, withdraw, approve, send (176ms) ✔ checkEventLogs ✔ checkReverts - AssetManager + MiniWallet send: check send functionality - ✔ AM-send-0: Positive send test (76ms) + ✔ MW-send-0: Positive send test (76ms) - AssetManager + MiniWallet transfer: check transfer functionality - ✔ AM-transfer-0: positive test of ERC20 transfer (191ms) - ✔ AM-transfer-1: positive test of ERC721 transfer (308ms) - ✔ AM-transfer-2: positive test of ERC1155 transfer (305ms) + ✔ MW-transfer-0: positive test of ERC20 transfer (191ms) + ✔ MW-transfer-1: positive test of ERC721 transfer (308ms) + ✔ MW-transfer-2: positive test of ERC1155 transfer (305ms) - AssetManager + MiniWallet withdraw: check withdraw functionality - ✔ AM-withdraw-0: Positive withdrawal test (42ms) + ✔ MW-withdraw-0: Positive withdrawal test (42ms) 47 passing (6s) @@ -311,7 +311,7 @@ Compiled 33 Solidity files successfully File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -------------------|----------|----------|----------|----------|----------------| contracts/ | 100 | 68.42 | 100 | 92 | | - AssetManager.sol | 100 | 68.42 | 100 | 92 |... 436,479,496 | + MiniWallet.sol | 100 | 68.42 | 100 | 92 |... 436,479,496 | Enums.sol | 100 | 100 | 100 | 100 | | contracts/debug/ | 26.32 | 0 | 13.64 | 24.39 | | TestTokens.sol | 26.32 | 0 | 13.64 | 24.39 |... 125,129,133 | diff --git a/miniwallet/test/admin.ts b/miniwallet/test/admin.ts deleted file mode 100644 index 203c7a9..0000000 --- a/miniwallet/test/admin.ts +++ /dev/null @@ -1,249 +0,0 @@ -import { expect } from 'chai' -import { ethers, waffle } from 'hardhat' -import { - prepare, - deployUpgradeable -} from './utilities' -import config from '../src/config' -const OPERATOR_ROLE = ethers.utils.id('OPERATOR_ROLE') -const DEFAULT_ADMIN_ROLE = '0x0000000000000000000000000000000000000000000000000000000000000000' - -// let snapshotId: string; - -describe('AssetManager Admin', function () { - before(async function () { - await prepare(this, [ - 'AssetManager', - 'TestERC20', - 'TestERC721', - 'TestERC1155' - ]) - }) - - beforeEach(async function () { - this.snapshotId = await waffle.provider.send('evm_snapshot', []) - await deployUpgradeable(this, [ - [ - 'assetManager', - this.AssetManager, - [ - config.test.initialOperatorThreshold, - config.test.initialOperators, - config.test.initialUserLimit, - config.test.initialAuthLimit - ] - ] - ]) - }) - - afterEach(async function () { - await waffle.provider.send('evm_revert', [this.snapshotId]) - }) - - describe('Administrator: role view functions', function () { - it('AM-DEFAULT_ADMIN_ROLE-0: check the administrator role', async function () { - expect(await this.assetManager.DEFAULT_ADMIN_ROLE()).to.equal(DEFAULT_ADMIN_ROLE) - }) - it('AM-OPERATOR_ROLE-0: check the operator role', async function () { - expect(await this.assetManager.OPERATOR_ROLE()).to.equal(OPERATOR_ROLE) - }) - it('AM-getRoleAdmin-0: check Roleadmin role for OPERATOR_ROLE and DEFAULT_ADMIN_ROLE', async function () { - expect(await this.assetManager.getRoleAdmin(DEFAULT_ADMIN_ROLE)).to.equal(DEFAULT_ADMIN_ROLE) - expect(await this.assetManager.getRoleAdmin(OPERATOR_ROLE)).to.equal(DEFAULT_ADMIN_ROLE) - }) - it('AM-getRoleMemberCount-0: check the administator and operator count', async function () { - expect(await this.assetManager.getRoleMemberCount(DEFAULT_ADMIN_ROLE)).to.equal(1) - expect(await this.assetManager.getRoleMemberCount(OPERATOR_ROLE)).to.equal(3) - }) - it('AM-getRoleMember-0: check the administrator is deployer and operators are correct', async function () { - expect(await this.assetManager.getRoleMember(DEFAULT_ADMIN_ROLE, 0)).to.equal(this.deployer.address) - const operatorCount = await this.assetManager.getRoleMemberCount(OPERATOR_ROLE) - for (let i = 0; i < operatorCount; ++i) { - expect(await this.assetManager.getRoleMember(OPERATOR_ROLE, i)).to.equal(config.test.initialOperators[i]) - } - }) - }) - - describe('Administrator: admin role management using standard functions', function () { - it('AM-grantRole-0: change administrator', async function () { - await expect(this.assetManager.grantRole(DEFAULT_ADMIN_ROLE, this.operatorA.address)) - .to.emit(this.assetManager, 'RoleGranted') - .withArgs(DEFAULT_ADMIN_ROLE, this.operatorA.address, this.deployer.address) - expect(await this.assetManager.getRoleMemberCount(DEFAULT_ADMIN_ROLE)).to.equal(2) - await expect(await this.assetManager.revokeRole(DEFAULT_ADMIN_ROLE, this.deployer.address)) - .to.emit(this.assetManager, 'RoleRevoked') - .withArgs(DEFAULT_ADMIN_ROLE, this.deployer.address, this.deployer.address) - expect(await this.assetManager.getRoleMemberCount(DEFAULT_ADMIN_ROLE)).to.equal(1) - expect(await this.assetManager.getRoleMember(DEFAULT_ADMIN_ROLE, 0)).to.equal(this.operatorA.address) - }) - it('AM-revokeRole-0: revoke operator', async function () { - await expect(await this.assetManager.revokeRole(OPERATOR_ROLE, this.operatorC.address)) - .to.emit(this.assetManager, 'RoleRevoked') - .withArgs(OPERATOR_ROLE, this.operatorC.address, this.deployer.address) - expect(await this.assetManager.getRoleMemberCount(OPERATOR_ROLE)).to.equal(2) - expect(await this.assetManager.getRoleMember(OPERATOR_ROLE, 0)).to.equal(this.operatorA.address) - expect(await this.assetManager.getRoleMember(OPERATOR_ROLE, 1)).to.equal(this.operatorB.address) - await expect(this.assetManager.grantRole(OPERATOR_ROLE, this.operatorC.address)) - .to.emit(this.assetManager, 'RoleGranted') - .withArgs(OPERATOR_ROLE, this.operatorC.address, this.deployer.address) - expect(await this.assetManager.getRoleMemberCount(OPERATOR_ROLE)).to.equal(3) - const operatorCount = await this.assetManager.getRoleMemberCount(OPERATOR_ROLE) - for (let i = 0; i < operatorCount; ++i) { - expect(await this.assetManager.getRoleMember(OPERATOR_ROLE, i)).to.equal(config.test.initialOperators[i]) - } - }) - it('AM-revokeRole-1: revert if attempting to revoke operator from non admin account', async function () { - await expect(this.assetManager.connect(this.operatorA).revokeRole(OPERATOR_ROLE, this.operatorC.address)) - .to.be.revertedWith('AccessControl: account 0x70997970c51812dc3a010c7d01b50e0d17dc79c8 is missing role 0x0000000000000000000000000000000000000000000000000000000000000000') - }) - }) - - describe('Administrator: changing Administrator using renounceAdmin', function () { - it('AM-renounceAdmin-0: admin change administrator', async function () { - const tx = await this.assetManager.renounceAdmin(this.operatorA.address) - await expect(tx) - .to.emit(this.assetManager, 'RoleGranted') - .withArgs(DEFAULT_ADMIN_ROLE, this.operatorA.address, this.deployer.address) - .to.emit(this.assetManager, 'RoleRevoked') - .withArgs(DEFAULT_ADMIN_ROLE, this.deployer.address, this.deployer.address) - }) - it('AM-renounceAdmin-1: admin cannot renounce self', async function () { - await expect(this.assetManager.renounceAdmin(this.deployer.address)).to.be.revertedWith('cannot renounce self') - }) - it('AM-renounceAdmin-2: renounceAdmin reverts if called by non admin', async function () { - await expect(this.assetManager.connect(this.operatorA).renounceAdmin(this.operatorC.address)) - .to.be.revertedWith('sender doesn\'t have admin role') - }) - }) - - describe('Administrator: admin role management using admin functions', function () { - it('AM-adminRemoveOperators-0: remove operator', async function () { - await expect(await this.assetManager.adminRemoveOperators([this.operatorA.address, this.operatorC.address])) - .to.emit(this.assetManager, 'OperatorsRemoved') - .withArgs([this.operatorA.address, this.operatorC.address]) - expect(await this.assetManager.getRoleMemberCount(OPERATOR_ROLE)).to.equal(1) - expect(await this.assetManager.getRoleMember(OPERATOR_ROLE, 0)).to.equal(this.operatorB.address) - }) - it('AM-adminRemoveOperators-1: remove operator revert if when removing non-operator', async function () { - await expect(this.assetManager.adminRemoveOperators([this.ernie.address])) - .to.be.revertedWith('removing non-operator') - }) - it('AM-adminRemoveOperators-2: remove operator reverts if called by non admin', async function () { - await expect(this.assetManager.connect(this.operatorA).adminRemoveOperators([this.operatorC.address])) - .to.be.revertedWith('sender doesn\'t have admin role') - }) - it('AM-adminAddOperators-0: add operator', async function () { - await expect(await this.assetManager.adminRemoveOperators([this.operatorA.address, this.operatorC.address])) - .to.emit(this.assetManager, 'OperatorsRemoved') - .withArgs([this.operatorA.address, this.operatorC.address]) - await expect(await this.assetManager.adminAddOperators([this.operatorA.address, this.operatorC.address])) - .to.emit(this.assetManager, 'OperatorsAdded') - .withArgs([this.operatorA.address, this.operatorC.address]) - const operatorCount = await this.assetManager.getRoleMemberCount(OPERATOR_ROLE) - expect(operatorCount).to.equal(3) - expect(await this.assetManager.getRoleMember(OPERATOR_ROLE, 0)).to.equal(this.operatorB.address) - expect(await this.assetManager.getRoleMember(OPERATOR_ROLE, 1)).to.equal(this.operatorA.address) - expect(await this.assetManager.getRoleMember(OPERATOR_ROLE, 2)).to.equal(this.operatorC.address) - }) - it('AM-adminAddOperators-1: add operator revert if already and operator', async function () { - await expect(this.assetManager.adminAddOperators([this.operatorB.address])) - .to.be.revertedWith('already has operator role') - }) - it('AM-adminAddOperators-2: add operator reverts if called by non admin', async function () { - await expect(this.assetManager.connect(this.operatorA).adminAddOperators([this.operatorC.address])) - .to.be.revertedWith('sender doesn\'t have admin role') - }) - }) - - describe('Administrator: OperatorThreshold management', function () { - it('AM-operatorThreshold-0: check the operatorThreshold', async function () { - expect((await this.assetManager.operatorThreshold()).toString()).to.equal((config.test.initialOperatorThreshold)) - }) - it('AM-getRoleMemberCount-1: check operator count', async function () { - expect(await this.assetManager.getRoleMemberCount(OPERATOR_ROLE)).to.equal(3) - }) - it('AM-getRoleMember-1: check the administrator is deployer and operators are correct', async function () { - const operatorCount = await this.assetManager.getRoleMemberCount(OPERATOR_ROLE) - for (let i = 0; i < operatorCount; ++i) { - expect(await this.assetManager.getRoleMember(OPERATOR_ROLE, i)).to.equal(config.test.initialOperators[i]) - } - }) - it('AM-adminChangeOperatorThreshold-0: update OperatorThreshold', async function () { - await expect(await this.assetManager.adminChangeOperatorThreshold(20)) - .to.emit(this.assetManager, 'OperatorThresholdChanged') - .withArgs(20) - expect(await this.assetManager.operatorThreshold()).to.equal(20) - }) - it('AM-adminChangeOperatorThreshold-1: update OperatorThreshold fails if called by non Admin', async function () { - await expect(this.assetManager.connect(this.operatorA).adminChangeOperatorThreshold(10000)) - .to.be.revertedWith('sender doesn\'t have admin role') - }) - }) - describe('Administrator: user limit management', function () { - it('AM-globalUserLimit-0: check the globalUserLimit', async function () { - expect(await this.assetManager.globalUserLimit()).to.equal(config.test.initialUserLimit) - }) - it('AM-adminChangeGlobalUserLimit-0: update globalUserLimit', async function () { - await expect(await this.assetManager.adminChangeGlobalUserLimit(10000)) - .to.emit(this.assetManager, 'GlobalUserLimitChanged') - .withArgs(10000) - expect(await this.assetManager.globalUserLimit()).to.equal(10000) - }) - it('AM-adminChangeGlobalUserLimit-1: update globalUserLimit fails if called by non Admin', async function () { - await expect(this.assetManager.connect(this.operatorA).adminChangeGlobalUserLimit(10000)) - .to.be.revertedWith('sender doesn\'t have admin role') - }) - }) - - describe('Administrator: user auth limit management', function () { - it('AM-globalUserAuthLimit-0: check the globalUserAuthLimit', async function () { - expect(await this.assetManager.globalUserAuthLimit()).to.equal(config.test.initialAuthLimit) - }) - it('AM-adminChangeGlobalUserAuthLimit-0: update globalUserAuthLimit', async function () { - await expect(await this.assetManager.adminChangeGlobalUserAuthLimit(1000)) - .to.emit(this.assetManager, 'GlobalUserAuthLimitChanged') - .withArgs(1000) - expect(await this.assetManager.globalUserAuthLimit()).to.equal(1000) - }) - it('AM-adminChangeGlobalUserAuthLimit-1: update globalUserAuthLimit fails if called by non Admin', async function () { - await expect(this.assetManager.connect(this.operatorA).adminChangeGlobalUserAuthLimit(1000)) - .to.be.revertedWith('sender doesn\'t have admin role') - }) - }) - - describe('Administrator: pause functionality', function () { - it('AM-paused-0: check the if contract is paused', async function () { - expect(await this.assetManager.paused()).to.equal(false) - }) - it('AM-adminPauseAssetManager-0: pause assetManager', async function () { - await expect(await this.assetManager.adminPauseAssetManager()) - .to.emit(this.assetManager, 'Paused') - .withArgs(this.deployer.address) - expect(await this.assetManager.paused()).to.equal(true) - }) - it('AM-adminPauseAssetManager-1: pause assetManager fails if already paused', async function () { - await this.assetManager.adminPauseAssetManager() - await expect(this.assetManager.adminPauseAssetManager()) - .to.be.revertedWith('Pausable: paused') - }) - it('AM-adminPauseAssetManager-2: adminPauseAssetManager fails if called by non Admin', async function () { - await expect(this.assetManager.connect(this.operatorA).adminPauseAssetManager()) - .to.be.revertedWith('sender doesn\'t have admin role') - }) - it('AM-adminUnpauseAssetManager-0: unpause assetManager', async function () { - await this.assetManager.adminPauseAssetManager() - await expect(await this.assetManager.adminUnpauseAssetManager()) - .to.emit(this.assetManager, 'Unpaused') - .withArgs(this.deployer.address) - expect(await this.assetManager.paused()).to.equal(false) - }) - it('AM-adminUnpauseAssetManager-1: unpause assetManager fails if not paused', async function () { - await expect(this.assetManager.adminUnpauseAssetManager()) - .to.be.revertedWith('Pausable: not paused') - }) - it('AM-adminUnpauseAssetManager-2: adminUnpauseAssetManager fails if called by non Admin', async function () { - await expect(this.assetManager.connect(this.operatorA).adminUnpauseAssetManager()) - .to.be.revertedWith('sender doesn\'t have admin role') - }) - }) -}) diff --git a/miniwallet/test/approve.ts b/miniwallet/test/approve.ts deleted file mode 100644 index b1d7f06..0000000 --- a/miniwallet/test/approve.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { expect } from 'chai' -import { ethers, waffle } from 'hardhat' -import { - prepare, - deployUpgradeable, - checkBalance, - getTxCost -} from './utilities' -import config from '../src/config' - -const ZERO_ETH = ethers.utils.parseEther('0') -const ONE_ETH = ethers.utils.parseEther('1') - -describe('AssetManager', function () { - before(async function () { - await prepare(this, [ - 'AssetManager', - 'TestERC20', - 'TestERC721', - 'TestERC1155' - ]) - }) - - beforeEach(async function () { - this.snapshotId = await waffle.provider.send('evm_snapshot', []) - await deployUpgradeable(this, [ - [ - 'assetManager', - this.AssetManager, - [ - config.test.initialOperatorThreshold, - config.test.initialOperators, - config.test.initialUserLimit, - config.test.initialAuthLimit - ] - ] - ]) - }) - - afterEach(async function () { - await waffle.provider.send('evm_revert', [this.snapshotId]) - }) - - describe('approve: check approval functionality', function () { - it('AM-approve-0: Positive approval test', async function () { - const provider = waffle.provider - - // check Initial Balance - await checkBalance(this.alice, '10000') - let aliceBalance = await this.alice.getBalance() - const bobBalance = await this.bob.getBalance() - const assetManagerBalance = await provider.getBalance( - this.assetManager.address - ) - - const tx = await this.assetManager - .connect(this.alice) - .approve(this.bob.address, ONE_ETH) - const gasUsed = await getTxCost(tx.hash) - // Calculate and check new balances - aliceBalance = aliceBalance.sub(gasUsed) - await expect(await this.alice.getBalance()).to.equal(aliceBalance) - await expect(await this.bob.getBalance()).to.equal(bobBalance) - await expect( - await provider.getBalance(this.assetManager.address) - ).to.equal(assetManagerBalance) - // Check events emitted - await expect(tx) - .to.emit(this.assetManager, 'Approval') - .withArgs(this.alice.address, this.bob.address, ONE_ETH) - await tx.wait() - // Check Alice's Balance and Auth on AssetManager - await expect( - await this.assetManager.userBalances(this.alice.address) - ).to.equal(ZERO_ETH) - expect( - await this.assetManager.allowance(this.alice.address, this.bob.address) - ).to.equal(ONE_ETH) - }) - }) -}) diff --git a/miniwallet/test/miniNFTs/Mini1155.ts b/miniwallet/test/miniNFTs/Mini1155.ts new file mode 100644 index 0000000..05392a3 --- /dev/null +++ b/miniwallet/test/miniNFTs/Mini1155.ts @@ -0,0 +1,493 @@ +import config from '../../config/miniNFTs' +import { expect } from 'chai' +import { ethers, network } from 'hardhat' +import Constants from '../utilities/constants' + +import { mini1155configure } from '../utilities' + +export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' + +// Deployment configuration +const deploymentConfig = config.mini1155.deploy +const c1 = config.mini1155.collection1 +console.log(`Initial c1: ${JSON.stringify(c1)}`) +const c2 = config.mini1155.collection2 + +describe('Mini1155', function () { + before(async function (this) { + this.signers = await ethers.getSigners() + this.deployer = this.signers[0] + this.royalties = this.signers[1] + this.minter = this.signers[2] + this.alice = this.signers[3] + this.bob = this.signers[4] + this.carol = this.signers[5] + this.Mini1155 = await ethers.getContractFactory('Mini1155') + }) + + beforeEach(async function (this) { + this.snapshotId = await ethers.provider.send('evm_snapshot', []) + const Mini1155 = await ethers.getContractFactory('Mini1155') + this.mini1155 = await Mini1155.deploy( + deploymentConfig.saleIsActive, + deploymentConfig.metadataFrozen, + deploymentConfig.mintPrice, + deploymentConfig.maxPerMint, + deploymentConfig.s.tokenId, + deploymentConfig.r.tokenId, + deploymentConfig.exchangeRatio, + deploymentConfig.rareProbabilityPercentage, + deploymentConfig.salt, + deploymentConfig.baseUri, + deploymentConfig.contractUri + ) + console.log('finished deploy') + await this.mini1155.deployed() + // set the revenue account + await this.mini1155.setRevenueAccount(deploymentConfig.revenueAccount) + // set the standard and rare maxSupply + await this.mini1155.setMaxSupply(deploymentConfig.s.tokenId, deploymentConfig.s.maxSupply) // standard tokenId (Access Pass) + await this.mini1155.setMaxSupply(deploymentConfig.r.tokenId, deploymentConfig.r.maxSupply) // rare TokenId (Collector Pass) + // set the standard and rare maxPersonalCap + await this.mini1155.setMaxPersonalCap(deploymentConfig.s.tokenId, deploymentConfig.s.personalCap) // standard tokenId (Access Pass) + await this.mini1155.setMaxPersonalCap(deploymentConfig.r.tokenId, deploymentConfig.r.personalCap) // rare TokenId (Collector Pass) + await this.mini1155.setNameSymbol(deploymentConfig.name, deploymentConfig.symbol) + }) + + afterEach(async function (this) { + // console.log(`Reverting Snapshot : ${snapshotId}`); + await network.provider.send('evm_revert', [this.snapshotId]) + }) + + describe('Mini1155Tests', function (this) { + // Deployment Tests + it('Mini1155-1 Deployment Validation', async function () { + expect(await this.mini1155.address).to.equal( + '0x5FbDB2315678afecb367f032d93F642f64180aa3' + ) + // Test View Functions + const owner = await this.mini1155.owner() + const tid = 1 + expect(owner).to.equal(this.deployer.address) + expect(await this.mini1155.balanceOf(owner, tid)).to.equal(0) + expect((await this.mini1155.balanceOfBatch([owner, owner], [1, 2])).map(x => x.toString())).to.deep.equal(['0', '0']) + expect(await this.mini1155.baseUri()).to.equal(deploymentConfig.baseUri) + expect(await this.mini1155.contractURI()).to.equal(deploymentConfig.contractUri) + expect(await this.mini1155.exchangeRatio()).to.equal(deploymentConfig.exchangeRatio) + expect(await this.mini1155.exists(deploymentConfig.s.tokenId)).to.equal(false) + expect(await this.mini1155.getRaribleV2Royalties(1)).to.deep.equal([]) + expect(await this.mini1155.isApprovedForAll(this.alice.address, owner)).to.equal(false) + expect(await this.mini1155.maxPerMint()).to.equal(deploymentConfig.maxPerMint) + expect(await this.mini1155.maxPersonalCap(deploymentConfig.s.tokenId)).to.equal(deploymentConfig.s.personalCap) + expect(await this.mini1155.maxSupply(deploymentConfig.s.tokenId)).to.equal(deploymentConfig.s.maxSupply) + expect(await this.mini1155.metadataFrozen()).to.equal(false) + expect(await this.mini1155.metadataUris(deploymentConfig.s.tokenId)).to.equal('') + expect(await this.mini1155.mintPrice()).to.equal(deploymentConfig.mintPrice) + expect(await this.mini1155.name()).to.equal(deploymentConfig.name) + expect(await this.mini1155.owner()).to.equal(this.deployer.address) + expect(await this.mini1155.paused()).to.equal(false) + expect(await this.mini1155.rareProbabilityPercentage()).to.equal(deploymentConfig.rareProbabilityPercentage) + expect(await this.mini1155.revenueAccount()).to.equal(deploymentConfig.revenueAccount) + // expect(await this.mini1155.royalties(1, 1)).to.equal(0, this.deployer.address) + // expect(await this.mini1155.royaltyInfo(1, 1)).to.equal(this.deployer.address, 0) + expect(await this.mini1155.saleIsActive()).to.equal(deploymentConfig.saleIsActive) + expect(await this.mini1155.saleStarted()).to.equal(false) + expect(await this.mini1155.salt()).to.equal(deploymentConfig.salt) + expect(await this.mini1155.standardTokenId()).to.equal(deploymentConfig.s.tokenId) + expect(await this.mini1155.supportsInterface(Constants.InterfaceId.ERC2981_NFT_ROYALTY_STANDARD)).to.equal(true) + expect(await this.mini1155.symbol()).to.equal(deploymentConfig.symbol) + expect(await this.mini1155.totalSupply(deploymentConfig.s.tokenId)).to.equal(0) + expect(await this.mini1155.uri(deploymentConfig.s.tokenId)).to.equal('ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/1') + }) + + it('Mini1155-2 Configuration Validation', async function () { + // Set Standard and Rare Tokens + // await mini1155configure({ mini1155: this.mini1155, revenueAccount: await this.mini1155.owner() }) + console.log('Mini1155-2 about to mini1155configure') + console.log(`c1: ${JSON.stringify(c1)}`) + await mini1155configure({ mini1155: this.mini1155, collectionConfig: c1 }) + console.log('Mini1155-2 Have completed mini1155configure') + // Check all readOnlyFunctions + expect(this.mini1155.address).to.equal( + '0x5FbDB2315678afecb367f032d93F642f64180aa3' + ) + // Test Token Configuration + expect(await this.mini1155.owner()).to.equal(this.deployer.address) + expect(await this.mini1155.metadataFrozen()).to.equal(false) + expect(await this.mini1155.standardTokenId()).to.equal(c1.s.tokenId) + expect(await this.mini1155.maxSupply(c1.s.tokenId)).to.equal(c1.s.maxSupply) + expect(await this.mini1155.maxPersonalCap(c1.s.tokenId)).to.equal(c1.s.personalCap) + expect(await this.mini1155.uri(c1.s.tokenId)).to.equal('ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/1') + expect(await this.mini1155.rareTokenId()).to.equal(c1.r.tokenId) + expect(await this.mini1155.maxSupply(c1.r.tokenId)).to.equal(c1.r.maxSupply) + expect(await this.mini1155.maxPersonalCap(c1.r.tokenId)).to.equal(c1.r.personalCap) + expect(await this.mini1155.uri(2)).to.equal('ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/2') + // Although configured tokens don't exist till minted + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(false) + expect(await this.mini1155.exists(c1.r.tokenId)).to.equal(false) + // Test View Functions + const owner = await this.mini1155.owner() + // const tid = 1 + expect(await this.mini1155.balanceOf(owner, c1.s.tokenId)).to.equal(0) + expect((await this.mini1155.balanceOfBatch([owner, owner], [1, 2])).map(x => x.toString())).to.deep.equal(['0', '0']) + expect(await this.mini1155.baseUri()).to.equal('ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/') + expect(await this.mini1155.contractURI()).to.equal('ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/contract.json') + expect(await this.mini1155.exchangeRatio()).to.equal(0) + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(false) + expect(await this.mini1155.getRaribleV2Royalties(c1.s.tokenId)).to.deep.equal([]) + expect(await this.mini1155.isApprovedForAll(this.alice.address, owner)).to.equal(false) + expect(await this.mini1155.maxPerMint()).to.equal(10) + expect(await this.mini1155.maxPersonalCap(c1.s.tokenId)).to.equal(c1.s.personalCap) + expect(await this.mini1155.maxSupply(c1.s.tokenId)).to.equal(c1.s.maxSupply) + expect(await this.mini1155.metadataFrozen()).to.equal(false) + expect(await this.mini1155.metadataFrozen()).to.equal(false) + expect(await this.mini1155.metadataUris(c1.s.tokenId)).to.equal('') + expect(await this.mini1155.mintPrice()).to.equal(c1.mintPrice) + expect(await this.mini1155.owner()).to.equal(this.deployer.address) + expect(await this.mini1155.paused()).to.equal(false) + expect(await this.mini1155.rareProbabilityPercentage()).to.equal(1) + expect(await this.mini1155.revenueAccount()).to.equal(c1.revenueAccount) + // expect(await this.mini1155.royalties(1, 1)).to.equal(0, this.deployer.address) + // expect(await this.mini1155.royaltyInfo(1, 1)).to.equal(this.deployer.address, 0) + expect(await this.mini1155.saleIsActive()).to.equal(false) + expect(await this.mini1155.saleStarted()).to.equal(false) + expect(await this.mini1155.salt()).to.equal(deploymentConfig.salt) + expect(await this.mini1155.standardTokenId()).to.equal(c1.s.tokenId) + expect(await this.mini1155.supportsInterface(Constants.InterfaceId.ERC2981_NFT_ROYALTY_STANDARD)).to.equal(true) + expect(await this.mini1155.totalSupply(c1.s.tokenId)).to.equal(0) + expect(await this.mini1155.uri(1)).to.equal('ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/1') + }) + + it('Mini1155-3 Sale Validation', async function () { + // await mini1155configure({ mini1155: this.mini1155, revenueAccount: await this.mini1155.owner() }) + await mini1155configure({ mini1155: this.mini1155, collectionConfig: c1 }) + let numTokens = 1 + // const mintPrice = await this.mini1155.mintPrice() + // Can only mint when sale is active + await expect( + this.mini1155.connect(this.alice).mint(numTokens, { + value: c1.mintPrice.mul(numTokens) + }) + ).to.be.revertedWith('sale not active') + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(false) + // set sale to active + await this.mini1155.toggleSaleState() + // * Mints a ERC1155 token + await this.mini1155.connect(this.alice).mint(numTokens, { + value: c1.mintPrice.mul(numTokens) + }) + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(true) + expect(await this.mini1155.totalSupply(c1.s.tokenId)).to.equal(1) + numTokens = 10 + await expect( + this.mini1155.connect(this.alice).mint(numTokens, { + value: c1.mintPrice.mul(numTokens) + }) + ).to.be.revertedWith('standard token personal cap exceeded') + // Validate Sale Changes + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(true) + expect(await this.mini1155.saleIsActive()).to.equal(true) + expect(await this.mini1155.saleStarted()).to.equal(true) + expect(await this.mini1155.totalSupply(c1.s.tokenId)).to.equal(1) + // Test View Functions + const owner = await this.mini1155.owner() + // const tid = 1 + expect(await this.mini1155.balanceOf(owner, c1.s.tokenId)).to.equal(0) + expect((await this.mini1155.balanceOfBatch([owner, owner], [1, 2])).map(x => x.toString())).to.deep.equal(['0', '0']) + expect(await this.mini1155.baseUri()).to.equal('ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/') + expect(await this.mini1155.contractURI()).to.equal('ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/contract.json') + expect(await this.mini1155.exchangeRatio()).to.equal(0) + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(true) + expect(await this.mini1155.getRaribleV2Royalties(c1.s.tokenId)).to.deep.equal([]) + expect(await this.mini1155.isApprovedForAll(this.alice.address, owner)).to.equal(false) + expect(await this.mini1155.maxPerMint()).to.equal(10) + expect(await this.mini1155.maxPersonalCap(c1.s.tokenId)).to.equal(c1.s.personalCap) + expect(await this.mini1155.maxSupply(c1.s.tokenId)).to.equal(c1.s.maxSupply) + expect(await this.mini1155.metadataFrozen()).to.equal(false) + expect(await this.mini1155.metadataFrozen()).to.equal(false) + expect(await this.mini1155.metadataUris(c1.s.tokenId)).to.equal('') + expect(await this.mini1155.mintPrice()).to.equal(c1.mintPrice) + expect(await this.mini1155.owner()).to.equal(this.deployer.address) + expect(await this.mini1155.paused()).to.equal(false) + expect(await this.mini1155.rareProbabilityPercentage()).to.equal(1) + expect(await this.mini1155.revenueAccount()).to.equal(c1.revenueAccount) + expect(await this.mini1155.saleIsActive()).to.equal(true) + expect(await this.mini1155.saleStarted()).to.equal(true) + expect(await this.mini1155.salt()).to.equal(deploymentConfig.salt) + expect(await this.mini1155.standardTokenId()).to.equal(c1.s.tokenId) + expect(await this.mini1155.supportsInterface(Constants.InterfaceId.ERC2981_NFT_ROYALTY_STANDARD)).to.equal(true) + expect(await this.mini1155.totalSupply(c1.s.tokenId)).to.equal(1) + expect(await this.mini1155.uri(1)).to.equal('ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/1') + }) + + it('Mini1155-4 Owner Validation', async function () { + const standardURI = 'ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/3.json' + const rareURI = 'ipfs://Qmc8DVEthq7cZMTMyZ2NQ8dHkG99n549DMBwNzAypQgXe1/Mini1155/4.json' + const royaltyPercentage = 10 + await mini1155configure({ mini1155: this.mini1155, collectionConfig: c1 }) + let numTokens = 1 + // set sale to active + await this.mini1155.toggleSaleState() + + // Owner Tests + + // Setting all flags + // set the revenue account + await this.mini1155.setRevenueAccount(c1.revenueAccount) + // configure standard Token + await this.mini1155.setStandardTokenId(c1.s.tokenId) + await this.mini1155.setMaxSupply(c1.s.tokenId, c1.s.maxSupply) + await this.mini1155.setMaxPersonalCap(c1.s.tokenId, c1.s.personalCap) + await this.mini1155.setUri(c1.s.tokenId, standardURI) + // configure rare Token + await this.mini1155.setRareTokenId(c1.r.tokenId) + await this.mini1155.setMaxSupply(c1.r.tokenId, c1.r.maxSupply) + await this.mini1155.setMaxPersonalCap(c1.r.tokenId, c1.r.personalCap) + await this.mini1155.setUri(c1.r.tokenId, rareURI) + await this.mini1155.setRareProbabilityPercentage(c1.rareProbabilityPercentage) + // configure exchange rate + await this.mini1155.setExchangeRatio(c1.exchangeRatio) + + // test other setters + await this.mini1155.setBaseUri(deploymentConfig.baseUri) + await this.mini1155.setContractUri(deploymentConfig.contractUri) + await this.mini1155.setMaxPerMint(c1.maxPerMint) + await this.mini1155.setMintPrice(c1.mintPrice) + await this.mini1155.setRareProbabilityPercentage(c1.rareProbabilityPercentage) + await this.mini1155.setRoyalties(c1.s.tokenId, this.royalties.address, royaltyPercentage) + await this.mini1155.setSalt(deploymentConfig.salt) + await this.mini1155.pause() + await this.mini1155.unpause() + await this.mini1155.freezeMetadata() + await this.mini1155.toggleSaleState() + + // Owner Minting and Burning and Exchange + // "function mintAsOwner(address,uint256,uint256)", + await this.mini1155.toggleSaleState() + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(false) + await this.mini1155['mintAsOwner(address,uint256,uint256)'](this.deployer.address, c1.s.tokenId, 40) + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(true) + expect(await this.mini1155.totalSupply(c1.s.tokenId)).to.equal(40) + await this.mini1155['mintAsOwner(address,uint256,uint256)'](this.deployer.address, c1.s.tokenId, 60) + expect(await this.mini1155.totalSupply(c1.s.tokenId)).to.equal(100) + // "function mint(uint256) payable", + numTokens = 11 // amount exceeding mint limit + await expect( + this.mini1155.mint(numTokens) + ).to.be.revertedWith('exceeded per mint limit') + + // Batch Functions + const owner = await this.mini1155.owner() + const tid1 = 10 + const tid2 = 11 + // TODO "function mintBatch(address,uint256[],uint256[],bytes)", + await this.mini1155.mintAsOwner(owner, tid1, 1000) + await this.mini1155.mintAsOwner(owner, tid2, 100) + expect((await this.mini1155.balanceOfBatch([owner, owner], [tid1, tid2])).map(x => x.toString())).to.deep.equal(['1000', '100']) + await this.mini1155.burnBatch(owner, [tid1, tid2], [100, 10]) + expect((await this.mini1155.balanceOfBatch([owner, owner], [tid1, tid2])).map(x => x.toString())).to.deep.equal(['900', '90']) + await this.mini1155.safeBatchTransferFrom(owner, this.alice.address, [tid1, tid2], [70, 7], '0x') + expect((await this.mini1155.balanceOfBatch([owner, owner, this.alice.address, this.alice.address], [tid1, tid2, tid1, tid2])).map(x => x.toString())).to.deep.equal(['830', '83', '70', '7']) + await this.mini1155.burn(owner, tid1, 200) + expect((await this.mini1155.balanceOfBatch([owner], [tid1])).map(x => x.toString())).to.deep.equal(['630']) + await this.mini1155.safeTransferFrom(owner, this.alice.address, tid1, 100, '0x') + expect((await this.mini1155.balanceOfBatch([owner, this.alice.address], [tid1, tid1])).map(x => x.toString())).to.deep.equal(['530', '170']) + }) + + it('Mini1155-5 User Validation', async function () { + + }) + + it('Mini1155-6 Negative Use Case Validation', async function () { + // Ensure community can't use owner functions + await expect( + this.mini1155 + .connect(this.alice)['mintAsOwner(address,uint256,uint256)'](this.deployer.address, 1, 500) + ).to.be.revertedWith('Ownable: caller is not the owner') + + // One User should not be able to mint and exchange all the tokens + await mini1155configure({ mini1155: this.mini1155, collectionConfig: c1 }) + const numTokens = 10 + // set sale to active + await this.mini1155.toggleSaleState() + // Should never have exchangeRatio set when sales is active otherwise users can mint and exchange to exceed personal limits + await this.mini1155.setExchangeRatio(10) + for (let i = 0; i < 77; i++) { + // Mint 10 exchange them for rare and then + await this.mini1155.connect(this.bob).mint(numTokens, { + value: c1.mintPrice.mul(numTokens) + }) + await this.mini1155.connect(this.bob).exchange() + } + // Validate Sale Changes + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(false) + expect(await this.mini1155.exists(c1.r.tokenId)).to.equal(true) + expect(await this.mini1155.saleIsActive()).to.equal(true) + expect(await this.mini1155.saleStarted()).to.equal(true) + expect(await this.mini1155.totalSupply(c1.s.tokenId)).to.equal(0) + expect(await this.mini1155.totalSupply(c1.r.tokenId)).to.equal(77) + expect(await this.mini1155.balanceOf(this.bob.address, c1.s.tokenId)).to.equal(0) + expect(await this.mini1155.balanceOf(this.bob.address, c1.r.tokenId)).to.equal(77) + }) + + it('Mini1155-7 Event Validation', async function () { + + }) + + it('Mini1155-8 Second Edition Validation', async function () { + const owner = await this.mini1155.owner() + // Deploy (Owner done in before each) + // Configure Collection 1 (Owner) + await mini1155configure({ mini1155: this.mini1155, collectionConfig: c1 }) + + // Start Sale (Owner) + await this.mini1155.toggleSaleState() + let contractBalance = await ethers.provider.getBalance(this.mini1155.address) + expect(contractBalance).to.equal(ethers.utils.parseEther('0')) + + // mint Tokens (Community) + for (let i = 1; i <= 77; i++) { + // console.log(`i: ${i}`) + // Mint 10 tokens + for (let j = 1; j <= 4; j++) { + await this.mini1155.connect(this.signers[i]).mint(j, { + value: c1.mintPrice.mul(j) + }) + } + } + console.log('Collection 1') + console.log(`Total Minted Standard Token : ${await this.mini1155.totalSupply(c1.s.tokenId)}`) + console.log(`Total Minted Rare Token : ${await this.mini1155.totalSupply(c1.r.tokenId)}`) + + // End the Sale and check token exists and mintAsOwner remaining Tokens + await this.mini1155.toggleSaleState() + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(true) + expect(await this.mini1155.exists(c1.s.tokenId)).to.equal(true) + let remainingStandard = (await this.mini1155.maxSupply(c1.s.tokenId)).sub(await this.mini1155.totalSupply(c1.s.tokenId)) + let remainingRare = (await this.mini1155.maxSupply(c1.r.tokenId)).sub(await this.mini1155.totalSupply(c1.r.tokenId)) + await this.mini1155.mintAsOwner(this.deployer.address, c1.s.tokenId, remainingStandard) + await this.mini1155.mintAsOwner(this.deployer.address, c1.r.tokenId, remainingRare) + expect(await this.mini1155.balanceOf(owner, c1.s.tokenId)).to.equal(remainingStandard) + expect(await this.mini1155.balanceOf(owner, c1.r.tokenId)).to.equal(remainingRare) + + // Exchange the Tokens (Community) + let exchangeRatio = 10 + await this.mini1155.setExchangeRatio(exchangeRatio) + for (let i = 1; i <= 70; i++) { + // console.log(`Exchange i: ${i}`) + const standardCount = await this.mini1155.balanceOf(this.signers[i].address, c1.s.tokenId) + // console.log(`Minted Rare Token : ${rareCount}`) + if (standardCount.toNumber() >= exchangeRatio) { + // Exchange standard tokens for rare + await this.mini1155.connect(this.signers[i]).exchange() + // console.log(`Exchanged`) + } + } + console.log(`Total Standard Token after exchange : ${await this.mini1155.totalSupply(c1.s.tokenId)}`) + console.log(`Total Rare Token after exchange : ${await this.mini1155.totalSupply(c1.r.tokenId)}`) + + // Redeem the tokens for Collectibles (Owner) + // Withdraw Proceedes from the Sale using to the owner and the revenue account + let revenueAccount = await this.mini1155.revenueAccount() + contractBalance = await ethers.provider.getBalance(this.mini1155.address) + let ownerBalance = await ethers.provider.getBalance(owner) + let revenueBalance = await ethers.provider.getBalance(revenueAccount) + expect(contractBalance).to.be.above(ethers.utils.parseEther('1')) + expect(ownerBalance).to.be.above(ethers.utils.parseEther('9999')) + expect(revenueBalance).to.equal(ethers.utils.parseEther('0')) + await this.mini1155.withdraw(ethers.utils.parseEther('1'), true) + expect(await ethers.provider.getBalance(this.mini1155.address)).to.equal(contractBalance.sub(ethers.utils.parseEther('1'))) + expect(await ethers.provider.getBalance(owner)).to.be.below(ownerBalance) // we paid a little gas to withdraw + expect(await ethers.provider.getBalance(revenueAccount)).to.equal(ethers.utils.parseEther('1')) + await this.mini1155.withdraw(contractBalance.sub(ethers.utils.parseEther('1')), false) + expect(await ethers.provider.getBalance(this.mini1155.address)).to.equal(ethers.BigNumber.from(0)) + expect(await ethers.provider.getBalance(owner)).to.be.above(ownerBalance) // we withdrew the funds and paid a little gas to withdraw + expect(await ethers.provider.getBalance(revenueAccount)).to.equal(ethers.utils.parseEther('1')) + + // TODO Withrdraw Royalties (Owner) + + // ==== LAUNCH A NEW COLLECTION ==== + // Configure Collection2 (Owner) + await mini1155configure({ mini1155: this.mini1155, collectionConfig: c2 }) + + // Start Sale (Owner) + await this.mini1155.toggleSaleState() + contractBalance = await ethers.provider.getBalance(this.mini1155.address) + expect(contractBalance).to.equal(ethers.utils.parseEther('0')) + + // mint Tokens (Community) + for (let i = 1; i <= 77; i++) { + // console.log(`i: ${i}`) + // Mint 10 tokens + for (let j = 1; j <= 4; j++) { + await this.mini1155.connect(this.signers[i]).mint(j, { + value: c2.mintPrice.mul(j) + }) + } + } + console.log('Collection 2') + console.log(`Total Minted Standard Token : ${await this.mini1155.totalSupply(c2.s.tokenId)}`) + console.log(`Total Minted Rare Token : ${await this.mini1155.totalSupply(c2.r.tokenId)}`) + + // End the Sale and check token exists and mintAsOwner remaining Tokens + await this.mini1155.toggleSaleState() + expect(await this.mini1155.exists(c2.s.tokenId)).to.equal(true) + expect(await this.mini1155.exists(c2.s.tokenId)).to.equal(true) + remainingStandard = (await this.mini1155.maxSupply(c2.s.tokenId)).sub(await this.mini1155.totalSupply(c2.s.tokenId)) + remainingRare = (await this.mini1155.maxSupply(c2.r.tokenId)).sub(await this.mini1155.totalSupply(c2.r.tokenId)) + await this.mini1155.mintAsOwner(this.deployer.address, c2.s.tokenId, remainingStandard) + await this.mini1155.mintAsOwner(this.deployer.address, c2.r.tokenId, remainingRare) + expect(await this.mini1155.balanceOf(owner, c2.s.tokenId)).to.equal(remainingStandard) + expect(await this.mini1155.balanceOf(owner, c2.r.tokenId)).to.equal(remainingRare) + + // Exchange the Tokens (Community) + exchangeRatio = 20 + await this.mini1155.setExchangeRatio(exchangeRatio) + for (let i = 1; i <= 140; i++) { + // console.log(`Exchange i: ${i}`) + const standardCount = await this.mini1155.balanceOf(this.signers[i].address, c2.s.tokenId) + // console.log(`Minted Rare Token : ${rareCount}`) + if (standardCount.toNumber() >= exchangeRatio) { + // Exchange standard tokens for rare + await this.mini1155.connect(this.signers[i]).exchange() + // console.log(`Exchanged`) + } + } + console.log(`Total Standard Token after exchange : ${await this.mini1155.totalSupply(c2.s.tokenId)}`) + console.log(`Total Rare Token after exchange : ${await this.mini1155.totalSupply(c2.r.tokenId)}`) + + // Redeem the tokens for Collectibles (Owner) + // Withdraw Proceedes from the Sale using to the owner and the revenue account + revenueAccount = await this.mini1155.revenueAccount() + contractBalance = await ethers.provider.getBalance(this.mini1155.address) + ownerBalance = await ethers.provider.getBalance(owner) + revenueBalance = await ethers.provider.getBalance(revenueAccount) + expect(contractBalance).to.be.above(ethers.utils.parseEther('1')) + expect(ownerBalance).to.be.above(ethers.utils.parseEther('9999')) + expect(revenueBalance).to.equal(ethers.utils.parseEther('1')) // Revenue Transfer from Previous Collection + await this.mini1155.withdraw(ethers.utils.parseEther('1'), true) + expect(await ethers.provider.getBalance(this.mini1155.address)).to.equal(contractBalance.sub(ethers.utils.parseEther('1'))) + expect(await ethers.provider.getBalance(owner)).to.be.below(ownerBalance) // we paid a little gas to withdraw + expect(await ethers.provider.getBalance(revenueAccount)).to.equal(ethers.utils.parseEther('2')) + await this.mini1155.withdraw(contractBalance.sub(ethers.utils.parseEther('1')), false) + expect(await ethers.provider.getBalance(this.mini1155.address)).to.equal(ethers.BigNumber.from(0)) + expect(await ethers.provider.getBalance(owner)).to.be.above(ownerBalance) // we withdrew the funds and paid a little gas to withdraw + expect(await ethers.provider.getBalance(revenueAccount)).to.equal(ethers.utils.parseEther('2')) + + // TODO Withrdraw Royalties (Owner) + // Issue Non-sale Token (Owner) TokenId 5 with a quantity of 10 + const nonSaleTokenId = 5 + const nonSaleTokenQuantity = 10 + expect(await this.mini1155.exists(nonSaleTokenId)).to.equal(false) + await this.mini1155.mintAsOwner(this.deployer.address, nonSaleTokenId, nonSaleTokenQuantity) + expect(await this.mini1155.exists(nonSaleTokenId)).to.equal(true) + + // Pause Contract (Owner) + await this.mini1155.pause() + await this.mini1155.unpause() + + // Freeze Metadata (Owner) + await this.mini1155.freezeMetadata() + }) + }) +}) diff --git a/miniwallet/test/miniNFTs/Mini721.ts b/miniwallet/test/miniNFTs/Mini721.ts new file mode 100644 index 0000000..d73e183 --- /dev/null +++ b/miniwallet/test/miniNFTs/Mini721.ts @@ -0,0 +1,801 @@ +import { expect } from 'chai' +import { ethers, network } from 'hardhat' +import { ADDRESS_ZERO, prepare721, userMint721, communityMint721 } from '../utilities' +import { BigNumber } from 'ethers' +import Constants from '../utilities/constants' + +// let snapshotId: string; + +describe('Mini721', function () { + before(async function (this) { + await prepare721(this, []) + }) + + beforeEach(async function (this) { + this.snapshotId = await ethers.provider.send('evm_snapshot', []) + // console.log(`New Snapshot beforeEach: ${snapshotId}`); + this.mini721 = await this.Mini721.deploy( + false, // saleIsActive + false, // metadataFrozen + false, // provenanceFrozen + 10000, // maxMiniTokens + ethers.utils.parseEther('0.1'), // mintPrice 0.1 ETH + 10, // maxPerMint + '', // "ipfs://QmPcY4yVQu4J2z3ztHWziWkoUEugpzdfftbGH8xD49DvRx/", // baseUri + '' // "ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/contract.json" // _contractUri + ) + await this.mini721.deployed() + // console.log("Mini721 contract", this.mini721.address); + }) + + afterEach(async function (this) { + // console.log(`Reverting Snapshot : ${snapshotId}`); + await network.provider.send('evm_revert', [this.snapshotId]) + }) + // TODO + // NFT Build Process (Images, Metadata, Provenance Hash) + + // Deployment Tests + describe('validate Initial Deploy', function (this) { + it('Mini721 contract should be created', async function () { + await expect(this.mini721.address).to.be.properAddress + + // Public Variables + expect(await this.mini721.maxMiniTokens()).to.equal(10000) + expect(await this.mini721.mintPrice()).to.equal( + ethers.utils.parseEther('0.1') + ) // 0.1 ETH + expect(await this.mini721.maxPerMint()).to.equal(10) + expect(await this.mini721.startIndex()).to.equal(0) + expect(await this.mini721.provenanceHash()).to.equal('') + expect(await this.mini721.offsetValue()).to.equal(0) + expect(await this.mini721.metadataFrozen()).to.equal(false) + expect(await this.mini721.provenanceFrozen()).to.equal(false) + expect(await this.mini721.saleIsActive()).to.equal(false) + expect(await this.mini721.saleStarted()).to.equal(false) + expect(await this.mini721.temporaryTokenUri()).to.equal('') + + // Public Functions Mini721 + await expect(this.mini721.tokenURI(0)).to.be.revertedWith( + 'URIQueryForNonexistentToken()' + ) + expect(await this.mini721.supportsInterface(Constants.InterfaceId.ERC2981_NFT_ROYALTY_STANDARD)).to.equal(true) + expect(await this.mini721.exists(18)).to.equal(false) + expect(await this.mini721.contractURI()).to.equal('') + // Token should hold no eth initially + // Alices is the owner and there should be nothing to withdraw + await this.mini721.withdraw(ethers.utils.parseEther('0'), false) + expect(await this.mini721.tokensOfOwner(this.alice.address)).to.deep.equal( + [] + ) + + // Public Functions HRC721 + expect(await this.mini721.totalSupply()).to.equal(0) + expect(await this.mini721.name()).to.equal('MiniWallet NFT') + expect(await this.mini721.symbol()).to.equal('Mini721') + // Public Functions HRC721 (Tokens) + await expect(this.mini721.tokenByIndex(0)).to.be.revertedWith( + 'TokenIndexOutOfBounds()' + ) + await expect(this.mini721.ownerOf(0)).to.be.revertedWith( + 'OwnerQueryForNonexistentToken()' + ) + await expect(this.mini721.tokenURI(0)).to.be.revertedWith( + 'URIQueryForNonexistentToken()' + ) + // expect(await this.mini721.getApproved(0)).to.equal(""); + // Public Functions HRC721 (Users) + expect(await this.mini721.balanceOf(this.alice.address)).to.equal(0) + expect( + await this.mini721.isApprovedForAll(this.alice.address, this.bob.address) + ).to.equal(false) + // Public Functions HRC721 (User and Tokens) + await expect(this.mini721.tokenOfOwnerByIndex(this.alice.address, 0) + ).to.be.revertedWith('OwnerIndexOutOfBounds()') + + // Public Functions RoyaltiesV2 + expect(await this.mini721.getRaribleV2Royalties(0)).to.deep.equal([]) + }) + }) + + // Air Drop of 1000 Tokens using communityMint721 + describe('Mini721AirDropToOG', function (this) { + it('Minting 1000 Tokens for OG', async function () { + // Set the random start Index + await this.mini721.setTemporaryTokenUri( + 'ipfs://TemporaryTokenUriPlaceHolder/' + ) + await this.mini721.setStartIndex() + + // Mint 1000 tokens for airdrop to OG + let releaseCount + releaseCount = 100 + await communityMint721(this, this.alice.address, releaseCount) + releaseCount = 200 + await communityMint721(this, this.bob.address, releaseCount) + releaseCount = 1895 + await communityMint721(this, this.carol.address, releaseCount) + releaseCount = 5 + await communityMint721(this, this.dev.address, releaseCount) + await this.mini721.setOffsetValue(2200) + + // Public Variables + expect(await this.mini721.maxMiniTokens()).to.equal(10000) + expect(await this.mini721.mintPrice()).to.equal( + ethers.utils.parseEther('0.1') + ) // 0.1 ETH + expect(await this.mini721.maxPerMint()).to.equal(10) + expect(await this.mini721.provenanceHash()).to.equal('') + expect(await this.mini721.startIndex()).to.not.equal(0) + console.log(`startIndex: ${await this.mini721.startIndex()}`) + expect(await this.mini721.offsetValue()).to.equal(2200) + expect(await this.mini721.metadataFrozen()).to.equal(false) + expect(await this.mini721.provenanceFrozen()).to.equal(false) + expect(await this.mini721.saleIsActive()).to.equal(false) + expect(await this.mini721.saleStarted()).to.equal(false) + expect(await this.mini721.temporaryTokenUri()).to.equal( + 'ipfs://TemporaryTokenUriPlaceHolder/' + ) + + // Public Functions Mini721 + expect(await this.mini721.tokenURI(2198)).to.equal( + 'ipfs://TemporaryTokenUriPlaceHolder/' + ) + + // TODO review supportsInterface logic + expect(await this.mini721.supportsInterface(Constants.InterfaceId.ERC2981_NFT_ROYALTY_STANDARD)).to.equal(true) + expect(await this.mini721.exists(2198)).to.equal(true) + expect(await this.mini721.contractURI()).to.equal('') + // Token should hold no eth initially + // Alices is the owner and there should be nothing to withdraw + await this.mini721.withdraw(ethers.utils.parseEther('0'), false) + expect(await this.mini721.tokensOfOwner(this.dev.address)).to.deep.equal([ + BigNumber.from(2195), + BigNumber.from(2196), + BigNumber.from(2197), + BigNumber.from(2198), + BigNumber.from(2199) + ]) + + // Public Functions HRC721 + expect(await this.mini721.totalSupply()).to.equal(2200) + expect(await this.mini721.name()).to.equal('MiniWallet NFT') + expect(await this.mini721.symbol()).to.equal('Mini721') + + // Public Functions HRC721 (Tokens) + expect(await this.mini721.tokenByIndex(2198)).to.equal(2198) + expect(await this.mini721.ownerOf(2198)).to.equal(this.dev.address) + expect(await this.mini721.tokenURI(2198)).to.equal( + 'ipfs://TemporaryTokenUriPlaceHolder/' + ) + expect(await this.mini721.getApproved(2198)).to.equal(ADDRESS_ZERO) + // Public Functions HRC721 (Users) + expect(await this.mini721.balanceOf(this.dev.address)).to.equal(5) + expect( + await this.mini721.isApprovedForAll(this.alice.address, this.bob.address) + ).to.equal(false) + // Public Functions HRC721 (User and Tokens) + expect( + await this.mini721.tokenOfOwnerByIndex(this.dev.address, 3) + ).to.equal(2198) + + // Public Functions RoyaltiesV2 + expect(await this.mini721.getRaribleV2Royalties(0)).to.deep.equal([]) + }) + }) + + // User Mints (1,5,10) and negative use cases + describe('Mini721UserMint', function (this) { + it('Mini721 tokens should be minted by Users', async function () { + // do airdrop first + let releaseCount + releaseCount = 100 + await communityMint721(this, this.alice.address, releaseCount) + releaseCount = 200 + await communityMint721(this, this.bob.address, releaseCount) + releaseCount = 1895 + await communityMint721(this, this.carol.address, releaseCount) + releaseCount = 5 + await communityMint721(this, this.dev.address, releaseCount) + await this.mini721.setOffsetValue(2200) + // set state variables + await this.mini721.toggleSaleState() + // Set the random start Index + await this.mini721.setTemporaryTokenUri( + 'ipfs://TemporaryTokenUriPlaceHolder/' + ) + await this.mini721.setStartIndex() + expect(await this.mini721.saleIsActive()).to.equal(true) + expect(await this.mini721.totalSupply()).to.equal(2200) + expect(await this.mini721.exists(0)).to.equal(true) + // mint tokens + releaseCount = 1 + await userMint721(this, this.alice, releaseCount) + + expect(await this.mini721.totalSupply()).to.equal(2201) + releaseCount = 5 + await userMint721(this, this.bob, releaseCount) + + expect(await this.mini721.totalSupply()).to.equal(2206) + releaseCount = 10 + await userMint721(this, this.carol, releaseCount) + + releaseCount = 1 + expect(await this.mini721.totalSupply()).to.equal(2216) + expect(await this.mini721.maxMiniTokens()).to.equal(10000) + await userMint721(this, this.alice, releaseCount) + + // turn sale off and check user can no longer mint + await this.mini721.toggleSaleState() + expect(await this.mini721.saleIsActive()).to.equal(false) + await expect( + this.mini721.connect(this.alice).mintMini(releaseCount, { + value: ethers.utils.parseEther('0.1').mul(releaseCount) + }) + ).to.be.revertedWith('Mini721: Sale is not active') + + // Public Variables + expect(await this.mini721.maxMiniTokens()).to.equal(10000) + expect(await this.mini721.mintPrice()).to.equal( + ethers.utils.parseEther('0.1') + ) // 0.1 ETH + expect(await this.mini721.maxPerMint()).to.equal(10) + expect(await this.mini721.provenanceHash()).to.equal('') + expect(await this.mini721.startIndex()).to.not.equal(0) + console.log(`startIndex: ${await this.mini721.startIndex()}`) + expect(await this.mini721.offsetValue()).to.equal(2200) + expect(await this.mini721.metadataFrozen()).to.equal(false) + expect(await this.mini721.provenanceFrozen()).to.equal(false) + expect(await this.mini721.saleIsActive()).to.equal(false) + expect(await this.mini721.saleStarted()).to.equal(true) + expect(await this.mini721.temporaryTokenUri()).to.equal( + 'ipfs://TemporaryTokenUriPlaceHolder/' + ) + + // Public Functions Mini721 + expect(await this.mini721.tokenURI(12)).to.equal( + 'ipfs://TemporaryTokenUriPlaceHolder/' + ) + + // TODO review supportsInterface logic + expect(await this.mini721.supportsInterface(Constants.InterfaceId.ERC2981_NFT_ROYALTY_STANDARD)).to.equal(true) + expect(await this.mini721.exists(12)).to.equal(true) + expect(await this.mini721.contractURI()).to.equal('') + // Token should hold 1.7 ETH from the 17 mints + // Alice is the owner and there should be 1.7 ETH to withdraw + await expect( + this.mini721.withdraw(ethers.utils.parseEther('1.8'), false) + ).to.be.revertedWith('') + await this.mini721.withdraw(ethers.utils.parseEther('0.7'), false) + await this.mini721.setRevenueAccount(this.bob.address) + await this.mini721 + .connect(this.bob) + .withdraw(ethers.utils.parseEther('1.0'), true) + + // Public Functions HRC721 + expect(await this.mini721.totalSupply()).to.equal(2217) + expect(await this.mini721.name()).to.equal('MiniWallet NFT') + expect(await this.mini721.symbol()).to.equal('Mini721') + + // Public Functions HRC721 (Tokens) + expect(await this.mini721.tokenByIndex(2212)).to.equal(2212) + expect(await this.mini721.ownerOf(2212)).to.equal(this.carol.address) + expect(await this.mini721.tokenURI(2212)).to.equal( + 'ipfs://TemporaryTokenUriPlaceHolder/' + ) + expect(await this.mini721.getApproved(12)).to.equal(ADDRESS_ZERO) + // Public Functions HRC721 (Users) + expect(await this.mini721.balanceOf(this.carol.address)).to.equal(1905) + expect( + await this.mini721.isApprovedForAll( + this.alice.address, + this.carol.address + ) + ).to.equal(false) + // Public Functions HRC721 (User and Tokens) + expect( + await this.mini721.tokenOfOwnerByIndex(this.carol.address, 3) + ).to.equal(303) + + // Public Functions RoyaltiesV2 + expect(await this.mini721.getRaribleV2Royalties(0)).to.deep.equal([]) + }) + }) + + // Minting Negative Use Cases + describe('Mini721MintNegativeUseCases', function (this) { + it('Mini721 minting negative use Cases', async function () { + // do airdrop first + let releaseCount + releaseCount = 100 + await communityMint721(this, this.alice.address, releaseCount) + releaseCount = 200 + await communityMint721(this, this.bob.address, releaseCount) + releaseCount = 1895 + await communityMint721(this, this.carol.address, releaseCount) + releaseCount = 5 + await communityMint721(this, this.dev.address, releaseCount) + await this.mini721.setOffsetValue(2200) + await this.mini721.toggleSaleState() + // Test minting negative use cases + const mintPrice = await this.mini721.mintPrice() + const lowMintPrice = mintPrice.div(2) + const maxPerMint = await this.mini721.maxPerMint() + const highPerMint = maxPerMint.add(1) + const maxMiniTokens = await this.mini721.maxMiniTokens() + const highMiniTokens = maxMiniTokens.add(1) + // Test minting too many Mini tokens + await expect( + this.mini721.mintMini(highMiniTokens, { + value: mintPrice.mul(highMiniTokens) + }) + ).to.be.revertedWith('Mini721: Purchase would exceed cap') + // Test minting too many in a mint + await expect( + this.mini721.mintMini(highPerMint, { + value: mintPrice.mul(highPerMint) + }) + ).to.be.revertedWith('Mini721: Amount exceeds max per mint') + // Test mint with insufficient amount + await expect( + this.mini721.mintMini(1, { + value: lowMintPrice + }) + ).to.be.revertedWith('Mini721: Ether value sent is not correct') + // Test Mint with excess amount gets refunded + // mint 3 tokens parsing 1 eth + await this.mini721.connect(this.bob).mintMini(3, { + value: ethers.utils.parseEther('1') + }) + // bobs balance should be less 0.3 eth + gas + + // Test Mini Community minting negative use cases + releaseCount = 1 + // Test minting to many Mini tokens + await expect( + this.mini721.mintForCommunity(this.alice.address, highMiniTokens) + ).to.be.revertedWith('Mini721: Minting would exceed cap') + // Test minting to zero address + await expect( + this.mini721.mintForCommunity(ADDRESS_ZERO, releaseCount) + ).to.be.revertedWith('Mini721: Cannot mint to zero address.') + }) + }) + + // NFT Sale Closed + describe('Mini721CloseCollection', function (this) { + it('Mini721 Close Collection', async function () { + // set state variables + + // Collection closed is set at time of last token minted (i.e. 10,000th) + // Currently using Provenance Hash from Bored Apes https://ipfs.io/ipfs/Qme57kZ2VuVzcj5sC3tVHFgyyEgBTmAnyTK45YVNxKf6hi + // https://boredapeyachtclub.com/#/provenance + // https://medium.com/coinmonks/the-elegance-of-the-nft-provenance-hash-solution-823b39f99473 + + // Mint 2200 tokens for airdrop to OG + let releaseCount + releaseCount = 100 + await communityMint721(this, this.alice.address, releaseCount) + releaseCount = 200 + await communityMint721(this, this.bob.address, releaseCount) + releaseCount = 1895 + await communityMint721(this, this.carol.address, releaseCount) + releaseCount = 5 + await communityMint721(this, this.dev.address, releaseCount) + await this.mini721.setOffsetValue(2200) + + // Do User Minting + await this.mini721.toggleSaleState() + releaseCount = 1 + await userMint721(this, this.alice, releaseCount) + releaseCount = 5 + await userMint721(this, this.bob, releaseCount) + releaseCount = 10 + await userMint721(this, this.carol, releaseCount) + releaseCount = 1 + await userMint721(this, this.alice, releaseCount) + + // turn sale off and check user can no longer mint + await this.mini721.toggleSaleState() + + // setProvenenceHash() + await this.mini721.setProvenanceHash( + 'cc354b3fcacee8844dcc9861004da081f71df9567775b3f3a43412752752c0bf' + ) + + // setBaseUri (Metadata) + const baseUri = 'ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/' + await this.mini721.setBaseUri(baseUri) + + // setContractUri + await this.mini721.setContractUri( + 'ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/contract.json' + ) + + // Set Contract URI + expect(await this.mini721.provenanceHash()).to.equal( + 'cc354b3fcacee8844dcc9861004da081f71df9567775b3f3a43412752752c0bf' + ) + + // Removce the TemporaryTokenUri + await this.mini721.setTemporaryTokenUri('') + + // Set the random start Index + await this.mini721.setStartIndex() + + // freezeProvenance() + await this.mini721.freezeProvenance() + await expect(this.mini721.setProvenanceHash('badHash')).to.be.revertedWith( + 'Mini721: Provenance is frozen' + ) + expect(await this.mini721.provenanceHash()).to.equal( + 'cc354b3fcacee8844dcc9861004da081f71df9567775b3f3a43412752752c0bf' + ) + + // freezeMetaData() + await this.mini721.freezeMetadata() + await expect(this.mini721.setBaseUri('badURI')).to.be.revertedWith( + 'Mini721: Metadata is frozen' + ) + + // Public Variables + expect(await this.mini721.maxMiniTokens()).to.equal(10000) + expect(await this.mini721.mintPrice()).to.equal( + ethers.utils.parseEther('0.1') + ) // 0.1 ETH + expect(await this.mini721.maxPerMint()).to.equal(10) + expect(await this.mini721.provenanceHash()).to.equal( + 'cc354b3fcacee8844dcc9861004da081f71df9567775b3f3a43412752752c0bf' + ) + expect(await this.mini721.startIndex()).to.not.equal(0) + console.log(`startIndex: ${await this.mini721.startIndex()}`) + expect(await this.mini721.offsetValue()).to.equal(2200) + expect(await this.mini721.metadataFrozen()).to.equal(true) + expect(await this.mini721.provenanceFrozen()).to.equal(true) + expect(await this.mini721.saleIsActive()).to.equal(false) + expect(await this.mini721.saleStarted()).to.equal(true) + expect(await this.mini721.temporaryTokenUri()).to.equal('') + + // Public Functions Mini721 + const offsetValue = parseInt(await this.mini721.offsetValue()) + const startIndex = parseInt(await this.mini721.startIndex()) + const maxMiniTokens = parseInt(await this.mini721.maxMiniTokens()) + let tokenId = 12 + let tokenUriSuffix = tokenId + if (tokenId > offsetValue) { + tokenUriSuffix = + ((tokenId + startIndex - offsetValue) % (maxMiniTokens - offsetValue)) + + offsetValue + } + let tokenUri = baseUri + tokenUriSuffix + expect(await this.mini721.tokenURI(12)).to.equal(tokenUri) + console.log(`tokenURI[12]: ${tokenUri}`) + + // TODO review supportsInterface logic + expect(await this.mini721.supportsInterface(Constants.InterfaceId.ERC2981_NFT_ROYALTY_STANDARD)).to.equal(true) + expect(await this.mini721.exists(12)).to.equal(true) + expect(await this.mini721.contractURI()).to.equal( + 'ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/contract.json' + ) + // Token should hold 1.7 ETH from the 17 mints + expect(await ethers.provider.getBalance(this.mini721.address)).to.equal( + ethers.utils.parseEther('1.7') + ) + // Alice is the owner and there should be 1.7 ETH to withdraw + // expect(await ethers.provider.getBalance(this.alice.address)).to.equal( + // ethers.utils.parseEther("9999.784320346204536024") + // ); + await expect( + this.mini721.withdraw(ethers.utils.parseEther('1.8'), false) + ).to.be.revertedWith('') + await this.mini721.withdraw(ethers.utils.parseEther('1.7'), false) + // expect(await ethers.provider.getBalance(this.alice.address)).to.equal( + // ethers.utils.parseEther("10001.484254922290212431") + // ); + expect(await this.mini721.tokensOfOwner(this.dev.address)).to.deep.equal([ + BigNumber.from(2195), + BigNumber.from(2196), + BigNumber.from(2197), + BigNumber.from(2198), + BigNumber.from(2199) + ]) + + // Public Functions HRC721 + expect(await this.mini721.totalSupply()).to.equal(2217) + expect(await this.mini721.name()).to.equal('MiniWallet NFT') + expect(await this.mini721.symbol()).to.equal('Mini721') + + // Public Functions HRC721 (Tokens) + tokenId = 2212 + tokenUriSuffix = tokenId + if (tokenId > offsetValue) { + tokenUriSuffix = + ((tokenId + startIndex - offsetValue) % + (maxMiniTokens - offsetValue)) + + offsetValue + } + tokenUri = baseUri + tokenUriSuffix + expect(await this.mini721.tokenByIndex(tokenId)).to.equal(tokenId) + expect(await this.mini721.ownerOf(tokenId)).to.equal(this.carol.address) + expect(await this.mini721.tokenURI(tokenId)).to.equal(tokenUri) + console.log(`tokenURI[2212]: ${tokenUri}`) + expect(await this.mini721.getApproved(tokenId)).to.equal(ADDRESS_ZERO) + // Public Functions HRC721 (Users) + expect(await this.mini721.balanceOf(this.carol.address)).to.equal(1905) + expect( + await this.mini721.isApprovedForAll( + this.alice.address, + this.carol.address + ) + ).to.equal(false) + // Public Functions HRC721 (User and Tokens) + expect( + await this.mini721.tokenOfOwnerByIndex(this.carol.address, 3) + ).to.equal(303) + + // Public Functions RoyaltiesV2 + expect(await this.mini721.getRaribleV2Royalties(0)).to.deep.equal([]) + }) + }) + + // NFT (Transfer Ownership and Approval Testing + describe('Mini721TransferOwnership', function (this) { + it('Mini721 Transfer Ownership', async function () { + // Mint 2200 tokens for airdrop to OG + let releaseCount + releaseCount = 100 + await communityMint721(this, this.alice.address, releaseCount) + releaseCount = 200 + await communityMint721(this, this.bob.address, releaseCount) + releaseCount = 1895 + await communityMint721(this, this.carol.address, releaseCount) + releaseCount = 5 + await communityMint721(this, this.dev.address, releaseCount) + await this.mini721.setOffsetValue(2200) + // Do User Minting + await this.mini721.toggleSaleState() + releaseCount = 1 + await userMint721(this, this.alice, releaseCount) + releaseCount = 5 + await userMint721(this, this.bob, releaseCount) + releaseCount = 10 + await userMint721(this, this.carol, releaseCount) + releaseCount = 1 + await userMint721(this, this.alice, releaseCount) + // Airdrop + releaseCount = 20 + await communityMint721(this, this.bob.address, releaseCount) + // setProvenenceHash() + await this.mini721.setProvenanceHash( + 'cc354b3fcacee8844dcc9861004da081f71df9567775b3f3a43412752752c0bf' + ) + // setBaseUri (Metadata) + await this.mini721.setBaseUri( + 'ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/' + ) + // Transfer from Carol to Bob and back + expect(await this.mini721.ownerOf(2209)).to.equal(this.carol.address) + expect(await this.mini721.getApproved(2209)).to.equal(ADDRESS_ZERO) + await this.mini721 + .connect(this.carol) + .transferFrom(this.carol.address, this.bob.address, 2209) + expect(await this.mini721.ownerOf(2209)).to.equal(this.bob.address) + await this.mini721 + .connect(this.bob) + .transferFrom(this.bob.address, this.carol.address, 2209) + expect(await this.mini721.ownerOf(2209)).to.equal(this.carol.address) + + // Carol gives approval to Bob and he transfers the token + await this.mini721.connect(this.carol).approve(this.bob.address, 2209) + expect(await this.mini721.getApproved(2209)).to.equal(this.bob.address) + expect(await this.mini721.ownerOf(2209)).to.equal(this.carol.address) + await this.mini721 + .connect(this.bob) + .transferFrom(this.carol.address, this.bob.address, 2209) + expect(await this.mini721.ownerOf(2209)).to.equal(this.bob.address) + expect(await this.mini721.getApproved(2209)).to.equal(ADDRESS_ZERO) + await this.mini721.connect(this.bob).approve(this.carol.address, 2209) + expect(await this.mini721.ownerOf(2209)).to.equal(this.bob.address) + expect(await this.mini721.getApproved(2209)).to.equal(this.carol.address) + await this.mini721 + .connect(this.carol) + .transferFrom(this.bob.address, this.carol.address, 2209) + expect(await this.mini721.ownerOf(2209)).to.equal(this.carol.address) + expect(await this.mini721.getApproved(2209)).to.equal(ADDRESS_ZERO) + + // Carol gives approval to Bob for all tokens and he does the transfer + await this.mini721 + .connect(this.carol) + .setApprovalForAll(this.bob.address, true) + expect(await this.mini721.getApproved(2209)).to.equal(ADDRESS_ZERO) + expect(await this.mini721.ownerOf(2209)).to.equal(this.carol.address) + expect( + await this.mini721.isApprovedForAll(this.carol.address, this.bob.address) + ).to.equal(true) + await this.mini721 + .connect(this.bob) + .transferFrom(this.carol.address, this.bob.address, 2209) + expect(await this.mini721.ownerOf(2209)).to.equal(this.bob.address) + expect(await this.mini721.getApproved(2209)).to.equal(ADDRESS_ZERO) + expect( + await this.mini721.isApprovedForAll(this.carol.address, this.bob.address) + ).to.equal(true) + await this.mini721 + .connect(this.bob) + .setApprovalForAll(this.carol.address, true) + expect(await this.mini721.ownerOf(2209)).to.equal(this.bob.address) + expect(await this.mini721.getApproved(2209)).to.equal(ADDRESS_ZERO) + expect( + await this.mini721.isApprovedForAll(this.bob.address, this.carol.address) + ).to.equal(true) + await this.mini721 + .connect(this.carol) + .transferFrom(this.bob.address, this.carol.address, 2209) + expect(await this.mini721.ownerOf(2209)).to.equal(this.carol.address) + expect(await this.mini721.getApproved(2209)).to.equal(ADDRESS_ZERO) + expect( + await this.mini721.isApprovedForAll(this.bob.address, this.carol.address) + ).to.equal(true) + }) + }) + + // NFT Updating of Metadata Testing + describe('Mini721UpdateMetadataOfIndividualTokens', function (this) { + it('Mini721 Update Metadata Of Individual Tokens', async function () { + // setOffsetValue(13) + // Mint 2200 tokens for airdrop to OG + let releaseCount + releaseCount = 100 + await communityMint721(this, this.alice.address, releaseCount) + releaseCount = 200 + await communityMint721(this, this.bob.address, releaseCount) + releaseCount = 1895 + await communityMint721(this, this.carol.address, releaseCount) + releaseCount = 5 + await communityMint721(this, this.dev.address, releaseCount) + await this.mini721.setOffsetValue(2200) + // do user and community mint testing + await this.mini721.setOffsetValue(2200) + await this.mini721.toggleSaleState() + releaseCount = 1 + await userMint721(this, this.alice, releaseCount) + releaseCount = 5 + await userMint721(this, this.bob, releaseCount) + + // Set the random start Index + await this.mini721.setStartIndex() + expect(await this.mini721.startIndex()).to.not.equal(0) + console.log(`startIndex: ${await this.mini721.startIndex()}`) + // setBaseUri (Metadata) + const baseUri = 'ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/' + await this.mini721.setBaseUri(baseUri) + + // Check the token + const offsetValue = parseInt(await this.mini721.offsetValue()) + const startIndex = parseInt(await this.mini721.startIndex()) + const maxMiniTokens = parseInt(await this.mini721.maxMiniTokens()) + const tokenId = 3 + let tokenUriSuffix = tokenId + if (tokenId > offsetValue) { + tokenUriSuffix = + ((tokenId + startIndex - offsetValue) % + (maxMiniTokens - offsetValue)) + + offsetValue + } + const tokenUri = baseUri + tokenUriSuffix + expect(await this.mini721.tokenURI(tokenId)).to.equal(tokenUri) + + // Update the tokens metadata + expect(await this.mini721.metadataFrozen()).to.equal(false) + const updatedBaseUri = 'ipfs://bestupdateduri/' + const updatedTokenUri = updatedBaseUri + tokenUriSuffix + await this.mini721.setUri(3, updatedTokenUri) + expect(await this.mini721.tokenURI(tokenId)).to.equal(updatedTokenUri) + // Freeze metadata and then Updating the tokens metadata should fail + await this.mini721.freezeMetadata() + expect(await this.mini721.metadataFrozen()).to.equal(true) + await expect( + this.mini721.setUri(tokenId, updatedTokenUri) + ).to.be.revertedWith('') + }) + }) + + // NFT Burning Testing + describe('Mini721Burn', function (this) { + it('Mini721 Test Burning of Tokens', async function () { + // Mint 2200 tokens for airdrop to OG + let releaseCount + releaseCount = 100 + await communityMint721(this, this.alice.address, releaseCount) + releaseCount = 200 + await communityMint721(this, this.bob.address, releaseCount) + releaseCount = 1895 + await communityMint721(this, this.carol.address, releaseCount) + releaseCount = 5 + await communityMint721(this, this.dev.address, releaseCount) + await this.mini721.setOffsetValue(2200) + // Do User Minting + await this.mini721.toggleSaleState() + releaseCount = 1 + await userMint721(this, this.alice, releaseCount) + releaseCount = 5 + await userMint721(this, this.bob, releaseCount) + releaseCount = 10 + await userMint721(this, this.carol, releaseCount) + releaseCount = 1 + await userMint721(this, this.alice, releaseCount) + // Airdrop + releaseCount = 20 + await communityMint721(this, this.bob.address, releaseCount) + // setProvenenceHash() + await this.mini721.setProvenanceHash( + 'cc354b3fcacee8844dcc9861004da081f71df9567775b3f3a43412752752c0bf' + ) + // setBaseUri (Metadata) + await this.mini721.setBaseUri( + 'ipfs://Qmf8WkAVZtkBwngG4mTrPk23vDd6z8dZW2UshV9ywWGyB9/' + ) + + // Check current State + expect(await this.mini721.totalSupply()).to.equal(2237) + expect(await this.mini721.ownerOf(2209)).to.equal(this.carol.address) + expect(await this.mini721.balanceOf(this.carol.address)).to.equal(1905) + expect( + await this.mini721.tokenOfOwnerByIndex(this.carol.address, 3) + ).to.equal(303) + // Burn a token + await this.mini721.burn(9) + // Check current State + expect(await this.mini721.totalSupply()).to.equal(2236) + expect(await this.mini721.balanceOf(this.carol.address)).to.equal(1905) + expect( + await this.mini721.tokenOfOwnerByIndex(this.carol.address, 3) + ).to.equal(303) + + // Burn some tokens + await this.mini721.batchBurn([7, 12, 14]) + // Check current State + expect(await this.mini721.totalSupply()).to.equal(2233) + // await expect(this.mini721.ownerOf(2212)).to.be.revertedWith( + // "OwnerQueryForNonexistentToken()" + // ); + expect(await this.mini721.balanceOf(this.carol.address)).to.equal(1905) + expect( + await this.mini721.tokenOfOwnerByIndex(this.carol.address, 3) + ).to.equal(303) + }) + }) + + // NFT (Transfer Ownership) + describe('Mini721NFTTransferOwnership', function (this) { + it('Mini721 tokens should be transferred by users', async function () { + // Mint 2200 tokens for airdrop to OG + let releaseCount + releaseCount = 100 + await communityMint721(this, this.alice.address, releaseCount) + releaseCount = 200 + await communityMint721(this, this.bob.address, releaseCount) + releaseCount = 1895 + await communityMint721(this, this.carol.address, releaseCount) + releaseCount = 5 + await communityMint721(this, this.dev.address, releaseCount) + await this.mini721.setOffsetValue(2200) + await this.mini721.toggleSaleState() + releaseCount = 10 + await userMint721(this, this.bob, releaseCount) + expect(await this.mini721.ownerOf(2201)).to.equal(this.bob.address) + await this.mini721 + .connect(this.bob) + ['safeTransferFrom(address,address,uint256)']( + this.bob.address, + this.carol.address, + 2201 + ) + expect(await this.mini721.ownerOf(2201)).to.equal(this.carol.address) + await this.mini721 + .connect(this.carol) + .transferFrom(this.carol.address, this.alice.address, 2201) + expect(await this.mini721.ownerOf(1)).to.equal(this.alice.address) + }) + }) +}) diff --git a/miniwallet/test/miniWallet/admin.ts b/miniwallet/test/miniWallet/admin.ts new file mode 100644 index 0000000..a5eb835 --- /dev/null +++ b/miniwallet/test/miniWallet/admin.ts @@ -0,0 +1,249 @@ +import { expect } from 'chai' +import { ethers, waffle } from 'hardhat' +import { + prepare, + deployUpgradeable +} from '../utilities' +import config from '../../config/miniWallet' +const OPERATOR_ROLE = ethers.utils.id('OPERATOR_ROLE') +const DEFAULT_ADMIN_ROLE = '0x0000000000000000000000000000000000000000000000000000000000000000' + +// let snapshotId: string; + +describe('MiniWallet Admin', function () { + before(async function () { + await prepare(this, [ + 'MiniWallet', + 'TestERC20', + 'TestERC721', + 'TestERC1155' + ]) + }) + + beforeEach(async function () { + this.snapshotId = await waffle.provider.send('evm_snapshot', []) + await deployUpgradeable(this, [ + [ + 'miniWallet', + this.MiniWallet, + [ + config.miniWallet.initialOperatorThreshold, + config.miniWallet.initialOperators, + config.miniWallet.initialUserLimit, + config.miniWallet.initialAuthLimit + ] + ] + ]) + }) + + afterEach(async function () { + await waffle.provider.send('evm_revert', [this.snapshotId]) + }) + + describe('Administrator: role view functions', function () { + it('MW-DEFAULT_ADMIN_ROLE-0: check the administrator role', async function () { + expect(await this.miniWallet.DEFAULT_ADMIN_ROLE()).to.equal(DEFAULT_ADMIN_ROLE) + }) + it('MW-OPERATOR_ROLE-0: check the operator role', async function () { + expect(await this.miniWallet.OPERATOR_ROLE()).to.equal(OPERATOR_ROLE) + }) + it('MW-getRoleAdmin-0: check Roleadmin role for OPERATOR_ROLE and DEFAULT_ADMIN_ROLE', async function () { + expect(await this.miniWallet.getRoleAdmin(DEFAULT_ADMIN_ROLE)).to.equal(DEFAULT_ADMIN_ROLE) + expect(await this.miniWallet.getRoleAdmin(OPERATOR_ROLE)).to.equal(DEFAULT_ADMIN_ROLE) + }) + it('MW-getRoleMemberCount-0: check the administator and operator count', async function () { + expect(await this.miniWallet.getRoleMemberCount(DEFAULT_ADMIN_ROLE)).to.equal(1) + expect(await this.miniWallet.getRoleMemberCount(OPERATOR_ROLE)).to.equal(3) + }) + it('MW-getRoleMember-0: check the administrator is deployer and operators are correct', async function () { + expect(await this.miniWallet.getRoleMember(DEFAULT_ADMIN_ROLE, 0)).to.equal(this.deployer.address) + const operatorCount = await this.miniWallet.getRoleMemberCount(OPERATOR_ROLE) + for (let i = 0; i < operatorCount; ++i) { + expect(await this.miniWallet.getRoleMember(OPERATOR_ROLE, i)).to.equal(config.miniWallet.initialOperators[i]) + } + }) + }) + + describe('Administrator: admin role management using standard functions', function () { + it('MW-grantRole-0: change administrator', async function () { + await expect(this.miniWallet.grantRole(DEFAULT_ADMIN_ROLE, this.operatorA.address)) + .to.emit(this.miniWallet, 'RoleGranted') + .withArgs(DEFAULT_ADMIN_ROLE, this.operatorA.address, this.deployer.address) + expect(await this.miniWallet.getRoleMemberCount(DEFAULT_ADMIN_ROLE)).to.equal(2) + await expect(await this.miniWallet.revokeRole(DEFAULT_ADMIN_ROLE, this.deployer.address)) + .to.emit(this.miniWallet, 'RoleRevoked') + .withArgs(DEFAULT_ADMIN_ROLE, this.deployer.address, this.deployer.address) + expect(await this.miniWallet.getRoleMemberCount(DEFAULT_ADMIN_ROLE)).to.equal(1) + expect(await this.miniWallet.getRoleMember(DEFAULT_ADMIN_ROLE, 0)).to.equal(this.operatorA.address) + }) + it('MW-revokeRole-0: revoke operator', async function () { + await expect(await this.miniWallet.revokeRole(OPERATOR_ROLE, this.operatorC.address)) + .to.emit(this.miniWallet, 'RoleRevoked') + .withArgs(OPERATOR_ROLE, this.operatorC.address, this.deployer.address) + expect(await this.miniWallet.getRoleMemberCount(OPERATOR_ROLE)).to.equal(2) + expect(await this.miniWallet.getRoleMember(OPERATOR_ROLE, 0)).to.equal(this.operatorA.address) + expect(await this.miniWallet.getRoleMember(OPERATOR_ROLE, 1)).to.equal(this.operatorB.address) + await expect(this.miniWallet.grantRole(OPERATOR_ROLE, this.operatorC.address)) + .to.emit(this.miniWallet, 'RoleGranted') + .withArgs(OPERATOR_ROLE, this.operatorC.address, this.deployer.address) + expect(await this.miniWallet.getRoleMemberCount(OPERATOR_ROLE)).to.equal(3) + const operatorCount = await this.miniWallet.getRoleMemberCount(OPERATOR_ROLE) + for (let i = 0; i < operatorCount; ++i) { + expect(await this.miniWallet.getRoleMember(OPERATOR_ROLE, i)).to.equal(config.miniWallet.initialOperators[i]) + } + }) + it('MW-revokeRole-1: revert if attempting to revoke operator from non admin account', async function () { + await expect(this.miniWallet.connect(this.operatorA).revokeRole(OPERATOR_ROLE, this.operatorC.address)) + .to.be.revertedWith('AccessControl: account 0x70997970c51812dc3a010c7d01b50e0d17dc79c8 is missing role 0x0000000000000000000000000000000000000000000000000000000000000000') + }) + }) + + describe('Administrator: changing Administrator using renounceAdmin', function () { + it('MW-renounceAdmin-0: admin change administrator', async function () { + const tx = await this.miniWallet.renounceAdmin(this.operatorA.address) + await expect(tx) + .to.emit(this.miniWallet, 'RoleGranted') + .withArgs(DEFAULT_ADMIN_ROLE, this.operatorA.address, this.deployer.address) + .to.emit(this.miniWallet, 'RoleRevoked') + .withArgs(DEFAULT_ADMIN_ROLE, this.deployer.address, this.deployer.address) + }) + it('MW-renounceAdmin-1: admin cannot renounce self', async function () { + await expect(this.miniWallet.renounceAdmin(this.deployer.address)).to.be.revertedWith('cannot renounce self') + }) + it('MW-renounceAdmin-2: renounceAdmin reverts if called by non admin', async function () { + await expect(this.miniWallet.connect(this.operatorA).renounceAdmin(this.operatorC.address)) + .to.be.revertedWith('sender doesn\'t have admin role') + }) + }) + + describe('Administrator: admin role management using admin functions', function () { + it('MW-adminRemoveOperators-0: remove operator', async function () { + await expect(await this.miniWallet.adminRemoveOperators([this.operatorA.address, this.operatorC.address])) + .to.emit(this.miniWallet, 'OperatorsRemoved') + .withArgs([this.operatorA.address, this.operatorC.address]) + expect(await this.miniWallet.getRoleMemberCount(OPERATOR_ROLE)).to.equal(1) + expect(await this.miniWallet.getRoleMember(OPERATOR_ROLE, 0)).to.equal(this.operatorB.address) + }) + it('MW-adminRemoveOperators-1: remove operator revert if when removing non-operator', async function () { + await expect(this.miniWallet.adminRemoveOperators([this.ernie.address])) + .to.be.revertedWith('removing non-operator') + }) + it('MW-adminRemoveOperators-2: remove operator reverts if called by non admin', async function () { + await expect(this.miniWallet.connect(this.operatorA).adminRemoveOperators([this.operatorC.address])) + .to.be.revertedWith('sender doesn\'t have admin role') + }) + it('MW-adminAddOperators-0: add operator', async function () { + await expect(await this.miniWallet.adminRemoveOperators([this.operatorA.address, this.operatorC.address])) + .to.emit(this.miniWallet, 'OperatorsRemoved') + .withArgs([this.operatorA.address, this.operatorC.address]) + await expect(await this.miniWallet.adminAddOperators([this.operatorA.address, this.operatorC.address])) + .to.emit(this.miniWallet, 'OperatorsAdded') + .withArgs([this.operatorA.address, this.operatorC.address]) + const operatorCount = await this.miniWallet.getRoleMemberCount(OPERATOR_ROLE) + expect(operatorCount).to.equal(3) + expect(await this.miniWallet.getRoleMember(OPERATOR_ROLE, 0)).to.equal(this.operatorB.address) + expect(await this.miniWallet.getRoleMember(OPERATOR_ROLE, 1)).to.equal(this.operatorA.address) + expect(await this.miniWallet.getRoleMember(OPERATOR_ROLE, 2)).to.equal(this.operatorC.address) + }) + it('MW-adminAddOperators-1: add operator revert if already and operator', async function () { + await expect(this.miniWallet.adminAddOperators([this.operatorB.address])) + .to.be.revertedWith('already has operator role') + }) + it('MW-adminAddOperators-2: add operator reverts if called by non admin', async function () { + await expect(this.miniWallet.connect(this.operatorA).adminAddOperators([this.operatorC.address])) + .to.be.revertedWith('sender doesn\'t have admin role') + }) + }) + + describe('Administrator: OperatorThreshold management', function () { + it('MW-operatorThreshold-0: check the operatorThreshold', async function () { + expect((await this.miniWallet.operatorThreshold()).toString()).to.equal((config.miniWallet.initialOperatorThreshold)) + }) + it('MW-getRoleMemberCount-1: check operator count', async function () { + expect(await this.miniWallet.getRoleMemberCount(OPERATOR_ROLE)).to.equal(3) + }) + it('MW-getRoleMember-1: check the administrator is deployer and operators are correct', async function () { + const operatorCount = await this.miniWallet.getRoleMemberCount(OPERATOR_ROLE) + for (let i = 0; i < operatorCount; ++i) { + expect(await this.miniWallet.getRoleMember(OPERATOR_ROLE, i)).to.equal(config.miniWallet.initialOperators[i]) + } + }) + it('MW-adminChangeOperatorThreshold-0: update OperatorThreshold', async function () { + await expect(await this.miniWallet.adminChangeOperatorThreshold(20)) + .to.emit(this.miniWallet, 'OperatorThresholdChanged') + .withArgs(20) + expect(await this.miniWallet.operatorThreshold()).to.equal(20) + }) + it('MW-adminChangeOperatorThreshold-1: update OperatorThreshold fails if called by non Admin', async function () { + await expect(this.miniWallet.connect(this.operatorA).adminChangeOperatorThreshold(10000)) + .to.be.revertedWith('sender doesn\'t have admin role') + }) + }) + describe('Administrator: user limit management', function () { + it('MW-globalUserLimit-0: check the globalUserLimit', async function () { + expect(await this.miniWallet.globalUserLimit()).to.equal(config.miniWallet.initialUserLimit) + }) + it('MW-adminChangeGlobalUserLimit-0: update globalUserLimit', async function () { + await expect(await this.miniWallet.adminChangeGlobalUserLimit(10000)) + .to.emit(this.miniWallet, 'GlobalUserLimitChanged') + .withArgs(10000) + expect(await this.miniWallet.globalUserLimit()).to.equal(10000) + }) + it('MW-adminChangeGlobalUserLimit-1: update globalUserLimit fails if called by non Admin', async function () { + await expect(this.miniWallet.connect(this.operatorA).adminChangeGlobalUserLimit(10000)) + .to.be.revertedWith('sender doesn\'t have admin role') + }) + }) + + describe('Administrator: user auth limit management', function () { + it('MW-globalUserAuthLimit-0: check the globalUserAuthLimit', async function () { + expect(await this.miniWallet.globalUserAuthLimit()).to.equal(config.miniWallet.initialAuthLimit) + }) + it('MW-adminChangeGlobalUserAuthLimit-0: update globalUserAuthLimit', async function () { + await expect(await this.miniWallet.adminChangeGlobalUserAuthLimit(1000)) + .to.emit(this.miniWallet, 'GlobalUserAuthLimitChanged') + .withArgs(1000) + expect(await this.miniWallet.globalUserAuthLimit()).to.equal(1000) + }) + it('MW-adminChangeGlobalUserAuthLimit-1: update globalUserAuthLimit fails if called by non Admin', async function () { + await expect(this.miniWallet.connect(this.operatorA).adminChangeGlobalUserAuthLimit(1000)) + .to.be.revertedWith('sender doesn\'t have admin role') + }) + }) + + describe('Administrator: pause functionality', function () { + it('MW-paused-0: check the if contract is paused', async function () { + expect(await this.miniWallet.paused()).to.equal(false) + }) + it('MW-adminPauseMiniWallet-0: pause miniWallet', async function () { + await expect(await this.miniWallet.adminPauseMiniWallet()) + .to.emit(this.miniWallet, 'Paused') + .withArgs(this.deployer.address) + expect(await this.miniWallet.paused()).to.equal(true) + }) + it('MW-adminPauseMiniWallet-1: pause miniWallet fails if already paused', async function () { + await this.miniWallet.adminPauseMiniWallet() + await expect(this.miniWallet.adminPauseMiniWallet()) + .to.be.revertedWith('Pausable: paused') + }) + it('MW-adminPauseMiniWallet-2: adminPauseMiniWallet fails if called by non Admin', async function () { + await expect(this.miniWallet.connect(this.operatorA).adminPauseMiniWallet()) + .to.be.revertedWith('sender doesn\'t have admin role') + }) + it('MW-adminUnpauseMiniWallet-0: unpause miniWallet', async function () { + await this.miniWallet.adminPauseMiniWallet() + await expect(await this.miniWallet.adminUnpauseMiniWallet()) + .to.emit(this.miniWallet, 'Unpaused') + .withArgs(this.deployer.address) + expect(await this.miniWallet.paused()).to.equal(false) + }) + it('MW-adminUnpauseMiniWallet-1: unpause miniWallet fails if not paused', async function () { + await expect(this.miniWallet.adminUnpauseMiniWallet()) + .to.be.revertedWith('Pausable: not paused') + }) + it('MW-adminUnpauseMiniWallet-2: adminUnpauseMiniWallet fails if called by non Admin', async function () { + await expect(this.miniWallet.connect(this.operatorA).adminUnpauseMiniWallet()) + .to.be.revertedWith('sender doesn\'t have admin role') + }) + }) +}) diff --git a/miniwallet/test/miniWallet/approve.ts b/miniwallet/test/miniWallet/approve.ts new file mode 100644 index 0000000..60ea3d0 --- /dev/null +++ b/miniwallet/test/miniWallet/approve.ts @@ -0,0 +1,137 @@ +import { expect } from 'chai' +import { ethers, waffle } from 'hardhat' +import { + prepare, + deployUpgradeable, + checkBalance, + getTxCost +} from '../utilities' +import config from '../../config/miniWallet' + +const ZERO_ETH = ethers.utils.parseEther('0') +const ONE_ETH = ethers.utils.parseEther('1') + +describe('MiniWallet', function () { + before(async function () { + await prepare(this, [ + 'MiniWallet', + 'TestERC20', + 'TestERC721', + 'TestERC1155' + ]) + }) + + beforeEach(async function () { + this.snapshotId = await waffle.provider.send('evm_snapshot', []) + await deployUpgradeable(this, [ + [ + 'miniWallet', + this.MiniWallet, + [ + config.miniWallet.initialOperatorThreshold, + config.miniWallet.initialOperators, + config.miniWallet.initialUserLimit, + config.miniWallet.initialAuthLimit + ] + ] + ]) + }) + + afterEach(async function () { + await waffle.provider.send('evm_revert', [this.snapshotId]) + }) + + describe('approve: check approval functionality', function () { + it('MW-approve-0: Positive approval test', async function () { + const provider = waffle.provider + + // check Initial Balance + await checkBalance(this.alice, '10000') + let aliceBalance = await this.alice.getBalance() + const bobBalance = await this.bob.getBalance() + const miniWalletBalance = await provider.getBalance( + this.miniWallet.address + ) + + const tx = await this.miniWallet + .connect(this.alice) + .approve(this.bob.address, ONE_ETH) + const gasUsed = await getTxCost(tx.hash) + // Calculate and check new balances + aliceBalance = aliceBalance.sub(gasUsed) + await expect(await this.alice.getBalance()).to.equal(aliceBalance) + await expect(await this.bob.getBalance()).to.equal(bobBalance) + await expect( + await provider.getBalance(this.miniWallet.address) + ).to.equal(miniWalletBalance) + // Check events emitted + await expect(tx) + .to.emit(this.miniWallet, 'Approval') + .withArgs(this.alice.address, this.bob.address, ONE_ETH) + await tx.wait() + // Check Alice's Balance and Auth on MiniWallet + await expect( + await this.miniWallet.userBalances(this.alice.address) + ).to.equal(ZERO_ETH) + expect( + await this.miniWallet.allowance(this.alice.address, this.bob.address) + ).to.equal(ONE_ETH) + }) + }) + + describe('approve: check approve with deposit functionality', function () { + it('MW-approve-1: Positive deposit test', async function () { + const provider = waffle.provider + + // check Initial Balance + await checkBalance(this.alice, '10000') + let aliceBalance = await this.alice.getBalance() + const bobBalance = await this.bob.getBalance() + let miniWalletBalance = await provider.getBalance( + this.miniWallet.address + ) + const tx = await this.miniWallet + .connect(this.alice) + .approve(this.bob.address, ONE_ETH, { + value: ONE_ETH + }) + await tx.wait() + const gasUsed = await getTxCost(tx.hash) + // Calculate and check new balances + aliceBalance = aliceBalance.sub(ONE_ETH).sub(gasUsed) + miniWalletBalance = miniWalletBalance.add(ONE_ETH) + await expect(await this.alice.getBalance()).to.equal(aliceBalance) + await expect(await this.bob.getBalance()).to.equal(bobBalance) + await expect( + await provider.getBalance(this.miniWallet.address) + ).to.equal(miniWalletBalance) + // Check events emitted + await expect(tx) + .to.emit(this.miniWallet, 'DepositSuccessful') + .withArgs(this.alice.address, ONE_ETH, ONE_ETH) + // Check Alice's Balance and Auth on MiniWallet + await expect( + await this.miniWallet.userBalances(this.alice.address) + ).to.equal(ONE_ETH) + expect( + await this.miniWallet.allowance(this.alice.address, this.bob.address) + ).to.equal(ONE_ETH) + }) + + it('MW-approve-2: Negative approve test deposit amount greater global user limit', async function () { + await checkBalance(this.alice, '10000') + const aliceBalance = await this.alice.getBalance() + const depositAmount = config.miniWallet.initialUserLimit.add(ONE_ETH) + await expect( + this.miniWallet + .connect(this.alice) + .approve(this.bob.address, ONE_ETH, { + value: depositAmount + }) + ).to.be.reverted + // Check that alice did not lose her funds when the transaction was reverted (note she did pay gas fees) + const aliceNewBalance = await this.alice.getBalance() + expect(aliceNewBalance).to.be.gt(aliceBalance.sub(depositAmount)) + }) + }) +}) diff --git a/miniwallet/test/deposit.ts b/miniwallet/test/miniWallet/deposit.ts similarity index 59% rename from miniwallet/test/deposit.ts rename to miniwallet/test/miniWallet/deposit.ts index b87eb7c..7794387 100644 --- a/miniwallet/test/deposit.ts +++ b/miniwallet/test/miniWallet/deposit.ts @@ -5,16 +5,16 @@ import { deployUpgradeable, checkBalance, getTxCost -} from './utilities' -import config from '../src/config' +} from '../utilities' +import config from '../../config/miniWallet' const ZERO_ETH = ethers.utils.parseEther('0') const ONE_ETH = ethers.utils.parseEther('1') -describe('AssetManager', function () { +describe('MiniWallet', function () { before(async function () { await prepare(this, [ - 'AssetManager' + 'MiniWallet' ]) }) @@ -22,13 +22,13 @@ describe('AssetManager', function () { this.snapshotId = await waffle.provider.send('evm_snapshot', []) await deployUpgradeable(this, [ [ - 'assetManager', - this.AssetManager, + 'miniWallet', + this.MiniWallet, [ - config.test.initialOperatorThreshold, - config.test.initialOperators, - config.test.initialUserLimit, - config.test.initialAuthLimit + config.miniWallet.initialOperatorThreshold, + config.miniWallet.initialOperators, + config.miniWallet.initialUserLimit, + config.miniWallet.initialAuthLimit ] ] ]) @@ -39,48 +39,48 @@ describe('AssetManager', function () { }) describe('deposit: check deposit functionality', function () { - it('AM-deposit-0: Positive deposit test', async function () { + it('MW-deposit-0: Positive deposit test', async function () { const provider = waffle.provider // check Initial Balance await checkBalance(this.alice, '10000') let aliceBalance = await this.alice.getBalance() const bobBalance = await this.bob.getBalance() - let assetManagerBalance = await provider.getBalance( - this.assetManager.address + let miniWalletBalance = await provider.getBalance( + this.miniWallet.address ) - const tx = await this.assetManager.connect(this.alice).deposit({ + const tx = await this.miniWallet.connect(this.alice).deposit({ value: ONE_ETH }) await tx.wait() const gasUsed = await getTxCost(tx.hash) // Calculate and check new balances aliceBalance = aliceBalance.sub(ONE_ETH).sub(gasUsed) - assetManagerBalance = assetManagerBalance.add(ONE_ETH) + miniWalletBalance = miniWalletBalance.add(ONE_ETH) await expect(await this.alice.getBalance()).to.equal(aliceBalance) await expect(await this.bob.getBalance()).to.equal(bobBalance) await expect( - await provider.getBalance(this.assetManager.address) - ).to.equal(assetManagerBalance) + await provider.getBalance(this.miniWallet.address) + ).to.equal(miniWalletBalance) // Check events emitted await expect(tx) - .to.emit(this.assetManager, 'DepositSuccessful') + .to.emit(this.miniWallet, 'DepositSuccessful') .withArgs(this.alice.address, ONE_ETH, ONE_ETH) - // Check Alice's Balance and Auth on AssetManager + // Check Alice's Balance and Auth on MiniWallet await expect( - await this.assetManager.userBalances(this.alice.address) + await this.miniWallet.userBalances(this.alice.address) ).to.equal(ONE_ETH) expect( - await this.assetManager.allowance(this.alice.address, this.bob.address) + await this.miniWallet.allowance(this.alice.address, this.bob.address) ).to.equal(ZERO_ETH) }) - it('AM-deposit-1: Negative deposit test amount greater global user limit', async function () { + it('MW-deposit-1: Negative deposit test amount greater global user limit', async function () { await checkBalance(this.alice, '10000') const aliceBalance = await this.alice.getBalance() - const depositAmount = config.test.initialUserLimit.add(ONE_ETH) + const depositAmount = config.miniWallet.initialUserLimit.add(ONE_ETH) await expect( - this.assetManager.connect(this.alice).deposit({ + this.miniWallet.connect(this.alice).deposit({ value: depositAmount }) ).to.be.reverted @@ -89,14 +89,14 @@ describe('AssetManager', function () { expect(aliceNewBalance).to.be.gt(aliceBalance.sub(depositAmount)) }) - it('AM-deposit-2: Negative deposit test amount two deposits greater global user limit', async function () { - let tx = await this.assetManager.connect(this.alice).deposit({ + it('MW-deposit-2: Negative deposit test amount two deposits greater global user limit', async function () { + let tx = await this.miniWallet.connect(this.alice).deposit({ value: ONE_ETH }) await tx.wait() await expect( - (tx = this.assetManager.connect(this.alice).deposit({ - value: config.test.initialUserLimit + (tx = this.miniWallet.connect(this.alice).deposit({ + value: config.miniWallet.initialUserLimit })) ).to.be.reverted }) diff --git a/miniwallet/test/extra.ts b/miniwallet/test/miniWallet/extra.ts similarity index 63% rename from miniwallet/test/extra.ts rename to miniwallet/test/miniWallet/extra.ts index 7c09780..32fecce 100644 --- a/miniwallet/test/extra.ts +++ b/miniwallet/test/miniWallet/extra.ts @@ -5,17 +5,17 @@ import { deployUpgradeable, checkBalance, getTxCost -} from './utilities' -import config from '../src/config' +} from '../utilities' +import config from '../../config/miniWallet' const ZERO_ETH = ethers.utils.parseEther('0') const ONE_ETH = ethers.utils.parseEther('1') const INITIAL_BALANCE_ETH = ethers.utils.parseEther('10000') -describe('AssetManager', function () { +describe('MiniWallet', function () { before(async function () { await prepare(this, [ - 'AssetManager', + 'MiniWallet', 'TestERC20', 'TestERC721', 'TestERC1155' @@ -26,13 +26,13 @@ describe('AssetManager', function () { this.snapshotId = await waffle.provider.send('evm_snapshot', []) await deployUpgradeable(this, [ [ - 'assetManager', - this.AssetManager, + 'miniWallet', + this.MiniWallet, [ - config.test.initialOperatorThreshold, - config.test.initialOperators, - config.test.initialUserLimit, - config.test.initialAuthLimit + config.miniWallet.initialOperatorThreshold, + config.miniWallet.initialOperators, + config.miniWallet.initialUserLimit, + config.miniWallet.initialAuthLimit ] ] ]) @@ -42,7 +42,7 @@ describe('AssetManager', function () { await waffle.provider.send('evm_revert', [this.snapshotId]) }) - describe('extra: Additional AssetManager tests', function () { + describe('extra: Additional MiniWallet tests', function () { it('Positive walk-through, deposit, withdraw, approve, send', async function () { const provider = waffle.provider @@ -50,42 +50,42 @@ describe('AssetManager', function () { await checkBalance(this.alice, '10000') let aliceBalance = await this.alice.getBalance() let bobBalance = await this.bob.getBalance() - let assetManagerBalance = await provider.getBalance( - this.assetManager.address + let miniWalletBalance = await provider.getBalance( + this.miniWallet.address ) expect(aliceBalance).to.equal(INITIAL_BALANCE_ETH) expect(bobBalance).to.equal(INITIAL_BALANCE_ETH) - expect(assetManagerBalance).to.equal(ZERO_ETH) + expect(miniWalletBalance).to.equal(ZERO_ETH) // ===== DEPOSIT POSITIVE TEST ===== // Alice Deposit one native token - let tx = await this.assetManager.connect(this.alice).deposit({ + let tx = await this.miniWallet.connect(this.alice).deposit({ value: ONE_ETH }) let gasUsed = await getTxCost(tx.hash) // Calculate and check new balances aliceBalance = aliceBalance.sub(ONE_ETH).sub(gasUsed) - assetManagerBalance = assetManagerBalance.add(ONE_ETH) + miniWalletBalance = miniWalletBalance.add(ONE_ETH) await expect(await this.alice.getBalance()).to.equal(aliceBalance) await expect(await this.bob.getBalance()).to.equal(bobBalance) await expect( - await provider.getBalance(this.assetManager.address) - ).to.equal(assetManagerBalance) + await provider.getBalance(this.miniWallet.address) + ).to.equal(miniWalletBalance) // Check events emitted await expect(tx) - .to.emit(this.assetManager, 'DepositSuccessful') + .to.emit(this.miniWallet, 'DepositSuccessful') .withArgs(this.alice.address, ONE_ETH, ONE_ETH) - // Check Alice's Balance and Auth on AssetManager + // Check Alice's Balance and Auth on MiniWallet await expect( - await this.assetManager.userBalances(this.alice.address) + await this.miniWallet.userBalances(this.alice.address) ).to.equal(ONE_ETH) expect( - await this.assetManager.allowance(this.alice.address, this.bob.address) + await this.miniWallet.allowance(this.alice.address, this.bob.address) ).to.equal(ZERO_ETH) // ==== APPROVAL POSITIVE TEST ==== // Alice approves one native token - tx = await this.assetManager + tx = await this.miniWallet .connect(this.alice) .approve(this.bob.address, ONE_ETH) gasUsed = await getTxCost(tx.hash) @@ -94,76 +94,76 @@ describe('AssetManager', function () { await expect(await this.alice.getBalance()).to.equal(aliceBalance) await expect(await this.bob.getBalance()).to.equal(bobBalance) await expect( - await provider.getBalance(this.assetManager.address) - ).to.equal(assetManagerBalance) + await provider.getBalance(this.miniWallet.address) + ).to.equal(miniWalletBalance) // Check events emitted await expect(tx) - .to.emit(this.assetManager, 'Approval') + .to.emit(this.miniWallet, 'Approval') .withArgs(this.alice.address, this.bob.address, ONE_ETH) // Log all receipts - // Check Alice's Balance and Auth on AssetManager + // Check Alice's Balance and Auth on MiniWallet await expect( - await this.assetManager.userBalances(this.alice.address) + await this.miniWallet.userBalances(this.alice.address) ).to.equal(ONE_ETH) expect( - await this.assetManager.allowance(this.alice.address, this.bob.address) + await this.miniWallet.allowance(this.alice.address, this.bob.address) ).to.equal(ONE_ETH) // ==== WITHDRAWAL POSITIVE TEST ==== // Alice Withdraws all her native tokens - tx = await this.assetManager.connect(this.alice).withdraw(0) + tx = await this.miniWallet.connect(this.alice).withdraw(0) gasUsed = await getTxCost(tx.hash) // Calculate and check new balances aliceBalance = aliceBalance.add(ONE_ETH).sub(gasUsed) - assetManagerBalance = assetManagerBalance.sub(ONE_ETH) + miniWalletBalance = miniWalletBalance.sub(ONE_ETH) await expect(await this.alice.getBalance()).to.equal(aliceBalance) await expect(await this.bob.getBalance()).to.equal(bobBalance) await expect( - await provider.getBalance(this.assetManager.address) - ).to.equal(assetManagerBalance) + await provider.getBalance(this.miniWallet.address) + ).to.equal(miniWalletBalance) // Check events emitted await expect(tx) - .to.emit(this.assetManager, 'WithdrawalSuccessful') + .to.emit(this.miniWallet, 'WithdrawalSuccessful') .withArgs(this.alice.address, ONE_ETH, ZERO_ETH) - // Check Alice's Balance and Auth on AssetManager + // Check Alice's Balance and Auth on MiniWallet await expect( - await this.assetManager.userBalances(this.alice.address) + await this.miniWallet.userBalances(this.alice.address) ).to.equal(ZERO_ETH) expect( - await this.assetManager.allowance(this.alice.address, this.bob.address) + await this.miniWallet.allowance(this.alice.address, this.bob.address) ).to.equal(ONE_ETH) // ==== DEPOSIT, approve AND SEND POSITIVE TEST ==== // Alice deposits and approves one token which the operator sends to Bob - tx = await this.assetManager.connect(this.alice).deposit({ + tx = await this.miniWallet.connect(this.alice).deposit({ value: ONE_ETH }) await tx.wait() gasUsed = await getTxCost(tx.hash) aliceBalance = aliceBalance.sub(ONE_ETH).sub(gasUsed) - assetManagerBalance = assetManagerBalance.add(ONE_ETH) - tx = await this.assetManager + miniWalletBalance = miniWalletBalance.add(ONE_ETH) + tx = await this.miniWallet .connect(this.alice) .approve(this.bob.address, ONE_ETH) await tx.wait() gasUsed = await getTxCost(tx.hash) aliceBalance = aliceBalance.sub(gasUsed) - tx = await this.assetManager + tx = await this.miniWallet .connect(this.operatorA) .send(ONE_ETH, this.alice.address, this.bob.address) await tx.wait() gasUsed = await getTxCost(tx.hash) // Calculate and check new balances bobBalance = bobBalance.add(ONE_ETH) - assetManagerBalance = assetManagerBalance.sub(ONE_ETH) + miniWalletBalance = miniWalletBalance.sub(ONE_ETH) await expect(await this.alice.getBalance()).to.equal(aliceBalance) await expect(await this.bob.getBalance()).to.equal(bobBalance) await expect( - await provider.getBalance(this.assetManager.address) - ).to.equal(assetManagerBalance) + await provider.getBalance(this.miniWallet.address) + ).to.equal(miniWalletBalance) // Check events emitted await expect(tx) - .to.emit(this.assetManager, 'SendSuccessful') + .to.emit(this.miniWallet, 'SendSuccessful') .withArgs( this.alice.address, this.bob.address, @@ -171,17 +171,17 @@ describe('AssetManager', function () { ZERO_ETH, ZERO_ETH ) - // Check Alice's Balance and Auth on AssetManager + // Check Alice's Balance and Auth on MiniWallet await expect( - await this.assetManager.userBalances(this.alice.address) + await this.miniWallet.userBalances(this.alice.address) ).to.equal(ZERO_ETH) expect( - await this.assetManager.allowance(this.alice.address, this.bob.address) + await this.miniWallet.allowance(this.alice.address, this.bob.address) ).to.equal(ZERO_ETH) }) // it('checkEventLogs', async function () { - // const tx = await this.assetManager.connect(this.alice).deposit({ + // const tx = await this.miniWallet.connect(this.alice).deposit({ // value: ONE_ETH // }) // const receipt = await tx.wait() diff --git a/miniwallet/test/send.ts b/miniwallet/test/miniWallet/send.ts similarity index 65% rename from miniwallet/test/send.ts rename to miniwallet/test/miniWallet/send.ts index e24f439..e3989e1 100644 --- a/miniwallet/test/send.ts +++ b/miniwallet/test/miniWallet/send.ts @@ -5,16 +5,16 @@ import { deployUpgradeable, checkBalance, getTxCost -} from './utilities' -import config from '../src/config' +} from '../utilities' +import config from '../../config/miniWallet' const ZERO_ETH = ethers.utils.parseEther('0') const ONE_ETH = ethers.utils.parseEther('1') -describe('AssetManager', function () { +describe('MiniWallet', function () { before(async function () { await prepare(this, [ - 'AssetManager' + 'MiniWallet' ]) }) @@ -22,13 +22,13 @@ describe('AssetManager', function () { this.snapshotId = await waffle.provider.send('evm_snapshot', []) await deployUpgradeable(this, [ [ - 'assetManager', - this.AssetManager, + 'miniWallet', + this.MiniWallet, [ - config.test.initialOperatorThreshold, - config.test.initialOperators, - config.test.initialUserLimit, - config.test.initialAuthLimit + config.miniWallet.initialOperatorThreshold, + config.miniWallet.initialOperators, + config.miniWallet.initialUserLimit, + config.miniWallet.initialAuthLimit ] ] ]) @@ -39,26 +39,26 @@ describe('AssetManager', function () { }) describe('send: check send functionality', function () { - it('AM-send-0: Positive send test', async function () { + it('MW-send-0: Positive send test', async function () { const provider = waffle.provider // check Initial Balance await checkBalance(this.alice, '10000') let aliceBalance = await this.alice.getBalance() let bobBalance = await this.bob.getBalance() - let assetManagerBalance = await provider.getBalance( - this.assetManager.address + let miniWalletBalance = await provider.getBalance( + this.miniWallet.address ) // Alice Deposit one native token - let tx = await this.assetManager.connect(this.alice).deposit({ + let tx = await this.miniWallet.connect(this.alice).deposit({ value: ONE_ETH }) let gasUsed = await getTxCost(tx.hash) // Calculate and check new balances aliceBalance = aliceBalance.sub(ONE_ETH).sub(gasUsed) - assetManagerBalance = assetManagerBalance.add(ONE_ETH) + miniWalletBalance = miniWalletBalance.add(ONE_ETH) // Alice approves one native token - tx = await this.assetManager + tx = await this.miniWallet .connect(this.alice) .approve(this.bob.address, ONE_ETH) gasUsed = await getTxCost(tx.hash) @@ -66,22 +66,22 @@ describe('AssetManager', function () { aliceBalance = aliceBalance.sub(gasUsed) // The operator sends to Bob - tx = await this.assetManager + tx = await this.miniWallet .connect(this.operatorA) .send(ONE_ETH, this.alice.address, this.bob.address) await tx.wait() gasUsed = await getTxCost(tx.hash) // Calculate and check new balances bobBalance = bobBalance.add(ONE_ETH) - assetManagerBalance = assetManagerBalance.sub(ONE_ETH) + miniWalletBalance = miniWalletBalance.sub(ONE_ETH) await expect(await this.alice.getBalance()).to.equal(aliceBalance) await expect(await this.bob.getBalance()).to.equal(bobBalance) await expect( - await provider.getBalance(this.assetManager.address) - ).to.equal(assetManagerBalance) + await provider.getBalance(this.miniWallet.address) + ).to.equal(miniWalletBalance) // Check events emitted await expect(tx) - .to.emit(this.assetManager, 'SendSuccessful') + .to.emit(this.miniWallet, 'SendSuccessful') .withArgs( this.alice.address, this.bob.address, @@ -90,12 +90,12 @@ describe('AssetManager', function () { ZERO_ETH ) await tx.wait() - // Check Alices Balance and Auth on AssetManager + // Check Alices Balance and Auth on MiniWallet await expect( - await this.assetManager.userBalances(this.alice.address) + await this.miniWallet.userBalances(this.alice.address) ).to.equal(ZERO_ETH) expect( - await this.assetManager.allowance(this.alice.address, this.bob.address) + await this.miniWallet.allowance(this.alice.address, this.bob.address) ).to.equal(ZERO_ETH) }) }) diff --git a/miniwallet/test/transfer.ts b/miniwallet/test/miniWallet/transfer.ts similarity index 78% rename from miniwallet/test/transfer.ts rename to miniwallet/test/miniWallet/transfer.ts index 3a7d7da..9f2f260 100644 --- a/miniwallet/test/transfer.ts +++ b/miniwallet/test/miniWallet/transfer.ts @@ -5,21 +5,21 @@ import { deploy, deployUpgradeable, getBigNumber -} from './utilities' +} from '../utilities' import { range } from 'lodash' -import config from '../src/config' import { BigNumber } from 'ethers' -import Constants from './utilities/constants' +import config from '../../config/miniWallet' +import Constants from '../utilities/constants' const DUMMY_HEX = '0x' // let snapshotId: string; -describe('AssetManager', function () { +describe('MiniWallet', function () { before(async function () { await prepare(this, [ - 'AssetManager', + 'MiniWallet', 'TestERC20', 'TestERC721', 'TestERC1155' @@ -30,13 +30,13 @@ describe('AssetManager', function () { this.snapshotId = await waffle.provider.send('evm_snapshot', []) await deployUpgradeable(this, [ [ - 'assetManager', - this.AssetManager, + 'miniWallet', + this.MiniWallet, [ - config.test.initialOperatorThreshold, - config.test.initialOperators, - config.test.initialUserLimit, - config.test.initialAuthLimit + config.miniWallet.initialOperatorThreshold, + config.miniWallet.initialOperators, + config.miniWallet.initialUserLimit, + config.miniWallet.initialAuthLimit ] ] ]) @@ -47,22 +47,22 @@ describe('AssetManager', function () { }) describe('transfer: check transfer functionality ', function () { - it('AM-transfer-0: positive test of ERC20 transfer', async function () { + it('MW-transfer-0: positive test of ERC20 transfer', async function () { await deploy(this, [['erc20', this.TestERC20, [getBigNumber('10000000')]]]) // transfer 100 M20 to alice let tx = await this.erc20.transfer(this.alice.address, BigNumber.from('100')) expect(await this.erc20.balanceOf(this.alice.address)).to.equal(100) // alice approves 70 to Asset Manager - tx = await this.erc20.connect(this.alice).increaseAllowance(this.assetManager.address, BigNumber.from('70')) + tx = await this.erc20.connect(this.alice).increaseAllowance(this.miniWallet.address, BigNumber.from('70')) await tx.wait() - expect(await this.erc20.allowance(this.alice.address, this.assetManager.address)).to.equal(70) + expect(await this.erc20.allowance(this.alice.address, this.miniWallet.address)).to.equal(70) tx = await this.erc20.connect(this.alice).transfer(this.bob.address, BigNumber.from('3')) await tx.wait() expect(await this.erc20.balanceOf(this.alice.address)).to.equal(97) - expect(await this.erc20.allowance(this.alice.address, this.assetManager.address)).to.equal(70) + expect(await this.erc20.allowance(this.alice.address, this.miniWallet.address)).to.equal(70) // Operator transfers 3 of token 0 to Bob - tx = await this.assetManager.connect(this.operatorA) + tx = await this.miniWallet.connect(this.operatorA) .transfer( BigNumber.from('3'), Constants.TokenType.ERC20, @@ -74,10 +74,10 @@ describe('AssetManager', function () { await tx.wait() // check alice's and bob's balances expect(await this.erc20.balanceOf(this.alice.address)).to.equal(94) - expect(await this.erc20.allowance(this.alice.address, this.assetManager.address)).to.equal(67) + expect(await this.erc20.allowance(this.alice.address, this.miniWallet.address)).to.equal(67) }) - it('AM-transfer-1: positive test of ERC721 transfer', async function () { + it('MW-transfer-1: positive test of ERC721 transfer', async function () { // Deploy 721 await deploy(this, [['erc721', this.TestERC721, [range(10), range(10).map((e: any) => `ipfs://test721/${e}`)]]]) // Transfer some Tokens for Alice @@ -88,11 +88,11 @@ describe('AssetManager', function () { tx = await this.erc721.transferFrom(this.deployer.address, this.alice.address, 2) await tx.wait() expect(await this.erc721.balanceOf(this.alice.address)).to.equal(3) - // Alice Approves the AssetManager for the Token - tx = await this.erc721.connect(this.alice).approve(this.assetManager.address, 0) + // Alice Approves the MiniWallet for the Token + tx = await this.erc721.connect(this.alice).approve(this.miniWallet.address, 0) await tx.wait() // Operator transfers the tokens for Alice to Bob - tx = await this.assetManager.connect(this.operatorA) + tx = await this.miniWallet.connect(this.operatorA) .transfer( BigNumber.from('1'), Constants.TokenType.ERC721, @@ -106,7 +106,7 @@ describe('AssetManager', function () { expect(await this.erc721.balanceOf(this.bob.address)).to.equal(1) }) - it('AM-transfer-2: positive test of ERC1155 transfer', async function () { + it('MW-transfer-2: positive test of ERC1155 transfer', async function () { // Deploy 1155 await deploy(this, [['erc1155', this.TestERC1155, [ range(10), @@ -121,11 +121,11 @@ describe('AssetManager', function () { tx = await this.erc1155.safeTransferFrom(this.deployer.address, this.alice.address, 2, 7, DUMMY_HEX) await tx.wait() expect(await this.erc1155.balanceOf(this.alice.address, 0)).to.equal(7) - // Alice approves the AssetManager for the Token - tx = await this.erc1155.connect(this.alice).setApprovalForAll(this.assetManager.address, true) + // Alice approves the MiniWallet for the Token + tx = await this.erc1155.connect(this.alice).setApprovalForAll(this.miniWallet.address, true) await tx.wait() // Operator transfers the tokens for Alice to Bob - tx = await this.assetManager.connect(this.operatorA).transfer( + tx = await this.miniWallet.connect(this.operatorA).transfer( BigNumber.from('3'), Constants.TokenType.ERC1155, 0, diff --git a/miniwallet/test/withdraw.ts b/miniwallet/test/miniWallet/withdraw.ts similarity index 59% rename from miniwallet/test/withdraw.ts rename to miniwallet/test/miniWallet/withdraw.ts index 0450267..32d228d 100644 --- a/miniwallet/test/withdraw.ts +++ b/miniwallet/test/miniWallet/withdraw.ts @@ -5,16 +5,16 @@ import { deployUpgradeable, checkBalance, getTxCost -} from './utilities' -import config from '../src/config' +} from '../utilities' +import config from '../../config/miniWallet' const ZERO_ETH = ethers.utils.parseEther('0') const ONE_ETH = ethers.utils.parseEther('1') -describe('AssetManager', function () { +describe('MiniWallet', function () { before(async function () { await prepare(this, [ - 'AssetManager' + 'MiniWallet' ]) }) @@ -22,13 +22,13 @@ describe('AssetManager', function () { this.snapshotId = await waffle.provider.send('evm_snapshot', []) await deployUpgradeable(this, [ [ - 'assetManager', - this.AssetManager, + 'miniWallet', + this.MiniWallet, [ - config.test.initialOperatorThreshold, - config.test.initialOperators, - config.test.initialUserLimit, - config.test.initialAuthLimit + config.miniWallet.initialOperatorThreshold, + config.miniWallet.initialOperators, + config.miniWallet.initialUserLimit, + config.miniWallet.initialAuthLimit ] ] ]) @@ -39,41 +39,41 @@ describe('AssetManager', function () { }) describe('withdraw: check withdraw functionality', function () { - it('AM-withdraw-0: Positive withdrawal test', async function () { + it('MW-withdraw-0: Positive withdrawal test', async function () { const provider = waffle.provider // check Initial Balance await checkBalance(this.alice, '10000') let aliceBalance = await this.alice.getBalance() - let assetManagerBalance = await provider.getBalance( - this.assetManager.address + let miniWalletBalance = await provider.getBalance( + this.miniWallet.address ) - let tx = await this.assetManager.connect(this.alice).deposit({ + let tx = await this.miniWallet.connect(this.alice).deposit({ value: ONE_ETH }) await tx.wait() let gasUsed = await getTxCost(tx.hash) // Calculate and check new balances aliceBalance = aliceBalance.sub(ONE_ETH).sub(gasUsed) - assetManagerBalance = assetManagerBalance.add(ONE_ETH) - tx = await this.assetManager.connect(this.alice).withdraw(0) + miniWalletBalance = miniWalletBalance.add(ONE_ETH) + tx = await this.miniWallet.connect(this.alice).withdraw(0) gasUsed = await getTxCost(tx.hash) // Calculate and check new balances aliceBalance = aliceBalance.add(ONE_ETH).sub(gasUsed) - assetManagerBalance = assetManagerBalance.sub(ONE_ETH) + miniWalletBalance = miniWalletBalance.sub(ONE_ETH) await expect(await this.alice.getBalance()).to.equal(aliceBalance) await expect( - await provider.getBalance(this.assetManager.address) - ).to.equal(assetManagerBalance) + await provider.getBalance(this.miniWallet.address) + ).to.equal(miniWalletBalance) // Check events emitted await expect(tx) - .to.emit(this.assetManager, 'WithdrawalSuccessful') + .to.emit(this.miniWallet, 'WithdrawalSuccessful') .withArgs(this.alice.address, ONE_ETH, ZERO_ETH) // Log all receipts await tx.wait() - // Check Alices Balance and Auth on AssetManager + // Check Alices Balance and Auth on MiniWallet await expect( - await this.assetManager.userBalances(this.alice.address) + await this.miniWallet.userBalances(this.alice.address) ).to.equal(ZERO_ETH) }) }) diff --git a/miniwallet/test/utilities/Mini1155Util.ts b/miniwallet/test/utilities/Mini1155Util.ts new file mode 100644 index 0000000..a34c464 --- /dev/null +++ b/miniwallet/test/utilities/Mini1155Util.ts @@ -0,0 +1,47 @@ +import config from '../../config/miniNFTs' + +export async function mini1155configure ({ + mini1155, + collectionConfig = config.mini1155.collection1 +}) { + // set the revenue account + await mini1155.setRevenueAccount(collectionConfig.revenueAccount) + // configure standard Token + await mini1155.setStandardTokenId(collectionConfig.s.tokenId) + await mini1155.setMaxSupply(collectionConfig.s.tokenId, collectionConfig.s.maxSupply) + await mini1155.setMaxPersonalCap(collectionConfig.s.tokenId, collectionConfig.s.personalCap) + // configure rare Token + await mini1155.setRareTokenId(collectionConfig.r.tokenId) + await mini1155.setMaxSupply(collectionConfig.r.tokenId, collectionConfig.r.maxSupply) + await mini1155.setMaxPersonalCap(collectionConfig.r.tokenId, collectionConfig.r.personalCap) + await mini1155.setRareProbabilityPercentage(collectionConfig.rareProbabilityPercentage) + // configure exchange rate + await mini1155.setExchangeRatio(collectionConfig.exchangeRatio) +} + +export async function mini1155Mint (mini1155, minter, numTokens) { + return await mini1155 + .connect(minter)['mint(uint256)'](numTokens) +} + +export async function mini1155OwnerMint (mini1155, minter, tokenId, numTokens) { + return await mini1155.connect(minter)['mint(address,uint256,uint256,bytes)'](minter, tokenId, numTokens, '0x') +} + +export async function mini1155SafeTransferFrom ( + mini1155, + sender, + receiver, + tokenId, + numTokens +) { + return await mini1155 + .connect(sender) + .safeTransferFrom( + sender.address, + receiver.address, + tokenId, + numTokens, + '0x' + ) +} diff --git a/miniwallet/test/utilities/Mini721Util.ts b/miniwallet/test/utilities/Mini721Util.ts new file mode 100644 index 0000000..2cda301 --- /dev/null +++ b/miniwallet/test/utilities/Mini721Util.ts @@ -0,0 +1,39 @@ +import { ethers } from 'hardhat' + +export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000' + +export function encodeParameters (types, values) { + const abi = new ethers.utils.AbiCoder() + return abi.encode(types, values) +}; + +export async function prepare721 (testEnvironment, contracts) { + for (const i in contracts) { + const contract = contracts[i] + testEnvironment[contract] = await ethers.getContractFactory(contract) + } + testEnvironment.signers = await ethers.getSigners() + testEnvironment.alice = testEnvironment.signers[0] + testEnvironment.bob = testEnvironment.signers[1] + testEnvironment.carol = testEnvironment.signers[2] + testEnvironment.dev = testEnvironment.signers[3] + testEnvironment.Mini721 = await ethers.getContractFactory('Mini721') +} + +export async function deploy721 (testEnvironment, contracts) { + for (const contract of contracts) { + testEnvironment[contract[0]] = await contract[1].deploy(...(contract[2] || [])) + await testEnvironment[contract[0]].deployed() + } +} + +export async function userMint721 (testEnvironment, minter, numTokens) { + const mintPrice = await testEnvironment.mini721.mintPrice() + return await testEnvironment.mini721.connect(minter).mintMini(numTokens, { + value: mintPrice.mul(numTokens) + }) +} + +export async function communityMint721 (testEnvironment, owner, numTokens) { + return await testEnvironment.mini721.mintForCommunity(owner, numTokens) +} diff --git a/miniwallet/test/utilities/constants.ts b/miniwallet/test/utilities/constants.ts index 53bc0fb..9dac158 100644 --- a/miniwallet/test/utilities/constants.ts +++ b/miniwallet/test/utilities/constants.ts @@ -8,5 +8,8 @@ export default { ERC721: 1, ERC1155: 2, NONE: 3 + }, + InterfaceId: { + ERC2981_NFT_ROYALTY_STANDARD: '0x2a55205a' } } diff --git a/miniwallet/test/utilities/index.ts b/miniwallet/test/utilities/index.ts index 69820f6..daf6827 100644 --- a/miniwallet/test/utilities/index.ts +++ b/miniwallet/test/utilities/index.ts @@ -3,25 +3,24 @@ import { expect } from 'chai' import { MockProvider } from 'ethereum-waffle' import { Contract, BigNumber } from 'ethers' import { ethers } from 'hardhat' -import Mocha from 'mocha' export const BASE_TEN = 10 -export async function prepare (thisObject: Mocha.Context, contracts: string[]) { +export async function prepare (testEnvironment, contracts) { for (const i in contracts) { const contract = contracts[i] - thisObject[contract] = await ethers.getContractFactory(contract) + testEnvironment[contract] = await ethers.getContractFactory(contract) } - thisObject.signers = await ethers.getSigners() - thisObject.deployer = thisObject.signers[0] - thisObject.operatorA = thisObject.signers[1] - thisObject.operatorB = thisObject.signers[2] - thisObject.operatorC = thisObject.signers[3] - thisObject.alice = thisObject.signers[4] - thisObject.bob = thisObject.signers[5] - thisObject.carol = thisObject.signers[6] - thisObject.dora = thisObject.signers[7] - thisObject.ernie = thisObject.signers[8] + testEnvironment.signers = await ethers.getSigners() + testEnvironment.deployer = testEnvironment.signers[0] + testEnvironment.operatorA = testEnvironment.signers[1] + testEnvironment.operatorB = testEnvironment.signers[2] + testEnvironment.operatorC = testEnvironment.signers[3] + testEnvironment.alice = testEnvironment.signers[4] + testEnvironment.bob = testEnvironment.signers[5] + testEnvironment.carol = testEnvironment.signers[6] + testEnvironment.dora = testEnvironment.signers[7] + testEnvironment.ernie = testEnvironment.signers[8] } export async function deploy (context, contracts) { @@ -31,11 +30,11 @@ export async function deploy (context, contracts) { } } -export async function deployUpgradeable (thisObject, contracts) { +export async function deployUpgradeable (testEnvironment, contracts) { for (const contract of contracts) { - thisObject[contract[0]] = await contract[1].deploy() - await thisObject[contract[0]].deployed() - const tx = await thisObject[contract[0]].initialize(...(contract[2] || [])) + testEnvironment[contract[0]] = await contract[1].deploy() + await testEnvironment[contract[0]].deployed() + const tx = await testEnvironment[contract[0]].initialize(...(contract[2] || [])) await tx.wait() // await ethers.provider.waitForTransaction(tx.hash) } @@ -68,3 +67,6 @@ export async function checkContractBalance ( export function getBigNumber (amount: string, decimals = 18) { return BigNumber.from(amount).mul(BigNumber.from(BASE_TEN).pow(decimals)) } + +export * from './Mini721Util' +export * from './Mini1155Util' diff --git a/miniwallet/tsconfig.json b/miniwallet/tsconfig.json index e8b190c..8d7c8d5 100644 --- a/miniwallet/tsconfig.json +++ b/miniwallet/tsconfig.json @@ -9,6 +9,6 @@ "resolveJsonModule": true, "noImplicitAny": false }, - "include": ["./scripts", "./test", "./deploy", "./typechain"], + "include": ["./scripts", "./test", "./deploy", "./typechain", "./hardhat.config.ts"], "files": ["./hardhat.config.ts"] } diff --git a/miniwallet/yarn.lock b/miniwallet/yarn.lock index 5b46f92..bc484e8 100644 --- a/miniwallet/yarn.lock +++ b/miniwallet/yarn.lock @@ -218,346 +218,347 @@ "@ethersproject/properties" ">=5.0.0-beta.131" "@ethersproject/strings" ">=5.0.0-beta.130" -"@ethersproject/abi@5.6.4", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.6.3": - version "5.6.4" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.4.tgz#f6e01b6ed391a505932698ecc0d9e7a99ee60362" - integrity sha512-TTeZUlCeIHG6527/2goZA6gW5F8Emoc7MrZDC7hhP84aRGvW3TEdTnZR08Ls88YXM1m2SuK42Osw/jSi3uO8gg== - dependencies: - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/hash" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.1" - -"@ethersproject/abstract-provider@5.6.1", "@ethersproject/abstract-provider@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.1.tgz#02ddce150785caf0c77fe036a0ebfcee61878c59" - integrity sha512-BxlIgogYJtp1FS8Muvj8YfdClk3unZH0vRMVX791Z9INBNT/kuACZ9GzaY1Y4yFq+YSy6/w4gzj3HCRKrK9hsQ== - dependencies: - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.3" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.2" - "@ethersproject/web" "^5.6.1" - -"@ethersproject/abstract-signer@5.6.2", "@ethersproject/abstract-signer@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.2.tgz#491f07fc2cbd5da258f46ec539664713950b0b33" - integrity sha512-n1r6lttFBG0t2vNiI3HoWaS/KdOt8xyDjzlP2cuevlWLG6EX0OwcKLyG/Kp/cuwNxdy/ous+R/DEMdTUwWQIjQ== - dependencies: - "@ethersproject/abstract-provider" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - -"@ethersproject/address@5.6.1", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.1.tgz#ab57818d9aefee919c5721d28cd31fd95eff413d" - integrity sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q== - dependencies: - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/rlp" "^5.6.1" - -"@ethersproject/base64@5.6.1", "@ethersproject/base64@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.1.tgz#2c40d8a0310c9d1606c2c37ae3092634b41d87cb" - integrity sha512-qB76rjop6a0RIYYMiB4Eh/8n+Hxu2NIZm8S/Q7kNo5pmZfXhHGHmS4MinUainiBC54SCyRnwzL+KZjj8zbsSsw== - dependencies: - "@ethersproject/bytes" "^5.6.1" - -"@ethersproject/basex@5.6.1", "@ethersproject/basex@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.6.1.tgz#badbb2f1d4a6f52ce41c9064f01eab19cc4c5305" - integrity sha512-a52MkVz4vuBXR06nvflPMotld1FJWSj2QT0985v7P/emPZO00PucFAkbcmq2vpVU7Ts7umKiSI6SppiLykVWsA== - dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/properties" "^5.6.0" - -"@ethersproject/bignumber@5.6.2", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.2.tgz#72a0717d6163fab44c47bcc82e0c550ac0315d66" - integrity sha512-v7+EEUbhGqT3XJ9LMPsKvXYHFc8eHxTowFCG/HgJErmq4XHJ2WR7aeyICg3uTOAQ7Icn0GFHAohXEhxQHq4Ubw== - dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.0.0-beta.146", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.5.0", "@ethersproject/abi@^5.6.3", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/address@5.7.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.2", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" bn.js "^5.2.1" -"@ethersproject/bytes@5.6.1", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" - integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/constants@5.6.1", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.1.tgz#e2e974cac160dd101cf79fdf879d7d18e8cb1370" - integrity sha512-QSq9WVnZbxXYFftrjSjZDUshp6/eKp6qrtdBtUCm0QxCV5z1fG/w3kdlcsjMCQuQHUnAclKoK7XpXMezhRDOLg== - dependencies: - "@ethersproject/bignumber" "^5.6.2" - -"@ethersproject/contracts@5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.6.2.tgz#20b52e69ebc1b74274ff8e3d4e508de971c287bc" - integrity sha512-hguUA57BIKi6WY0kHvZp6PwPlWF87MCeB4B7Z7AbUpTxfFXFdn/3b0GmjZPagIHS+3yhcBJDnuEfU4Xz+Ks/8g== - dependencies: - "@ethersproject/abi" "^5.6.3" - "@ethersproject/abstract-provider" "^5.6.1" - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/transactions" "^5.6.2" - -"@ethersproject/hash@5.6.1", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.1.tgz#224572ea4de257f05b4abf8ae58b03a67e99b0f4" - integrity sha512-L1xAHurbaxG8VVul4ankNX5HgQ8PNCTrnVXEiFnE9xoRnaUcgfD12tZINtDinSllxPLCtGwguQxJ5E6keE84pA== - dependencies: - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.1" - -"@ethersproject/hdnode@5.6.2", "@ethersproject/hdnode@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.6.2.tgz#26f3c83a3e8f1b7985c15d1db50dc2903418b2d2" - integrity sha512-tERxW8Ccf9CxW2db3WsN01Qao3wFeRsfYY9TCuhmG0xNpl2IO8wgXU3HtWIZ49gUWPggRy4Yg5axU0ACaEKf1Q== - dependencies: - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/basex" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.1" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/sha2" "^5.6.1" - "@ethersproject/signing-key" "^5.6.2" - "@ethersproject/strings" "^5.6.1" - "@ethersproject/transactions" "^5.6.2" - "@ethersproject/wordlists" "^5.6.1" - -"@ethersproject/json-wallets@5.6.1", "@ethersproject/json-wallets@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.6.1.tgz#3f06ba555c9c0d7da46756a12ac53483fe18dd91" - integrity sha512-KfyJ6Zwz3kGeX25nLihPwZYlDqamO6pfGKNnVMWWfEVVp42lTfCZVXXy5Ie8IZTN0HKwAngpIPi7gk4IJzgmqQ== - dependencies: - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/hdnode" "^5.6.2" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/pbkdf2" "^5.6.1" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.1" - "@ethersproject/strings" "^5.6.1" - "@ethersproject/transactions" "^5.6.2" +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/constants@5.7.0", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + +"@ethersproject/hash@5.7.0", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" aes-js "3.0.0" scrypt-js "3.0.1" -"@ethersproject/keccak256@5.6.1", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.1.tgz#b867167c9b50ba1b1a92bccdd4f2d6bd168a91cc" - integrity sha512-bB7DQHCTRDooZZdL3lk9wpL0+XuG3XLGHLh3cePnybsO3V0rdCAOQGpn/0R3aODmnTOOkCATJiD2hnL+5bwthA== +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== dependencies: - "@ethersproject/bytes" "^5.6.1" + "@ethersproject/bytes" "^5.7.0" js-sha3 "0.8.0" -"@ethersproject/logger@5.6.0", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" - integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== - -"@ethersproject/networks@5.6.4", "@ethersproject/networks@^5.6.3": - version "5.6.4" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.4.tgz#51296d8fec59e9627554f5a8a9c7791248c8dc07" - integrity sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/pbkdf2@5.6.1", "@ethersproject/pbkdf2@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.6.1.tgz#f462fe320b22c0d6b1d72a9920a3963b09eb82d1" - integrity sha512-k4gRQ+D93zDRPNUfmduNKq065uadC2YjMP/CqwwX5qG6R05f47boq6pLZtV/RnC4NZAYOPH1Cyo54q0c9sshRQ== - dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/sha2" "^5.6.1" - -"@ethersproject/properties@5.6.0", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.6.0": - version "5.6.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.6.0.tgz#38904651713bc6bdd5bdd1b0a4287ecda920fa04" - integrity sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg== - dependencies: - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/providers@5.6.8": - version "5.6.8" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.8.tgz#22e6c57be215ba5545d3a46cf759d265bb4e879d" - integrity sha512-Wf+CseT/iOJjrGtAOf3ck9zS7AgPmr2fZ3N97r4+YXN3mBePTG2/bJ8DApl9mVwYL+RpYbNxMEkEp4mPGdwG/w== - dependencies: - "@ethersproject/abstract-provider" "^5.6.1" - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/base64" "^5.6.1" - "@ethersproject/basex" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/hash" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/networks" "^5.6.3" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.1" - "@ethersproject/rlp" "^5.6.1" - "@ethersproject/sha2" "^5.6.1" - "@ethersproject/strings" "^5.6.1" - "@ethersproject/transactions" "^5.6.2" - "@ethersproject/web" "^5.6.1" +"@ethersproject/logger@5.7.0", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + +"@ethersproject/networks@5.7.0", "@ethersproject/networks@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.0.tgz#df72a392f1a63a57f87210515695a31a245845ad" + integrity sha512-MG6oHSQHd4ebvJrleEQQ4HhVu8Ichr0RDYEfHzsVAVjHNM+w36x9wp9r+hf1JstMXtseXDtkiVoARAG6M959AA== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + +"@ethersproject/properties@5.7.0", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/providers@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.0.tgz#a885cfc7650a64385e7b03ac86fe9c2d4a9c2c63" + integrity sha512-+TTrrINMzZ0aXtlwO/95uhAggKm4USLm1PbeCBR/3XZ7+Oey+3pMyddzZEyRhizHpy1HXV0FRWRMI1O3EGYibA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" bech32 "1.1.4" ws "7.4.6" -"@ethersproject/random@5.6.1", "@ethersproject/random@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.6.1.tgz#66915943981bcd3e11bbd43733f5c3ba5a790255" - integrity sha512-/wtPNHwbmng+5yi3fkipA8YBT59DdkGRoC2vWk09Dci/q5DlgnMkhIycjHlavrvrjJBkFjO/ueLyT+aUDfc4lA== +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" -"@ethersproject/rlp@5.6.1", "@ethersproject/rlp@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.1.tgz#df8311e6f9f24dcb03d59a2bac457a28a4fe2bd8" - integrity sha512-uYjmcZx+DKlFUk7a5/W9aQVaoEC7+1MOBgNtvNg13+RnuUwT4F0zTovC0tmay5SmRslb29V1B7Y5KCri46WhuQ== +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" -"@ethersproject/sha2@5.6.1", "@ethersproject/sha2@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.1.tgz#211f14d3f5da5301c8972a8827770b6fd3e51656" - integrity sha512-5K2GyqcW7G4Yo3uenHegbXRPDgARpWUiXc6RiF7b6i/HXUoWlb7uCARh7BAHg7/qT/Q5ydofNwiZcim9qpjB6g== +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" hash.js "1.1.7" -"@ethersproject/signing-key@5.6.2", "@ethersproject/signing-key@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.2.tgz#8a51b111e4d62e5a62aee1da1e088d12de0614a3" - integrity sha512-jVbu0RuP7EFpw82vHcL+GP35+KaNruVAZM90GxgQnGqB6crhBqW/ozBfFvdeImtmb4qPko0uxXjn8l9jpn0cwQ== +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" bn.js "^5.2.1" elliptic "6.5.4" hash.js "1.1.7" -"@ethersproject/solidity@5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.6.1.tgz#5845e71182c66d32e6ec5eefd041fca091a473e2" - integrity sha512-KWqVLkUUoLBfL1iwdzUVlkNqAUIFMpbbeH0rgCfKmJp0vFtY4AsaN91gHKo9ZZLkC4UOm3cI3BmMV4N53BOq4g== - dependencies: - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/sha2" "^5.6.1" - "@ethersproject/strings" "^5.6.1" - -"@ethersproject/strings@5.6.1", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.1.tgz#dbc1b7f901db822b5cafd4ebf01ca93c373f8952" - integrity sha512-2X1Lgk6Jyfg26MUnsHiT456U9ijxKUybz8IM1Vih+NJxYtXhmvKBcHOmvGqpFSVJ0nQ4ZCoIViR8XlRw1v/+Cw== - dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/transactions@5.6.2", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.2.tgz#793a774c01ced9fe7073985bb95a4b4e57a6370b" - integrity sha512-BuV63IRPHmJvthNkkt9G70Ullx6AcM+SDc+a8Aw/8Yew6YwT51TcBKEp1P4oOQ/bP25I18JJr7rcFRgFtU9B2Q== - dependencies: - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/rlp" "^5.6.1" - "@ethersproject/signing-key" "^5.6.2" - -"@ethersproject/units@5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.6.1.tgz#ecc590d16d37c8f9ef4e89e2005bda7ddc6a4e6f" - integrity sha512-rEfSEvMQ7obcx3KWD5EWWx77gqv54K6BKiZzKxkQJqtpriVsICrktIQmKl8ReNToPeIYPnFHpXvKpi068YFZXw== - dependencies: - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/constants" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - -"@ethersproject/wallet@5.6.2": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.6.2.tgz#cd61429d1e934681e413f4bc847a5f2f87e3a03c" - integrity sha512-lrgh0FDQPuOnHcF80Q3gHYsSUODp6aJLAdDmDV0xKCN/T7D99ta1jGVhulg3PY8wiXEngD0DfM0I2XKXlrqJfg== - dependencies: - "@ethersproject/abstract-provider" "^5.6.1" - "@ethersproject/abstract-signer" "^5.6.2" - "@ethersproject/address" "^5.6.1" - "@ethersproject/bignumber" "^5.6.2" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/hash" "^5.6.1" - "@ethersproject/hdnode" "^5.6.2" - "@ethersproject/json-wallets" "^5.6.1" - "@ethersproject/keccak256" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/random" "^5.6.1" - "@ethersproject/signing-key" "^5.6.2" - "@ethersproject/transactions" "^5.6.2" - "@ethersproject/wordlists" "^5.6.1" - -"@ethersproject/web@5.6.1", "@ethersproject/web@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.1.tgz#6e2bd3ebadd033e6fe57d072db2b69ad2c9bdf5d" - integrity sha512-/vSyzaQlNXkO1WV+RneYKqCJwualcUdx/Z3gseVovZP0wIlOFcCE1hkRhKBH8ImKbGQbMl9EAAyJFrJu7V0aqA== - dependencies: - "@ethersproject/base64" "^5.6.1" - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.1" - -"@ethersproject/wordlists@5.6.1", "@ethersproject/wordlists@^5.6.1": - version "5.6.1" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.6.1.tgz#1e78e2740a8a21e9e99947e47979d72e130aeda1" - integrity sha512-wiPRgBpNbNwCQFoCr8bcWO8o5I810cqO6mkdtKfLKFlLxeCWcnzDi4Alu8iyNzlhYuS9npCwivMbRWF19dyblw== - dependencies: - "@ethersproject/bytes" "^5.6.1" - "@ethersproject/hash" "^5.6.1" - "@ethersproject/logger" "^5.6.0" - "@ethersproject/properties" "^5.6.0" - "@ethersproject/strings" "^5.6.1" +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/strings@5.7.0", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/transactions@5.7.0", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.6.2", "@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== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + +"@ethersproject/wallet@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + +"@ethersproject/web@5.7.0", "@ethersproject/web@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.0.tgz#40850c05260edad8b54827923bbad23d96aac0bc" + integrity sha512-ApHcbbj+muRASVDSCl/tgxaH2LBkRMEYfLOLVa0COipx0+nlu0QKet7U2lEg0vdkh8XRSLf2nd1f1Uk9SrVSGA== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" "@humanwhocodes/config-array@^0.5.0": version "0.5.0" @@ -633,7 +634,7 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers": +"@nomiclabs/hardhat-ethers@yarn:hardhat-deploy-ethers": version "0.3.0-beta.13" resolved "https://registry.yarnpkg.com/hardhat-deploy-ethers/-/hardhat-deploy-ethers-0.3.0-beta.13.tgz#b96086ff768ddf69928984d5eb0a8d78cfca9366" integrity sha512-PdWVcKB9coqWV1L7JTpfXRCI91Cgwsm7KLmBcwZ8f0COSm1xtABHZTyz3fvF6p42cTnz1VM0QnfDvMFlIRkSNw== @@ -663,29 +664,29 @@ "@types/web3" "1.0.19" "@openzeppelin/contracts-upgradeable@^4.7.1": - version "4.7.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.7.1.tgz#f63fc384255d6ac139e0a2561aa207fd7c14183c" - integrity sha512-5EFiZld3DYFd8aTL8eeMnhnaWh1/oXLXFNuFMrgF3b1DNPshF3LCyO7VR6lc+gac2URJ0BlVcZoCfkk/3MoEfg== + version "4.7.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.7.3.tgz#f1d606e2827d409053f3e908ba4eb8adb1dd6995" + integrity sha512-+wuegAMaLcZnLCJIvrVUDzA9z/Wp93f0Dla/4jJvIhijRrPabjQbZe6fWiECLaJyfn5ci9fqf9vTw3xpQOad2A== "@openzeppelin/contracts@^4.7.1": - version "4.7.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.7.1.tgz#33d0a857b76b18d313e6bb6ed28cdaf367e90cfe" - integrity sha512-UXmAjKARsXORHlHZu5GCD7ZbRKm6nU8UHnbuT/QJJa2JEOEcbvV/X8w/sUk62Sl9VZuuljM1akrZLyAtzUgsxw== + version "4.7.3" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.7.3.tgz#939534757a81f8d69cc854c7692805684ff3111e" + integrity sha512-dGRS0agJzu8ybo44pCIf3xBaPQN/65AIXNgK8+4gzKd5kbvlqyxryUYVLJv7fK98Seyd2hDZzVEHSWAh0Bt1Yw== "@openzeppelin/hardhat-upgrades@^1.17.0": - version "1.19.1" - resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.19.1.tgz#34907928c0b4acdfbc2cffa32eb59730a5b62e3e" - integrity sha512-LvUClx+c8DIS6T5ZEPsz+HSRztvY9wjAI4qZH8IaTswjPAT/mqXZWmuQF96fFopR+jKpUNmI4IUo5wLt2TkdKQ== + version "1.20.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/hardhat-upgrades/-/hardhat-upgrades-1.20.0.tgz#fe1bddc4ab591ccf185caf4cfa269a4851b73599" + integrity sha512-ign7fc/ZdPe+KAYCB91619o+wlBr7sIEEt1nqLhoXAJ9f0qVuXkwAaTdLB0MTSWH85TzlUUT2fTJp1ZnZ1o4LQ== dependencies: - "@openzeppelin/upgrades-core" "^1.16.0" + "@openzeppelin/upgrades-core" "^1.18.0" chalk "^4.1.0" debug "^4.1.1" proper-lockfile "^4.1.1" -"@openzeppelin/upgrades-core@^1.16.0": - version "1.17.0" - resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.17.0.tgz#f9941d83f9532d8e8b1ff570d2a3cb1e40a8769c" - integrity sha512-GaR3XiJ5PUKrHwz+EFJ9gtj2/taiFRWufbUaCgc1JEit1ERB9fI8PWEO0VTL+KzCZPl6meyT7RIhKNBRcX6jsA== +"@openzeppelin/upgrades-core@^1.18.0": + version "1.18.0" + resolved "https://registry.yarnpkg.com/@openzeppelin/upgrades-core/-/upgrades-core-1.18.0.tgz#a5db80d15e6b87d45307ad27314c91807a506c00" + integrity sha512-fFp5sscGC876yhq7BU595LG45yky21sZFa6cDJigluUjAyJSPoLwF7GD9bSwQMMo4jC7ii1UJBtLipUxN6PVTA== dependencies: cbor "^8.0.0" chalk "^4.1.0" @@ -848,27 +849,27 @@ dependencies: defer-to-connect "^1.0.1" -"@truffle/error@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@truffle/error/-/error-0.1.0.tgz#5e9fed79e6cda624c926d314b280a576f8b22a36" - integrity sha512-RbUfp5VreNhsa2Q4YbBjz18rOQI909pG32bghl1hulO7IpvcqTS+C3Ge5cNbiWQ1WGzy1wIeKLW0tmQtHFB7qg== +"@truffle/error@^0.1.1": + 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/interface-adapter@^0.5.19": - version "0.5.19" - resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.19.tgz#57529cacb09c72ebfd584ec003af55face18a3de" - integrity sha512-x7IZvsyx36DAJCJVZ9gUe1Lh8AhODhJoW7I+lJXIlGxj3EmZbao4/sHo+cN4u9i94yVTyGwYd78NzbP0a/LAog== +"@truffle/interface-adapter@^0.5.21": + version "0.5.21" + resolved "https://registry.yarnpkg.com/@truffle/interface-adapter/-/interface-adapter-0.5.21.tgz#f22c99b7cb5d5c4ebbb6106f9274ea844baeaa2b" + integrity sha512-2ltbu3upsWS0TAQu1kLQc048XlXNmDkCzH6iebX4dg3VBB+l7oG/pu5+/kl8t+LRfzGoEMLKwOQt7vk0Vm3PNA== dependencies: bn.js "^5.1.3" ethers "^4.0.32" web3 "1.7.4" "@truffle/provider@^0.2.24": - version "0.2.57" - resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.57.tgz#c6d079748c99427c1ce283a19921b450aa9920ee" - integrity sha512-O8VxF2uQwa+KB4HDg9lG7uhQ/+AOvchX+1STpQBSSAGfov1+EROM0iRZUNoPm71Pu0C9ji2WmXbNW/COjUMaMA== + version "0.2.59" + resolved "https://registry.yarnpkg.com/@truffle/provider/-/provider-0.2.59.tgz#a6bc51c53a6bf0e376e9b3167fae255f3b0d9208" + integrity sha512-4b79yUSZlEd7KqzaPkQiiT4aRCGaI+pXPdwJMD0olLvnZrGoNrBtRQSmnXesxBcqi6FaSDxxC+/9URG2HBPE2g== dependencies: - "@truffle/error" "^0.1.0" - "@truffle/interface-adapter" "^0.5.19" + "@truffle/error" "^0.1.1" + "@truffle/interface-adapter" "^0.5.21" debug "^4.3.1" web3 "1.7.4" @@ -920,9 +921,9 @@ integrity sha512-q5veSX6zjUy/DlDhR4Y4cU0k2Ar+DT2LUraP00T19WLmTO6Se1djepCCaqU6nQrwcJ5Hyo/CWqxTzrrFg8eqbQ== "@types/bn.js@*", "@types/bn.js@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" - integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" + integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== dependencies: "@types/node" "*" @@ -934,9 +935,9 @@ "@types/node" "*" "@types/chai@*", "@types/chai@^4.3.1": - version "4.3.1" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.1.tgz#e2c6e73e0bdeb2521d00756d099218e9f5d90a04" - integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ== + version "4.3.3" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.3.tgz#3c90752792660c4b562ad73b3fbd68bf3bc7ae07" + integrity sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g== "@types/concat-stream@^1.6.0": version "1.6.1" @@ -985,9 +986,9 @@ "@types/node" "*" "@types/lodash@^4.14.182": - version "4.14.182" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" - integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== + version "4.14.184" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.184.tgz#23f96cd2a21a28e106dc24d825d4aa966de7a9fe" + integrity sha512-RoZphVtHbxPZizt4IcILciSWiC6dcn+eZ8oX9IWEYfDMcocdd42f7NPI6fQj+6zI8y4E0L7gu2pcZKLGTRaV9Q== "@types/lru-cache@^5.1.0": version "5.1.1" @@ -995,9 +996,9 @@ integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== "@types/minimatch@*": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" - integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== + version "5.1.2" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" + integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== "@types/mkdirp@^0.5.2": version "0.5.2" @@ -1025,9 +1026,9 @@ form-data "^3.0.0" "@types/node@*": - version "18.6.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.6.1.tgz#828e4785ccca13f44e2fb6852ae0ef11e3e20ba5" - integrity sha512-z+2vB6yDt1fNwKOeGbckpmirO+VBDuQqecXkgeIqDlaOtmKn6hPR/viQ8cxCfqLU4fTlvM3+YjM367TukWdxpg== + version "18.7.14" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.14.tgz#0fe081752a3333392d00586d815485a17c2cf3c9" + integrity sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA== "@types/node@^10.0.3": version "10.17.60" @@ -1052,9 +1053,9 @@ "@types/node" "*" "@types/prettier@^2.1.1": - version "2.6.4" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.4.tgz#ad899dad022bab6b5a9f0a0fe67c2f7a4a8950ed" - integrity sha512-fOwvpvQYStpb/zHMx0Cauwywu9yLDmzWiiQBC7gJyq5tYLUXFZvDG7VK1B7WBxxjBJNKFOZ0zLoOQn8vmATbhw== + version "2.7.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.0.tgz#ea03e9f0376a4446f44797ca19d9c46c36e352dc" + integrity sha512-RI1L7N4JnW5gQw2spvL7Sllfuf1SaHdrZpCHiBlCXjIlufi1SMNnbu2teze3/QE67Fg2tBlH7W+mi4hVNk4p0A== "@types/qs@^6.2.31", "@types/qs@^6.9.7": version "6.9.7" @@ -2219,9 +2220,9 @@ bech32@1.1.4: integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== bignumber.js@^9.0.0, bignumber.js@^9.0.1: - version "9.0.2" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" - integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== + version "9.1.0" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.0.tgz#8d340146107fe3a6cb8d40699643c302e8773b62" + integrity sha512-4LwHK4nfDOraBCtst+wOWIHbu1vhvAPJK8g8nROd4iuc3PSEjWif/qwbkh8jwCJz6yDBvtU4KPynETgrfh7y3A== binary-extensions@^2.0.0: version "2.2.0" @@ -2549,9 +2550,9 @@ camelcase@^6.0.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30000844: - version "1.0.30001370" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001370.tgz#0a30d4f20d38b9e108cc5ae7cc62df9fe66cd5ba" - integrity sha512-3PDmaP56wz/qz7G508xzjx8C+MC2qEm4SYhSEzC9IBROo+dGXFWRuaXkWti0A9tuI00g+toiriVqxtWMgl350g== + version "1.0.30001387" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001387.tgz#90d2b9bdfcc3ab9a5b9addee00a25ef86c9e2e1e" + integrity sha512-fKDH0F1KOJvR+mWSOvhj8lVRr/Q/mc5u5nabU2vi1/sgvlSqEsE8dOq0Hy/BqVbDkCYQPRRHB1WRjW6PGB/7PA== caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" @@ -2859,9 +2860,9 @@ commander@3.0.2: integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== compare-versions@^4.0.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-4.1.3.tgz#8f7b8966aef7dc4282b45dfa6be98434fc18a1a4" - integrity sha512-WQfnbDcrYnGr55UwbxKiQKASnTtNnaAWVi8jZyy8NTpVAXWACSne8lMD1iaIo9AiU6mnuLvSVshCzewVuWxHUg== + version "4.1.4" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-4.1.4.tgz#3571f4d610924d4414846a4183d386c8f3d51112" + integrity sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw== component-emitter@^1.2.1: version "1.3.0" @@ -2937,9 +2938,9 @@ copy-descriptor@^0.1.0: integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw== core-js-pure@^3.0.1: - version "3.24.0" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.24.0.tgz#10eeb90dbf0d670a6b22b081aecc7deb2faec7e1" - integrity sha512-uzMmW8cRh7uYw4JQtzqvGWRyC2T5+4zipQLQdi2FmiRqP83k3d6F3stv2iAlNhOs6cXN401FCD5TL0vvleuHgA== + version "3.25.0" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.25.0.tgz#f8d1f176ff29abbfeb610110de891d5ae5a361d4" + integrity sha512-IeHpLwk3uoci37yoI2Laty59+YqH9x5uR65/yiA0ARAJrTrN4YU0rmauLWfvqOuk77SlNJXj2rM6oT/dBD87+A== core-js@^2.4.0, core-js@^2.5.0: version "2.6.12" @@ -3321,9 +3322,9 @@ dom-walk@^0.1.0: integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== dotenv@^16.0.1: - version "16.0.1" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.1.tgz#8f8f9d94876c35dac989876a5d3a82a267fdce1d" - integrity sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ== + version "16.0.2" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.2.tgz#0b0f8652c016a3858ef795024508cddc4bffc5bf" + integrity sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA== dotignore@~0.1.2: version "0.1.2" @@ -3351,9 +3352,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.3.47: - version "1.4.202" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.202.tgz#0c2ed733f42b02ec49a955c5badfcc65888c390b" - integrity sha512-JYsK2ex9lmQD27kj19fhXYxzFJ/phLAkLKHv49A5UY6kMRV2xED3qMMLg/voW/+0AR6wMiI+VxlmK9NDtdxlPA== + version "1.4.238" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.238.tgz#eff905365e7a1ff12e53014844cdd4608387c21c" + integrity sha512-Vcw+jaLrdCj6Ds4p4FpVYn8UBa+DSRt4FwO5r6+6xifKbeRQ/MsC0vYOjLYkz4JJGDi/wZkjrxuZULn/E69w9Q== elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" @@ -3500,9 +3501,9 @@ es-to-primitive@^1.2.1: is-symbol "^1.0.2" es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.61" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.61.tgz#311de37949ef86b6b0dcea894d1ffedb909d3269" - integrity sha512-yFhIqQAzu2Ca2I4SE2Au3rxVfmohU9Y7wqGR+s7+H7krk26NXhIRAZDgqd6xqjCEFUomDEA3/Bo/7fKmIkW1kA== + 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" @@ -3571,12 +3572,11 @@ eslint-import-resolver-node@^0.3.6: resolve "^1.20.0" eslint-module-utils@^2.7.3: - version "2.7.3" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" - integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== + version "2.7.4" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== dependencies: debug "^3.2.7" - find-up "^2.1.0" eslint-plugin-es@^3.0.0: version "3.0.1" @@ -4250,41 +4250,41 @@ ethers@^4.0.32, ethers@^4.0.40: uuid "2.0.1" xmlhttprequest "1.8.0" -ethers@^5.0.1, ethers@^5.0.2, ethers@^5.5.2, ethers@^5.5.3, ethers@^5.6.9: - version "5.6.9" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.9.tgz#4e12f8dfcb67b88ae7a78a9519b384c23c576a4d" - integrity sha512-lMGC2zv9HC5EC+8r429WaWu3uWJUCgUCt8xxKCFqkrFuBDZXDYIdzDUECxzjf2BMF8IVBByY1EBoGSL3RTm8RA== - dependencies: - "@ethersproject/abi" "5.6.4" - "@ethersproject/abstract-provider" "5.6.1" - "@ethersproject/abstract-signer" "5.6.2" - "@ethersproject/address" "5.6.1" - "@ethersproject/base64" "5.6.1" - "@ethersproject/basex" "5.6.1" - "@ethersproject/bignumber" "5.6.2" - "@ethersproject/bytes" "5.6.1" - "@ethersproject/constants" "5.6.1" - "@ethersproject/contracts" "5.6.2" - "@ethersproject/hash" "5.6.1" - "@ethersproject/hdnode" "5.6.2" - "@ethersproject/json-wallets" "5.6.1" - "@ethersproject/keccak256" "5.6.1" - "@ethersproject/logger" "5.6.0" - "@ethersproject/networks" "5.6.4" - "@ethersproject/pbkdf2" "5.6.1" - "@ethersproject/properties" "5.6.0" - "@ethersproject/providers" "5.6.8" - "@ethersproject/random" "5.6.1" - "@ethersproject/rlp" "5.6.1" - "@ethersproject/sha2" "5.6.1" - "@ethersproject/signing-key" "5.6.2" - "@ethersproject/solidity" "5.6.1" - "@ethersproject/strings" "5.6.1" - "@ethersproject/transactions" "5.6.2" - "@ethersproject/units" "5.6.1" - "@ethersproject/wallet" "5.6.2" - "@ethersproject/web" "5.6.1" - "@ethersproject/wordlists" "5.6.1" +ethers@^5.0.1, ethers@^5.0.2, ethers@^5.5.2, ethers@^5.5.3, ethers@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.0.tgz#0055da174b9e076b242b8282638bc94e04b39835" + integrity sha512-5Xhzp2ZQRi0Em+0OkOcRHxPzCfoBfgtOQA+RUylSkuHbhTEaQklnYi2hsWbRgs3ztJsXVXd9VKBcO1ScWL8YfA== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.0" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.0" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.0" + "@ethersproject/wordlists" "5.7.0" ethjs-unit@0.1.6: version "0.1.6" @@ -4376,11 +4376,11 @@ express@^4.14.0: vary "~1.1.2" ext@^1.1.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.6.0.tgz#3871d50641e874cc172e2b53f919842d19db4c52" - integrity sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg== + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== dependencies: - type "^2.5.0" + type "^2.7.2" extend-shallow@^2.0.1: version "2.0.1" @@ -4626,9 +4626,9 @@ flatted@^2.0.0: integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== flatted@^3.1.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2" - integrity sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ== + version "3.2.7" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" + integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== flow-stoplight@^1.0.0: version "1.0.0" @@ -4801,6 +4801,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fs@^0.0.1-security: + version "0.0.1-security" + resolved "https://registry.yarnpkg.com/fs/-/fs-0.0.1-security.tgz#8a7bd37186b6dddf3813f23858b57ecaaf5e41d4" + integrity sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w== + fsevents@~2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" @@ -4991,7 +4996,7 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6, glob@~7.2.0: +glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.6, glob@~7.2.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -5163,7 +5168,7 @@ hardhat-contract-sizer@^2.6.1: chalk "^4.0.0" cli-table3 "^0.6.0" -hardhat-deploy@^0.11.10: +hardhat-deploy@^0.11.12: version "0.11.12" resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.11.12.tgz#323e05ecd8e6c80a9193b9c6f6c8ecbb6abfbe47" integrity sha512-Wv0BqzwW4mz78raxkfQtBbkhZwZTRWXwRbEwgkTUimD3MX/0Z9+D4O+s1zHJlG0zwZvJMbwxPOrOHQm4NZ3JAQ== @@ -5197,9 +5202,9 @@ hardhat-spdx-license-identifier@^2.0.3: integrity sha512-G4u4I1md0tWaitX6Os7Nq9sYZ/CFdR+ibm7clCksGJ4yrtdHEZxgLjWpJ0WiALF9SoFKt03PwCe9lczDQ/5ADA== hardhat@^2.9.6: - version "2.10.1" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.10.1.tgz#37fdc0c96d6a5d16b322269db2ad8f9f115c4046" - integrity sha512-0FN9TyCtn7Lt25SB2ei2G7nA2rZjP+RN6MvFOm+zYwherxLZNo6RbD8nDz88eCbhRapevmXqOiL2nM8INKsjmA== + version "2.10.2" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.10.2.tgz#ff94ee4cb144a9c114641581ff5e4d7bea5f93a9" + integrity sha512-L/KvDDT/MA6332uAtYTqdcHoSABljw4pPjHQe5SHdIJ+xKfaSc6vDKw03CmrQ5Xup0gHs8XnVSBpZo1AbbIW7g== dependencies: "@ethereumjs/block" "^3.6.2" "@ethereumjs/blockchain" "^5.5.2" @@ -5687,9 +5692,9 @@ is-ci@^2.0.0: ci-info "^2.0.0" is-core-module@^2.8.1, is-core-module@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" - integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== + version "2.10.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" + integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== dependencies: has "^1.0.3" @@ -7190,7 +7195,7 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-inspect@^1.12.0, object-inspect@^1.9.0, object-inspect@~1.12.0: +object-inspect@^1.12.0, object-inspect@^1.9.0, object-inspect@~1.12.2: version "1.12.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== @@ -7231,13 +7236,13 @@ object.assign@4.1.0: object-keys "^1.0.11" object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" object-keys "^1.1.1" object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.1: @@ -7719,9 +7724,9 @@ promise-to-callback@^1.0.0: set-immediate-shim "^1.0.1" promise@^8.0.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/promise/-/promise-8.1.0.tgz#697c25c3dfe7435dd79fcd58c38a135888eaf05e" - integrity sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q== + version "8.2.0" + resolved "https://registry.yarnpkg.com/promise/-/promise-8.2.0.tgz#a1f6280ab67457fbfc8aad2b198c9497e9e5c806" + integrity sha512-+CMAlLHqwRYwBMXKCP+o8ns7DN+xHDUiI+0nArsiJ9y+kJVPLFxEaSw6Ha9s9H0tftxg2Yzl25wqj9G7m5wLZg== dependencies: asap "~2.0.6" @@ -8187,7 +8192,7 @@ resolve@1.17.0: dependencies: path-parse "^1.0.6" -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.8.1, resolve@~1.22.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.8.1, resolve@~1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -8796,9 +8801,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.11" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz#50c0d8c40a14ec1bf449bae69a0ea4685a9d9f95" - integrity sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g== + version "3.0.12" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz#69077835abe2710b65f03969898b6637b505a779" + integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -8905,7 +8910,7 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string.prototype.trim@~1.2.5: +string.prototype.trim@~1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.6.tgz#824960787db37a9e24711802ed0c1d1c0254f83e" integrity sha512-8lMR2m+U0VJTPp6JjvJTtGyc4FIGq9CdRt7O9p6T0e6K4vjU+OP+SQJpbe/SBmRcCUIvNUnjsbmY6lnMp8MhsQ== @@ -9108,24 +9113,24 @@ table@^6.0.9, table@^6.8.0: strip-ansi "^6.0.1" tape@^4.6.3: - version "4.15.1" - resolved "https://registry.yarnpkg.com/tape/-/tape-4.15.1.tgz#88fb662965a11f9be1bddb04c11662d7eceb129e" - integrity sha512-k7F5pyr91n9D/yjSJwbLLYDCrTWXxMSXbbmHX2n334lSIc2rxeXyFkaBv4UuUd2gBYMrAOalPutAiCxC6q1qbw== + version "4.16.0" + resolved "https://registry.yarnpkg.com/tape/-/tape-4.16.0.tgz#18310f57b71c0ac21b3ef94fe5c16033b3d6362b" + integrity sha512-mBlqYFr2mHysgCFXAuSarIQ+ffhielpb7a5/IbeOhMaLnQYhkJLUm6CwO1RszWeHRxnIpMessZ3xL2Cfo94BWw== dependencies: call-bind "~1.0.2" deep-equal "~1.1.1" defined "~1.0.0" dotignore "~0.1.2" for-each "~0.3.3" - glob "~7.2.0" + glob "~7.2.3" has "~1.0.3" inherits "~2.0.4" is-regex "~1.1.4" minimist "~1.2.6" - object-inspect "~1.12.0" - resolve "~1.22.0" + object-inspect "~1.12.2" + resolve "~1.22.1" resumer "~0.0.0" - string.prototype.trim "~1.2.5" + string.prototype.trim "~1.2.6" through "~2.3.8" tar@^4.0.2: @@ -9423,10 +9428,10 @@ type@^1.0.1: resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== -type@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/type/-/type-2.6.0.tgz#3ca6099af5981d36ca86b78442973694278a219f" - integrity sha512-eiDBDOmkih5pMbo9OqsqPRGMljLodLcwd5XD5JbtNB0o89xZAwynY9EdCDsJU7LtcVCClu9DvM7/0Ep1hYX3EQ== +type@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.2.tgz#2376a15a3a28b1efa0f5350dcf72d24df6ef98d0" + integrity sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw== typechain@^3.0.0: version "3.0.0" @@ -9470,9 +9475,9 @@ typedarray@^0.0.6: integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== typescript@^4.6.4: - version "4.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" - integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== + version "4.8.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790" + integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw== typewise-core@^1.2, typewise-core@^1.2.0: version "1.2.0" @@ -9497,9 +9502,9 @@ typical@^2.6.0, typical@^2.6.1: integrity sha512-ofhi8kjIje6npGozTip9Fr8iecmYfEbS06i0JnIg+rh51KakryWF4+jX8lLKZVhy6N+ID45WYSFCxPOdTWCzNg== uglify-js@^3.1.4: - version "3.16.3" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.16.3.tgz#94c7a63337ee31227a18d03b8a3041c210fd1f1d" - integrity sha512-uVbFqx9vvLhQg0iBaau9Z75AxWJ8tqM9AV890dIZCLApF4rTcyHwmAvLeEdYRs+BzYWu8Iw81F79ah0EfTXbaw== + version "3.17.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.0.tgz#55bd6e9d19ce5eef0d5ad17cd1f587d85b180a85" + integrity sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg== ultron@~1.1.0: version "1.1.1" @@ -9522,9 +9527,9 @@ underscore@1.9.1: integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== undici@^5.4.0: - version "5.8.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.8.0.tgz#dec9a8ccd90e5a1d81d43c0eab6503146d649a4f" - integrity sha512-1F7Vtcez5w/LwH2G2tGnFIihuWUlc58YidwLiCv+jR2Z50x0tNXpRRw7eOIJ+GvqCqIkg9SB7NWAJ/T9TLfv8Q== + version "5.10.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.10.0.tgz#dd9391087a90ccfbd007568db458674232ebf014" + integrity sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g== union-value@^1.0.0: version "1.0.1" @@ -10169,7 +10174,7 @@ web3-utils@1.2.11: underscore "1.9.1" utf8 "3.0.0" -web3-utils@1.7.4, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.0: +web3-utils@1.7.4: version "1.7.4" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.4.tgz#eb6fa3706b058602747228234453811bbee017f5" integrity sha512-acBdm6Evd0TEZRnChM/MCvGsMwYKmSh7OaUfNf5OKG0CIeGWD/6gqLOWIwmwSnre/2WrA1nKGId5uW2e5EfluA== @@ -10182,6 +10187,19 @@ web3-utils@1.7.4, web3-utils@^1.0.0-beta.31, web3-utils@^1.3.0: randombytes "^2.1.0" utf8 "3.0.0" +web3-utils@^1.0.0-beta.31, web3-utils@^1.3.0: + version "1.7.5" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.7.5.tgz#081a952ac6e0322e25ac97b37358a43c7372ef6a" + integrity sha512-9AqNOziQky4wNQadEwEfHiBdOZqopIHzQQVzmvvv6fJwDSMhP+khqmAZC7YTiGjs0MboyZ8tWNivqSO1699XQw== + 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" + web3@1.2.11: version "1.2.11" resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" @@ -10577,6 +10595,6 @@ yocto-queue@^0.1.0: integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== zksync-web3@^0.7.8: - version "0.7.9" - resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.7.9.tgz#fbb9a17f4b297c0fb9361de2a0d85ff2aac5becc" - integrity sha512-B0pitKvEQGJuWkY2UWjXrL1YgHghXEoDaq6acVZnB62TRF099GV58Fzi7Fnqt+Nw14A7Wc9iJ2AHD4GBTLFgkg== + version "0.7.13" + resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.7.13.tgz#9d87cfeac8a38e0c5702c2e05f80e50215d1102d" + integrity sha512-Zz83eOWLqPs88kgczkJLhst192oqtj7uzI3PaGyR9lkfQLL5eMEMZ+pD1eYPppTE1GohmGxhqnEf5HxG7WF0QA== diff --git a/server/config.js b/server/config.js index 8c2aac8..a233548 100644 --- a/server/config.js +++ b/server/config.js @@ -3,7 +3,6 @@ const BN = require('bn.js') const DEBUG = process.env.RELAYER_DEBUG === 'true' || process.env.RELAYER_DEBUG === '1' const config = { debug: DEBUG, - relayerId: process.env.RELAYER_ID || 'unknown', nullAddress: '0x0000000000000000000000000000000000000000', verbose: process.env.VERBOSE === 'true' || process.env.VERBOSE === '1', https: { @@ -14,7 +13,7 @@ const config = { corsOrigins: process.env.CORS, secret: process.env.SECRET, safeNonce: process.env.SAFE_NONCE === '1' || process.env.SAFE_NONCE === 'true', - pollingInterval: parseInt(process.env.pollingInterval || 1000), + pollingInterval: parseInt(process.env.POLLING_INTERVAL || 1000), defaultNetwork: process.env.DEFAULT_NETWORK || 'harmony-mainnet', networks: { 'harmony-testnet': { @@ -58,7 +57,7 @@ const config = { cred: !process.env.GCP_CRED_PATH ? {} : require(process.env.GCP_CRED_PATH), mock: !process.env.GCP_CRED_PATH, mockPort: 9000, - namespace: 'sms-wallet-server' + namespace: process.env.GCP_NAMESPACE || 'sms-wallet-server' }, twilio: { diff --git a/server/package.json b/server/package.json index 394c6d3..2cc27da 100644 --- a/server/package.json +++ b/server/package.json @@ -18,6 +18,7 @@ "compression": "^1.7.4", "cookie-parser": "^1.4.5", "dotenv": "^10.0.0", + "ethers": "^5.7.0", "exponential-backoff": "^3.1.0", "express": "5.0.0-beta.1", "express-fingerprint": "^1.2.2", diff --git a/server/src/data/datastore.js b/server/src/data/datastore.js index d2192c1..8869563 100644 --- a/server/src/data/datastore.js +++ b/server/src/data/datastore.js @@ -11,7 +11,7 @@ module.exports = { if (!server) { server = spawn('gcloud', dsArgs) const f = data => { - // console.log(data.toString()); + console.log(data.toString()) if (data.includes('Dev App Server is now running')) { console.log('Mock DS started!') } @@ -39,13 +39,16 @@ module.exports = { return client } const clientConf = { - projectId: config.datastore.cred['project_id'], + projectId: config.datastore.cred.project_id, + // projectId: config.datastore.cred.project_id, credentials: config.datastore.cred, namespace: config.datastore.namespace } if (config.datastore.mock) { + console.log('creating mock') this.mock() + console.log('mock created') clientConf.apiEndpoint = `127.0.0.1:${config.datastore.mockPort}` clientConf.projectId = 'mock' } diff --git a/server/utils.js b/server/utils.js index 0ced01e..32e044a 100644 --- a/server/utils.js +++ b/server/utils.js @@ -3,6 +3,9 @@ const sharedUtils = require('../shared/utils') const { keccak, hexView, hexString } = sharedUtils +const { StatusCodes } = require('http-status-codes') +const { values, mapValues } = require('lodash') + const utils = { keccak, hexView, @@ -45,7 +48,8 @@ const utils = { const otps = utils.genOTP({ seed, interval, counter, n }) const nums = new Array(n).fill(0).map((a, i) => new Uint8Array(otps.slice(i * 4, (i + 1) * 4))).map(utils.decodeOtp) return nums.map(i => i.toString().padStart(6, '0')) - }, + } + } module.exports = utils diff --git a/server/yarn.lock b/server/yarn.lock index f4f83dc..264f31a 100644 --- a/server/yarn.lock +++ b/server/yarn.lock @@ -598,6 +598,21 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.1" +"@ethersproject/abi@5.7.0", "@ethersproject/abi@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449" + integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/abstract-provider@5.6.1", "@ethersproject/abstract-provider@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.1.tgz#02ddce150785caf0c77fe036a0ebfcee61878c59" @@ -611,6 +626,19 @@ "@ethersproject/transactions" "^5.6.2" "@ethersproject/web" "^5.6.1" +"@ethersproject/abstract-provider@5.7.0", "@ethersproject/abstract-provider@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef" + integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + "@ethersproject/abstract-signer@5.6.2", "@ethersproject/abstract-signer@^5.6.2": version "5.6.2" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.2.tgz#491f07fc2cbd5da258f46ec539664713950b0b33" @@ -622,6 +650,17 @@ "@ethersproject/logger" "^5.6.0" "@ethersproject/properties" "^5.6.0" +"@ethersproject/abstract-signer@5.7.0", "@ethersproject/abstract-signer@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2" + integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/address@5.6.1", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.1.tgz#ab57818d9aefee919c5721d28cd31fd95eff413d" @@ -633,6 +672,17 @@ "@ethersproject/logger" "^5.6.0" "@ethersproject/rlp" "^5.6.1" +"@ethersproject/address@5.7.0", "@ethersproject/address@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37" + integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/base64@5.6.1", "@ethersproject/base64@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.1.tgz#2c40d8a0310c9d1606c2c37ae3092634b41d87cb" @@ -640,6 +690,13 @@ dependencies: "@ethersproject/bytes" "^5.6.1" +"@ethersproject/base64@5.7.0", "@ethersproject/base64@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c" + integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/basex@5.6.1", "@ethersproject/basex@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.6.1.tgz#badbb2f1d4a6f52ce41c9064f01eab19cc4c5305" @@ -648,6 +705,14 @@ "@ethersproject/bytes" "^5.6.1" "@ethersproject/properties" "^5.6.0" +"@ethersproject/basex@5.7.0", "@ethersproject/basex@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.7.0.tgz#97034dc7e8938a8ca943ab20f8a5e492ece4020b" + integrity sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/bignumber@5.6.2", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.6.2": version "5.6.2" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.2.tgz#72a0717d6163fab44c47bcc82e0c550ac0315d66" @@ -657,6 +722,15 @@ "@ethersproject/logger" "^5.6.0" bn.js "^5.2.1" +"@ethersproject/bignumber@5.7.0", "@ethersproject/bignumber@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2" + integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + bn.js "^5.2.1" + "@ethersproject/bytes@5.6.1", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" @@ -664,6 +738,13 @@ dependencies: "@ethersproject/logger" "^5.6.0" +"@ethersproject/bytes@5.7.0", "@ethersproject/bytes@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d" + integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A== + dependencies: + "@ethersproject/logger" "^5.7.0" + "@ethersproject/constants@5.6.1", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.1.tgz#e2e974cac160dd101cf79fdf879d7d18e8cb1370" @@ -671,6 +752,13 @@ dependencies: "@ethersproject/bignumber" "^5.6.2" +"@ethersproject/constants@5.7.0", "@ethersproject/constants@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e" + integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/contracts@5.6.2": version "5.6.2" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.6.2.tgz#20b52e69ebc1b74274ff8e3d4e508de971c287bc" @@ -687,6 +775,22 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/transactions" "^5.6.2" +"@ethersproject/contracts@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.7.0.tgz#c305e775abd07e48aa590e1a877ed5c316f8bd1e" + integrity sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg== + dependencies: + "@ethersproject/abi" "^5.7.0" + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/hash@5.6.1", "@ethersproject/hash@^5.0.4", "@ethersproject/hash@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.1.tgz#224572ea4de257f05b4abf8ae58b03a67e99b0f4" @@ -701,6 +805,21 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.1" +"@ethersproject/hash@5.7.0", "@ethersproject/hash@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7" + integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/hdnode@5.6.2", "@ethersproject/hdnode@^5.6.2": version "5.6.2" resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.6.2.tgz#26f3c83a3e8f1b7985c15d1db50dc2903418b2d2" @@ -719,6 +838,24 @@ "@ethersproject/transactions" "^5.6.2" "@ethersproject/wordlists" "^5.6.1" +"@ethersproject/hdnode@5.7.0", "@ethersproject/hdnode@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.7.0.tgz#e627ddc6b466bc77aebf1a6b9e47405ca5aef9cf" + integrity sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + "@ethersproject/json-wallets@5.6.1", "@ethersproject/json-wallets@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.6.1.tgz#3f06ba555c9c0d7da46756a12ac53483fe18dd91" @@ -738,6 +875,25 @@ aes-js "3.0.0" scrypt-js "3.0.1" +"@ethersproject/json-wallets@5.7.0", "@ethersproject/json-wallets@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.7.0.tgz#5e3355287b548c32b368d91014919ebebddd5360" + integrity sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g== + dependencies: + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + "@ethersproject/keccak256@5.6.1", "@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.1.tgz#b867167c9b50ba1b1a92bccdd4f2d6bd168a91cc" @@ -746,11 +902,24 @@ "@ethersproject/bytes" "^5.6.1" js-sha3 "0.8.0" +"@ethersproject/keccak256@5.7.0", "@ethersproject/keccak256@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a" + integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + js-sha3 "0.8.0" + "@ethersproject/logger@5.6.0", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.6.0": version "5.6.0" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== +"@ethersproject/logger@5.7.0", "@ethersproject/logger@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892" + integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig== + "@ethersproject/networks@5.6.4", "@ethersproject/networks@^5.6.3": version "5.6.4" resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.4.tgz#51296d8fec59e9627554f5a8a9c7791248c8dc07" @@ -758,6 +927,13 @@ dependencies: "@ethersproject/logger" "^5.6.0" +"@ethersproject/networks@5.7.0", "@ethersproject/networks@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.0.tgz#df72a392f1a63a57f87210515695a31a245845ad" + integrity sha512-MG6oHSQHd4ebvJrleEQQ4HhVu8Ichr0RDYEfHzsVAVjHNM+w36x9wp9r+hf1JstMXtseXDtkiVoARAG6M959AA== + dependencies: + "@ethersproject/logger" "^5.7.0" + "@ethersproject/pbkdf2@5.6.1", "@ethersproject/pbkdf2@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.6.1.tgz#f462fe320b22c0d6b1d72a9920a3963b09eb82d1" @@ -766,6 +942,14 @@ "@ethersproject/bytes" "^5.6.1" "@ethersproject/sha2" "^5.6.1" +"@ethersproject/pbkdf2@5.7.0", "@ethersproject/pbkdf2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102" + integrity sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/properties@5.6.0", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.6.0": version "5.6.0" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.6.0.tgz#38904651713bc6bdd5bdd1b0a4287ecda920fa04" @@ -773,6 +957,13 @@ dependencies: "@ethersproject/logger" "^5.6.0" +"@ethersproject/properties@5.7.0", "@ethersproject/properties@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30" + integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw== + dependencies: + "@ethersproject/logger" "^5.7.0" + "@ethersproject/providers@5.6.8": version "5.6.8" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.8.tgz#22e6c57be215ba5545d3a46cf759d265bb4e879d" @@ -799,6 +990,32 @@ bech32 "1.1.4" ws "7.4.6" +"@ethersproject/providers@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.0.tgz#a885cfc7650a64385e7b03ac86fe9c2d4a9c2c63" + integrity sha512-+TTrrINMzZ0aXtlwO/95uhAggKm4USLm1PbeCBR/3XZ7+Oey+3pMyddzZEyRhizHpy1HXV0FRWRMI1O3EGYibA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/base64" "^5.7.0" + "@ethersproject/basex" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/networks" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/web" "^5.7.0" + bech32 "1.1.4" + ws "7.4.6" + "@ethersproject/random@5.6.1", "@ethersproject/random@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.6.1.tgz#66915943981bcd3e11bbd43733f5c3ba5a790255" @@ -807,6 +1024,14 @@ "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" +"@ethersproject/random@5.7.0", "@ethersproject/random@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c" + integrity sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/rlp@5.6.1", "@ethersproject/rlp@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.1.tgz#df8311e6f9f24dcb03d59a2bac457a28a4fe2bd8" @@ -815,6 +1040,14 @@ "@ethersproject/bytes" "^5.6.1" "@ethersproject/logger" "^5.6.0" +"@ethersproject/rlp@5.7.0", "@ethersproject/rlp@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304" + integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2@5.6.1", "@ethersproject/sha2@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.1.tgz#211f14d3f5da5301c8972a8827770b6fd3e51656" @@ -824,6 +1057,15 @@ "@ethersproject/logger" "^5.6.0" hash.js "1.1.7" +"@ethersproject/sha2@5.7.0", "@ethersproject/sha2@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.7.0.tgz#9a5f7a7824ef784f7f7680984e593a800480c9fb" + integrity sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + hash.js "1.1.7" + "@ethersproject/signing-key@5.6.2", "@ethersproject/signing-key@^5.6.2": version "5.6.2" resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.2.tgz#8a51b111e4d62e5a62aee1da1e088d12de0614a3" @@ -836,6 +1078,18 @@ elliptic "6.5.4" hash.js "1.1.7" +"@ethersproject/signing-key@5.7.0", "@ethersproject/signing-key@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3" + integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + "@ethersproject/solidity@5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.6.1.tgz#5845e71182c66d32e6ec5eefd041fca091a473e2" @@ -848,6 +1102,18 @@ "@ethersproject/sha2" "^5.6.1" "@ethersproject/strings" "^5.6.1" +"@ethersproject/solidity@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.7.0.tgz#5e9c911d8a2acce2a5ebb48a5e2e0af20b631cb8" + integrity sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/sha2" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/strings@5.6.1", "@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.1.tgz#dbc1b7f901db822b5cafd4ebf01ca93c373f8952" @@ -857,6 +1123,15 @@ "@ethersproject/constants" "^5.6.1" "@ethersproject/logger" "^5.6.0" +"@ethersproject/strings@5.7.0", "@ethersproject/strings@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2" + integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/transactions@5.6.2", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.6.2": version "5.6.2" resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.2.tgz#793a774c01ced9fe7073985bb95a4b4e57a6370b" @@ -872,6 +1147,21 @@ "@ethersproject/rlp" "^5.6.1" "@ethersproject/signing-key" "^5.6.2" +"@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== + dependencies: + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/rlp" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/units@5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.6.1.tgz#ecc590d16d37c8f9ef4e89e2005bda7ddc6a4e6f" @@ -881,6 +1171,15 @@ "@ethersproject/constants" "^5.6.1" "@ethersproject/logger" "^5.6.0" +"@ethersproject/units@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.7.0.tgz#637b563d7e14f42deeee39245275d477aae1d8b1" + integrity sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg== + dependencies: + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/constants" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/wallet@5.6.2": version "5.6.2" resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.6.2.tgz#cd61429d1e934681e413f4bc847a5f2f87e3a03c" @@ -902,6 +1201,27 @@ "@ethersproject/transactions" "^5.6.2" "@ethersproject/wordlists" "^5.6.1" +"@ethersproject/wallet@5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.7.0.tgz#4e5d0790d96fe21d61d38fb40324e6c7ef350b2d" + integrity sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA== + dependencies: + "@ethersproject/abstract-provider" "^5.7.0" + "@ethersproject/abstract-signer" "^5.7.0" + "@ethersproject/address" "^5.7.0" + "@ethersproject/bignumber" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/hdnode" "^5.7.0" + "@ethersproject/json-wallets" "^5.7.0" + "@ethersproject/keccak256" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/random" "^5.7.0" + "@ethersproject/signing-key" "^5.7.0" + "@ethersproject/transactions" "^5.7.0" + "@ethersproject/wordlists" "^5.7.0" + "@ethersproject/web@5.6.1", "@ethersproject/web@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.1.tgz#6e2bd3ebadd033e6fe57d072db2b69ad2c9bdf5d" @@ -913,6 +1233,17 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.1" +"@ethersproject/web@5.7.0", "@ethersproject/web@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.0.tgz#40850c05260edad8b54827923bbad23d96aac0bc" + integrity sha512-ApHcbbj+muRASVDSCl/tgxaH2LBkRMEYfLOLVa0COipx0+nlu0QKet7U2lEg0vdkh8XRSLf2nd1f1Uk9SrVSGA== + dependencies: + "@ethersproject/base64" "^5.7.0" + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@ethersproject/wordlists@5.6.1", "@ethersproject/wordlists@^5.6.1": version "5.6.1" resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.6.1.tgz#1e78e2740a8a21e9e99947e47979d72e130aeda1" @@ -924,6 +1255,17 @@ "@ethersproject/properties" "^5.6.0" "@ethersproject/strings" "^5.6.1" +"@ethersproject/wordlists@5.7.0", "@ethersproject/wordlists@^5.7.0": + version "5.7.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5" + integrity sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA== + dependencies: + "@ethersproject/bytes" "^5.7.0" + "@ethersproject/hash" "^5.7.0" + "@ethersproject/logger" "^5.7.0" + "@ethersproject/properties" "^5.7.0" + "@ethersproject/strings" "^5.7.0" + "@google-cloud/datastore@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@google-cloud/datastore/-/datastore-7.0.0.tgz#e026db7d12c773230abf9e6b391a6196ef3fb81b" @@ -3628,6 +3970,42 @@ ethers@^5.0.13: "@ethersproject/web" "5.6.1" "@ethersproject/wordlists" "5.6.1" +ethers@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.0.tgz#0055da174b9e076b242b8282638bc94e04b39835" + integrity sha512-5Xhzp2ZQRi0Em+0OkOcRHxPzCfoBfgtOQA+RUylSkuHbhTEaQklnYi2hsWbRgs3ztJsXVXd9VKBcO1ScWL8YfA== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.0" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.0" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.0" + "@ethersproject/wordlists" "5.7.0" + ethjs-unit@0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699"