From 81b9a62e28f257137cd03da6d0e7fa6647e1ed85 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Mon, 12 Feb 2024 12:36:03 -0800 Subject: [PATCH] chore: Add verify-contract package --- packages/verify-contract/.eslintignore | 3 + packages/verify-contract/.eslintrc.json | 3 + packages/verify-contract/README.md | 144 ++ packages/verify-contract/cli.js | 3 + packages/verify-contract/jest.config.js | 11 + packages/verify-contract/package.json | 49 + packages/verify-contract/src/cli.ts | 132 + packages/verify-contract/src/common/abi.ts | 74 + packages/verify-contract/src/common/config.ts | 84 + .../verify-contract/src/common/etherscan.ts | 260 ++ packages/verify-contract/src/common/fs.ts | 17 + .../verify-contract/src/common/licenses.ts | 34 + packages/verify-contract/src/common/logger.ts | 72 + .../verify-contract/src/common/promises.ts | 32 + packages/verify-contract/src/common/schema.ts | 68 + packages/verify-contract/src/common/types.ts | 7 + packages/verify-contract/src/common/url.ts | 71 + .../src/hardhat-deploy/config.ts | 68 + .../src/hardhat-deploy/schema.ts | 31 + .../src/hardhat-deploy/types.ts | 44 + .../src/hardhat-deploy/verify.ts | 365 +++ packages/verify-contract/src/index.ts | 4 + .../test/__data__/deployments/fuji/.chainId | 1 + .../deployments/fuji/DistributeONFT721.json | 2291 +++++++++++++++++ .../deployments/fuji/ExampleOFTV2.json | 1820 +++++++++++++ .../fuji/ExampleUniversalONFT721.json | 1944 ++++++++++++++ .../__data__/deployments/fuji/GasDrop.json | 1110 ++++++++ .../fuji/LayerZeroExampleERC1155.json | 594 +++++ .../deployments/fuji/OmniCounter.json | 914 +++++++ .../deployments/fuji/ProxyONFT1155.json | 1404 ++++++++++ .../deployments/fuji/StargateComposed.json | 152 ++ .../renamed-testnet/GasDropRenamed.json | 1110 ++++++++ packages/verify-contract/test/abi.test.ts | 56 + packages/verify-contract/test/logger.test.ts | 17 + packages/verify-contract/test/url.test.ts | 34 + .../test/verify-hardhat-deploy.test.ts | 128 + packages/verify-contract/tsconfig.json | 15 + packages/verify-contract/tsup.config.ts | 33 + pnpm-lock.yaml | 62 +- tests-user/tests/verify-contract.bats | 15 + 40 files changed, 13274 insertions(+), 2 deletions(-) create mode 100644 packages/verify-contract/.eslintignore create mode 100644 packages/verify-contract/.eslintrc.json create mode 100644 packages/verify-contract/README.md create mode 100755 packages/verify-contract/cli.js create mode 100644 packages/verify-contract/jest.config.js create mode 100644 packages/verify-contract/package.json create mode 100644 packages/verify-contract/src/cli.ts create mode 100644 packages/verify-contract/src/common/abi.ts create mode 100644 packages/verify-contract/src/common/config.ts create mode 100644 packages/verify-contract/src/common/etherscan.ts create mode 100644 packages/verify-contract/src/common/fs.ts create mode 100644 packages/verify-contract/src/common/licenses.ts create mode 100644 packages/verify-contract/src/common/logger.ts create mode 100644 packages/verify-contract/src/common/promises.ts create mode 100644 packages/verify-contract/src/common/schema.ts create mode 100644 packages/verify-contract/src/common/types.ts create mode 100644 packages/verify-contract/src/common/url.ts create mode 100644 packages/verify-contract/src/hardhat-deploy/config.ts create mode 100644 packages/verify-contract/src/hardhat-deploy/schema.ts create mode 100644 packages/verify-contract/src/hardhat-deploy/types.ts create mode 100644 packages/verify-contract/src/hardhat-deploy/verify.ts create mode 100644 packages/verify-contract/src/index.ts create mode 100644 packages/verify-contract/test/__data__/deployments/fuji/.chainId create mode 100644 packages/verify-contract/test/__data__/deployments/fuji/DistributeONFT721.json create mode 100644 packages/verify-contract/test/__data__/deployments/fuji/ExampleOFTV2.json create mode 100644 packages/verify-contract/test/__data__/deployments/fuji/ExampleUniversalONFT721.json create mode 100644 packages/verify-contract/test/__data__/deployments/fuji/GasDrop.json create mode 100644 packages/verify-contract/test/__data__/deployments/fuji/LayerZeroExampleERC1155.json create mode 100644 packages/verify-contract/test/__data__/deployments/fuji/OmniCounter.json create mode 100644 packages/verify-contract/test/__data__/deployments/fuji/ProxyONFT1155.json create mode 100644 packages/verify-contract/test/__data__/deployments/fuji/StargateComposed.json create mode 100644 packages/verify-contract/test/__data__/deployments/renamed-testnet/GasDropRenamed.json create mode 100644 packages/verify-contract/test/abi.test.ts create mode 100644 packages/verify-contract/test/logger.test.ts create mode 100644 packages/verify-contract/test/url.test.ts create mode 100644 packages/verify-contract/test/verify-hardhat-deploy.test.ts create mode 100644 packages/verify-contract/tsconfig.json create mode 100644 packages/verify-contract/tsup.config.ts create mode 100644 tests-user/tests/verify-contract.bats diff --git a/packages/verify-contract/.eslintignore b/packages/verify-contract/.eslintignore new file mode 100644 index 000000000..0f295f243 --- /dev/null +++ b/packages/verify-contract/.eslintignore @@ -0,0 +1,3 @@ +.turbo +dist +node_modules \ No newline at end of file diff --git a/packages/verify-contract/.eslintrc.json b/packages/verify-contract/.eslintrc.json new file mode 100644 index 000000000..be97c53fb --- /dev/null +++ b/packages/verify-contract/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "../../.eslintrc.json" +} diff --git a/packages/verify-contract/README.md b/packages/verify-contract/README.md new file mode 100644 index 000000000..034d63a8f --- /dev/null +++ b/packages/verify-contract/README.md @@ -0,0 +1,144 @@ +

+ + LayerZero + +

+ +

@layerzerolabs/verify-contract

+ + +

+ + NPM Version + + Downloads + + NPM License +

+ +## Installation + +```bash +yarn add @layerzerolabs/verify-contract + +pnpm add @layerzerolabs/verify-contract + +npm install @layerzerolabs/verify-contract +``` + +## Usage + +### CLI + +This package comes with a CLI interface: + +```bash +npx @layerzerolabs/verify-contract --help +``` + +Using the CLI, contracts can be verified one network at a time. + +### Programatic usage + +The package provides two types of verification for hardhat deploy: _target_ and _non-target_. + +#### Target verification + +This is suitable for verifying contracts that have been the compilation targets for a deployment, i.e. they have their own deployment file. +This is the default and easiest case for which we know all the information we need from the deployment file. + +```typescript +import { verifyHardhatDeployTarget } from "@layerzerolabs/verify-contract"; + +// Programmatic usage allows for more fine-grained and multi-network verification +verifyHardhatDeployTarget({ + paths: { + deployments: "./my/little/deployments/folder", + }, + networks: { + whatachain: { + apiUrl: "https://api.whatachain.io/api", + apiKey: "david.hasselhoff.1234", + }, + }, + // The filter option allows you to limit the scope of verification to + // specific contracts + // + // It supports several ways of scoping the verification: + // + // A list of case-sensitive contract names + filter: ["Factory", "Router"], + // A single contract name + filter: "ONFT1155", + // Boolean to toggle the verification as a whole + filter: false, + // A function that gets passed the contract name and an relative contract path and returns a boolean to signify the contract needs to be verified + filter: (name, path) => name.startsWith("Potato721"), +}); +``` + +#### Non-target verification + +This is suitable for verifying contracts that have been e.g. deployed dynamically from other contracts within the deployment. + +In this case we need to know more information - the specific deployment file to use, the address of the contract and also its constructor arguments. + +```typescript +import { verifyHardhatDeployNonTarget } from "@layerzerolabs/verify-contract"; + +// Programmatic usage allows for more fine-grained and multi-network verification +verifyHardhatDeployNonTarget({ + paths: { + deployments: "./my/little/deployments/folder", + }, + networks: { + whatachain: { + apiUrl: "https://api.whatachain.io/api", + apiKey: "david.hasselhoff.1234", + }, + }, + // The contracts array is used to pass the contract details + contracts: [ + { + address: "0x0", + network: "whatachain", + // We'll need to pass the name of the deployment file to use (relative to the deployments path) + deployment: "OtherContract.json", + constructorArguments: [1000, "0x0"], + // In this case we'll need to pass a fully-qualified contract name + contractName: "contracts/examples/Pool.sol", + }, + ], +}); +``` + +### Default configuration + +The package is preconfigured for scan API URLs for several well-known networks: + +| Network | API URL | +| -------------------------------------------------------------- | ------------------------------------------------ | +| `avalanche`, `avalanche-mainnet` | `https://api.snowtrace.io/api` | +| `fuji`, `avalanche-testnet` | `https://api-testnet.snowtrace.io/api` | +| `bsc` | `https://api.bscscan.com/api` | +| `bsc-testnet` | `https://api-testnet.bscscan.com/api` | +| `ethereum` | `https://api.etherscan.io/api` | +| `ethereum-goerli` | `https://api-goerli.etherscan.io/api` | +| `goerli` | `https://api-goerli.etherscan.io/api` | +| `fantom` | `https://api.ftmscan.com/api` | +| `fantom-testnet` | `https://api-testnet.ftmscan.com/api` | +| `arbitrum` | `https://api.arbiscan.io/api` | +| `arbitrum-goerli` | `https://api-goerli.arbiscan.io/api` | +| `polygon` | `https://api.polygonscan.com/api` | +| `mumbai` | `https://api-testnet.polygonscan.com/api` | +| `optimism` | `https://api-optimistic.etherscan.io/api` | +| `optimism-goerli` | `https://api-goerli-optimistic.etherscan.io/api` | +| `gnosis` | `https://api.gnosisscan.io/api` | +| `zkpolygon`, `zkpolygon-mainnet` | `https://api-zkevm.polygonscan.com/api` | +| `base`, `base-mainnet` | `https://api.basescan.org/api` | +| `base-goerli` | `https://api-goerli.basescan.org/api` | +| `zkconsensys`, `zkconsensys-mainnet`, `linea`, `linea-mainnet` | `https://api.lineascan.build/api` | +| `moonbeam` | `https://api-moonbeam.moonscan.io/api` | +| `moonbeam-testnet` | `https://api-moonbase.moonscan.io/api` | +| `kava`, `kava-mainnet` | `https://kavascan.com/api` | +| `kava-testnet` | `https://testnet.kavascan.com/api` | diff --git a/packages/verify-contract/cli.js b/packages/verify-contract/cli.js new file mode 100755 index 000000000..24b54810e --- /dev/null +++ b/packages/verify-contract/cli.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node + +import('./dist/cli.js'); diff --git a/packages/verify-contract/jest.config.js b/packages/verify-contract/jest.config.js new file mode 100644 index 000000000..9de065f61 --- /dev/null +++ b/packages/verify-contract/jest.config.js @@ -0,0 +1,11 @@ +/** @type {import('ts-jest').JestConfigWithTsJest} */ +module.exports = { + cache: false, + testEnvironment: 'node', + moduleNameMapper: { + '^@/(.*)$': '/src/$1', + }, + transform: { + '^.+\\.(t|j)sx?$': '@swc/jest', + }, +}; diff --git a/packages/verify-contract/package.json b/packages/verify-contract/package.json new file mode 100644 index 000000000..c5f3b6b1b --- /dev/null +++ b/packages/verify-contract/package.json @@ -0,0 +1,49 @@ +{ + "name": "@layerzerolabs/verify-contract", + "version": "1.1.9", + "description": "Verify Solidity contracts on supported block explorers", + "bugs": { + "url": "https://github.com/LayerZero-Labs/devtools/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/LayerZero-Labs/devtools.git", + "directory": "packages/verify-contract" + }, + "license": "MIT", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist.index.d.ts", + "bin": "./cli.js", + "files": [ + "./dist/*", + "./cli.js", + "./cli/index.js", + "./cli/Solidity.tokens" + ], + "scripts": { + "build": "$npm_execpath tsup", + "clean": "rm -rf dist", + "dev": "$npm_execpath tsup --watch", + "lint": "$npm_execpath eslint '**/*.{js,ts,json}'", + "lint:fix": "eslint --fix '**/*.{js,ts,json}'", + "start": "node ./cli.js", + "test": "jest" + }, + "devDependencies": { + "@ethersproject/abi": "^5.7.0", + "@layerzerolabs/io-devtools": "~0.1.3", + "@solidity-parser/parser": "^0.16.1", + "@types/jest": "^29.5.12", + "@types/node": "^18.18.14", + "chalk": "^4.1.2", + "commander": "^11.1.0", + "esbuild-plugin-copy": "~2.1.1", + "got": "12.6.1", + "jest": "^29.7.0", + "ts-node": "^10.9.2", + "tsup": "^8.0.1", + "typescript": "^5.3.3", + "zod": "^3.22.4" + } +} diff --git a/packages/verify-contract/src/cli.ts b/packages/verify-contract/src/cli.ts new file mode 100644 index 000000000..d28de6422 --- /dev/null +++ b/packages/verify-contract/src/cli.ts @@ -0,0 +1,132 @@ +import { Command, InvalidOptionArgumentError, Option } from 'commander' +import { verifyTarget, verifyNonTarget } from './hardhat-deploy/verify' +import { COLORS } from './common/logger' +import { createLogger } from '@layerzerolabs/io-devtools' +import { VerifyHardhatNonTargetConfig, type VerifyHardhatTargetConfig } from './hardhat-deploy/types' +import { version } from '../package.json' + +const logLevelOption = new Option('-l,--log-level ', 'Log level') + .choices(['error', 'warn', 'info', 'http', 'verbose', 'debug', 'silly']) + .default('info') + +const deploymentsPathOption = new Option('-d,--deployments ', 'Path to the deployments folder') + +const dryRunOption = new Option( + '--dry-run', + 'Do not verify anything, just output the verifications that would be performed' +) + +const networkOption = new Option('-n,--network ', 'Network to verify').makeOptionMandatory() + +const apiUrlOption = new Option('-u,--api-url ', 'Scan API URL (fully qualified, with protocol and path)') + +const apiKeyOption = new Option('-k,--api-key ', 'Scan API Key') + +const verifyNonTargetCommand = new Command('non-target') + .description( + 'Verifies a contract that does not have its own deployment file, i.e. has not been a target of a deployment' + ) + .addOption(logLevelOption) + .addOption(dryRunOption) + .addOption(deploymentsPathOption) + .addOption(networkOption) + .addOption(apiUrlOption) + .addOption(apiKeyOption) + .requiredOption('--address
', 'Contract address to verify') + .requiredOption('--name ', 'Fully qualified contract name to verify, e.g. contracts/MyToken.sol') + .requiredOption('--deployment ', 'Deployment file name, e.g. MyOtherToken.json') + .option( + '--arguments ', + 'JSON encoded array of constructor arguments, e.g. [1234, "0x0"]', + (value: string) => { + try { + const decoded = JSON.parse(value) + if (!Array.isArray(decoded)) { + throw new Error(`Constructor arguments must be an array, got ${decoded}`) + } + + return decoded + } catch (error) { + throw new InvalidOptionArgumentError(`Malformed constructor arguments specified: ${error}`) + } + } + ) + .action(async (args: any) => { + const logger = createLogger(args.logLevel) + const config: VerifyHardhatNonTargetConfig = { + dryRun: args.dryRun, + paths: { + deployments: args.deployments, + }, + networks: { + [args.network]: { + apiUrl: args.apiUrl, + apiKey: args.apiKey, + }, + }, + contracts: [ + { + network: args.network, + address: args.address, + contractName: args.name, + deployment: args.deployment, + constructorArguments: args.arguments, + }, + ], + } + + try { + await verifyNonTarget(config, logger) + } catch (error) { + logger.error(COLORS.error`The verification script exited with an error: ${error}`) + + process.exit(1) + } + }) + +const verifyTargetCommand = new Command('target') + .description('Verifies contracts that have been a part of a deployment, i.e. have their own deployment files') + .addOption(logLevelOption) + .addOption(dryRunOption) + .addOption(deploymentsPathOption) + .addOption(networkOption) + .addOption(apiUrlOption) + .addOption(apiKeyOption) + .option( + '-c,--contracts ', + 'Comma-separated list of case-sensitive contract names to verify', + (value: string | null | undefined) => { + return value?.trim() ? value.split(',').map((c: string) => c.trim()) : undefined + } + ) + .action(async (args: any) => { + const logger = createLogger(args.logLevel) + const config: VerifyHardhatTargetConfig = { + dryRun: args.dryRun, + paths: { + deployments: args.deployments, + }, + networks: { + [args.network]: { + apiUrl: args.apiUrl, + apiKey: args.apiKey, + }, + }, + filter: args.contracts, + } + + try { + await verifyTarget(config, logger) + } catch (error) { + logger.error(COLORS.error`The verification script exited with an error: ${error}`) + + process.exit(1) + } + }) + +new Command('@layerzerolabs/verify-contract') + .version(version) + .description('Verify a set of contracts based on hardhat-deploy outputs') + .addCommand(verifyNonTargetCommand) + .addCommand(verifyTargetCommand, { isDefault: true }) + .parseAsync() diff --git a/packages/verify-contract/src/common/abi.ts b/packages/verify-contract/src/common/abi.ts new file mode 100644 index 000000000..681060478 --- /dev/null +++ b/packages/verify-contract/src/common/abi.ts @@ -0,0 +1,74 @@ +import assert from 'assert' +import { Interface } from '@ethersproject/abi' +import { type MinimalAbi } from './schema' +import * as parser from '@solidity-parser/parser' +import { TypeName, type FunctionDefinition } from '@solidity-parser/parser/dist/src/ast-types' + +/** + * Helper function that takes a contract ABI and constructor + * arguments and serializes them for submission to scan + * + * @param abi ABI in any format that ethers understand + * @param args Constructor arguments + * @returns + */ +export const encodeContructorArguments = (abi: any[], args: unknown[] | undefined): string | undefined => { + if (args == null || args.length === 0) return undefined + + const iface = new Interface(abi) + const encodedConstructorArguments = iface.encodeDeploy(args) + + // Scan APIs expect the string not to contain the leading 0x + return encodedConstructorArguments.slice(2) +} + +export const getContructorABIFromSource = (source: string): MinimalAbi => { + try { + // First we'll parse the source code and get the AST + const ast = parser.parse(source) + + // We'll look for the constructor definition by visiting nodes + let constructorDefinition: FunctionDefinition | undefined + parser.visit(ast, { + FunctionDefinition: (node) => { + if (node.isConstructor) constructorDefinition = node + }, + }) + + // At this point we should have the constructor definition, + // if not we'll yell + assert(constructorDefinition != null, `Could not find constructor definition`) + + // Now it's time to create a pruned version of an ABI + const abi = [ + { + type: 'constructor', + inputs: constructorDefinition.parameters.map(({ typeName }, index) => { + // Let's check everything we can + assert(typeName != null, `Missing a type definition for constructor parameter at position ${index}`) + + return { type: getTypeFromTypeName(typeName) } + }), + }, + ] + + return abi + } catch (error) { + throw new Error(`Could not get an ABI from contract source: ${error}`) + } +} + +const getTypeFromTypeName = (typeName: TypeName): string => { + switch (typeName.type) { + case 'ElementaryTypeName': + return typeName.name + + case 'ArrayTypeName': + return `${getTypeFromTypeName(typeName.baseTypeName)}[]` + + default: + throw new Error( + `Only primitive and array types are currently supported when constructing ABI from contract source, got ${typeName.type}` + ) + } +} diff --git a/packages/verify-contract/src/common/config.ts b/packages/verify-contract/src/common/config.ts new file mode 100644 index 000000000..5c0ba97f3 --- /dev/null +++ b/packages/verify-contract/src/common/config.ts @@ -0,0 +1,84 @@ +import { type Logger } from 'winston' +import type { NetworkConfig, NetworkName } from './types' +import { getDefaultScanApiUrl, tryGetScanBrowserUrlFromScanUrl } from './url' +import assert from 'assert' +import { COLORS } from './logger' +import chalk from 'chalk' + +export const parseNetworksConfig = ( + logger: Logger, + partialNetworksConfig: Record> | null | undefined +): Record => { + return Object.entries(partialNetworksConfig ?? {}).reduce((networksConfig, [networkName, networkConfig]) => { + // In case the config is not defined let's just go to the next one + if (networkConfig == null) return networksConfig + + // The API URL can either be specified: + // + // - explicitly in the network config + // - explicitly using an environment variable + // - implicitly by using the default value + const apiUrl = networkConfig.apiUrl || getScanApiUrlFromEnv(networkName) || getDefaultScanApiUrl(networkName) + + // Unfortunately when API URL is not specified we just fail fail fail + assert( + apiUrl, + COLORS.error`Missing scan API URL for network ${COLORS.default(networkName)} + +Please provide the API URL: + +- As an apiUrl config parameter in ${networkName} config +- As a SCAN_API_URL_${networkName} enviornment variable +- As a SCAN_API_URL_${normalizeNetworkName(networkName)} enviornment variable +` + ) + + // API key on the other hand is optional so if it's not there we just let the user know and move on + const apiKey = networkConfig.apiKey || getScanApiKeyFromEnv(networkName) + if (!apiKey) { + logger.debug(`Could not find scan API key for network ${chalk.bold(networkName)} + +Please provide the API key: + +- As an apiKey config parameter in ${networkName} config +- As a SCAN_API_KEY_${networkName} enviornment variable +- As a SCAN_API_KEY_${normalizeNetworkName(networkName)} enviornment variable`) + } + + // Similar thing goes for scan browser URL, if not provided then life goes on + // but eyebrows will be raised + const browserUrl = + networkConfig.browserUrl || getScanBrowserUrlFromEnv(networkName) || tryGetScanBrowserUrlFromScanUrl(apiUrl) + if (!browserUrl) { + logger.debug(`Could not find scan browser URL key for network ${chalk.bold(networkName)} + + Browser URL is used to display a link to the verified contract + after successful verification. + + Please provide the browser URL: + + - As an browserUrl config parameter in ${networkName} config + - As a SCAN_BROWSER_URL_${networkName} enviornment variable + - As a SCAN_BROWSER_URL_${normalizeNetworkName(networkName)} enviornment variable`) + } + + return { + ...networksConfig, + [networkName]: { apiUrl, apiKey, browserUrl }, + } + }, {}) +} + +const getScanApiUrlFromEnv = (networkName: NetworkName): string | undefined => + process.env[`SCAN_API_URL_${networkName}`]?.trim() || + process.env[`SCAN_API_URL_${normalizeNetworkName(networkName)}`]?.trim() + +const getScanBrowserUrlFromEnv = (networkName: NetworkName): string | undefined => + process.env[`SCAN_BROWSER_URL_${networkName}`]?.trim() || + process.env[`SCAN_BROWSER_URL_${normalizeNetworkName(networkName)}`]?.trim() + +const getScanApiKeyFromEnv = (networkName: NetworkName): string | undefined => + process.env[`SCAN_API_KEY_${networkName}`]?.trim() || + process.env[`SCAN_API_KEY_${normalizeNetworkName(networkName)}`]?.trim() + +const normalizeNetworkName = (networkName: NetworkName): string => networkName.toUpperCase().replaceAll('-', '_') diff --git a/packages/verify-contract/src/common/etherscan.ts b/packages/verify-contract/src/common/etherscan.ts new file mode 100644 index 000000000..13bcd1cfa --- /dev/null +++ b/packages/verify-contract/src/common/etherscan.ts @@ -0,0 +1,260 @@ +import { type Logger } from '@layerzerolabs/io-devtools' +import { LicenseType } from './licenses' +import { z } from 'zod' +import { retry, sleep } from './promises' +import EventEmitter from 'events' +import got from 'got' + +export interface SubmitForVerificationProps { + apiKey?: string + apiUrl: string + address: string + contractName: string + compilerVersion: string + optimizerRuns?: number + licenseType?: LicenseType + sourceCode: string + constructorArguments?: string + evmVersion?: string +} + +interface SubmitForVerificationRequest { + apikey?: string + action: 'verifysourcecode' + module: 'contract' + contractaddress: string + codeformat: 'solidity-single-file' | 'solidity-standard-json-input' + contractname: string + compilerversion: `v${string}` + optimizationUsed: '0' | '1' + runs?: string + constructorArguements?: string + evmversion?: string + licenseType?: string + sourceCode: string +} + +export interface VerificationResponse { + alreadyVerified: boolean +} + +export type VerificationRetryHandler = (error: unknown, attempt: number) => void + +export type VerificationPollHandler = (guid: string) => void + +export interface IVerification { + verify(): Promise + + on(event: 'retry', handler: VerificationRetryHandler): void + off(event: 'retry', handler: VerificationRetryHandler): void + + on(event: 'poll', handler: VerificationPollHandler): void + off(event: 'poll', handler: VerificationPollHandler): void +} + +class Verification extends EventEmitter implements IVerification { + constructor( + private readonly props: SubmitForVerificationProps, + private readonly logger: Logger + ) { + super() + } + + public async verify(): Promise { + try { + this.logger.verbose( + `Submitting verification for ${this.props.contractName} on address ${this.props.address} to ${this.props.apiUrl}` + ) + + const response = await this.__submit() + + this.logger.verbose( + `Received response for ${this.props.contractName} on address ${this.props.address} to ${this.props.apiUrl}` + ) + this.logger.verbose(JSON.stringify(response)) + + // If the contract is already verified, we'll return false to signify that + if (isAlreadyVerifiedResult(response.result)) { + return { + alreadyVerified: true, + } + } + + // At this point the only reasonable way things can go is success + // so if the API status is not 1, something is off + // + // And we'll throw oh boi oh boi we'll throw + if (response.status !== 1) { + throw new Error( + `Verification failed with result "${response.result}", status ${response.status} (${response.message})` + ) + } + + const guid = response.result + if (guid == null) { + throw new Error(`Missing GUID from the response: ${response}`) + } + + return await this.__poll(guid) + } catch (error) { + throw new Error(`Verification error: ${error}`) + } + } + + private async __submit(): Promise { + const request = createVerificationRequest(this.props) + + this.logger.verbose(`Sending verification request to ${this.props.apiUrl}:\n\n${JSON.stringify(request)}`) + + return await retry( + async () => { + // We'll retry if the request itself fails + const response = await submitRequest(this.props.apiUrl, request) + + this.logger.verbose(`Received raw response from ${this.props.apiUrl}:\n\n${JSON.stringify(response)}`) + + // If we got rate limited, we'll retry as well + if (isApiRateLimitedResult(response.result)) { + throw new Error(`API Rate limit has been exceeded`) + } + + return response + }, + // We'll retry 3 times because 3 is a magic number + 3, + // If an error happens while retrying, we'll let the upstream know + async (error, attempt) => { + this.emit('retry', error, attempt) + + // We'll wait a bit after every failed attempt + await sleep(2000) + } + ) + } + + private async __poll(guid: string): Promise { + // eslint-disable-next-line no-constant-condition + while (true) { + this.emit('poll', guid) + + const result = await checkGuid(this.props.apiUrl, guid) + this.logger.verbose(`Received raw polling response from ${this.props.apiUrl}:\n\n${JSON.stringify(result)}`) + + if (result.status === 1) + return { + alreadyVerified: false, + } + + if (isAlreadyVerifiedResult(result.result)) + return { + alreadyVerified: true, + } + + if (isPendingResult(result.result)) { + await sleep(10_000) + continue + } + + if (isApiRateLimitedResult(result.result)) { + await sleep(10_000) + continue + } + + throw new Error( + `Verification failed with result "${result.result}", status ${result.status} (${result.message})` + ) + } + } +} + +export const createVerification = (props: SubmitForVerificationProps, logger: Logger): IVerification => + new Verification(props, logger) + +const isPendingResult = (result: string | null | undefined): boolean => !!result?.match(/Pending/gi) + +const isAlreadyVerifiedResult = (result: string | null | undefined): boolean => !!result?.match(/already verified/gi) + +const isApiRateLimitedResult = (result: string | null | undefined): boolean => !!result?.match(/rate/) + +const submitRequest = async (apiUrl: string, request: SubmitForVerificationRequest): Promise => { + try { + const response = await got(apiUrl, { + method: 'POST', + form: request, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', + }, + }).json() + + return ScanResponseSchema.parse(response) + } catch (error) { + throw new Error(`Failed to submit verification request: ${error}`) + } +} + +/** + * Helper function that will try to get the verification result by GUID + */ +const checkGuid = async (apiUrl: string, guid: string): Promise => { + const url = new URL(apiUrl) + url.searchParams.set('module', 'contract') + url.searchParams.set('action', 'checkverifystatus') + url.searchParams.set('guid', guid) + + try { + const data = await got(url).json() + + return ScanResponseSchema.parse(data) + } catch (error) { + throw new Error(`Failed to check verification status: ${error}`) + } +} + +/** + * Helper function that formats the scan API request + * for consumption by the API. + * + * Scan APIs have some peculiarities like typos and version prefixes + * which this function needs to handle + * + * @param props SubmitForVerificationProps + * @returns SubmitForVerificationRequest + */ +const createVerificationRequest = ({ + apiKey, + address, + contractName, + constructorArguments, + compilerVersion, + optimizerRuns = 0, + sourceCode, + evmVersion, + licenseType, +}: SubmitForVerificationProps): SubmitForVerificationRequest => { + const request: SubmitForVerificationRequest = { + action: 'verifysourcecode', + module: 'contract', + codeformat: 'solidity-standard-json-input', + contractaddress: address, + contractname: contractName, + compilerversion: `v${compilerVersion}`, + optimizationUsed: optimizerRuns > 0 ? '1' : '0', + sourceCode, + } + + if (apiKey != null) request.apikey = apiKey + if (optimizerRuns != null) request.runs = String(optimizerRuns) + if (constructorArguments != null) request.constructorArguements = constructorArguments + if (evmVersion != null) request.evmversion = evmVersion + if (licenseType != null) request.licenseType = String(licenseType) + + return request +} + +type ScanResponse = z.TypeOf + +const ScanResponseSchema = z.object({ + status: z.coerce.number().nullish(), + message: z.string().nullish(), + result: z.string().nullish(), +}) diff --git a/packages/verify-contract/src/common/fs.ts b/packages/verify-contract/src/common/fs.ts new file mode 100644 index 000000000..0ab8f37c5 --- /dev/null +++ b/packages/verify-contract/src/common/fs.ts @@ -0,0 +1,17 @@ +import { lstatSync } from 'fs' + +export const isDirectory = (pathlike: string): boolean => { + try { + return lstatSync(pathlike).isDirectory() + } catch { + return false + } +} + +export const isFile = (pathlike: string): boolean => { + try { + return lstatSync(pathlike).isFile() + } catch { + return false + } +} diff --git a/packages/verify-contract/src/common/licenses.ts b/packages/verify-contract/src/common/licenses.ts new file mode 100644 index 000000000..ba3da775d --- /dev/null +++ b/packages/verify-contract/src/common/licenses.ts @@ -0,0 +1,34 @@ +export enum LicenseType { + None = 1, + Unlicense = 2, + MIT = 3, + 'GNU-GPLv2' = 4, + 'GNU-GPLv3' = 5, + 'GNU-LGPLv2.1' = 6, + 'GNU-LGPLv3' = 7, + 'BSD-2-Clause' = 8, + 'BSD-3-Clause' = 9, + 'MPL-2.0' = 10, + 'OSL-3.0' = 11, + 'Apache-2.0' = 12, + 'GNU-AGPLv3' = 13, + 'BUSL-1.1' = 14, +} + +/** + * Helper function to get the license identifier from the contract + * + * @param sourceCode The solidity code of the contract + * @returns + */ +export const findLicenseType = (sourceCode: string): LicenseType => { + const matches = sourceCode.match(/\/\/\s*SPDX-License-Identifier:\s*(.*)\s*/i) + const licenseName = matches?.[1] + + if (licenseName == null) return LicenseType.None + if (!(licenseName in LicenseType)) { + console.warn('Found unknown SPDX license identifier: %s', licenseName) + } + + return LicenseType[licenseName as keyof typeof LicenseType] +} diff --git a/packages/verify-contract/src/common/logger.ts b/packages/verify-contract/src/common/logger.ts new file mode 100644 index 000000000..3c768a3e1 --- /dev/null +++ b/packages/verify-contract/src/common/logger.ts @@ -0,0 +1,72 @@ +import chalk from 'chalk' +import { type Logger } from '@layerzerolabs/io-devtools' + +export const COLORS = { + default: chalk.white, + error: chalk.red, + success: chalk.green, + palette: [ + chalk.magenta, + chalk.cyan, + chalk.yellow, + chalk.blue, + chalk.magentaBright, + chalk.cyanBright, + chalk.blueBright, + ], +} + +/** + * Helper utility for anonymizing values printed out to the user, + * this is useful for displaying partial API keys + * + * @param value + * @returns + */ +export const anonymizeValue = (value: string): string => { + const visibleLength = Math.min(Math.max(0, value.length - 2), 4) + const invisibleLength = value.length - visibleLength + + const visiblePart = value.slice(0, visibleLength) + const invisiblePart = Array.from({ length: invisibleLength }).fill('*').join('') + + return `${visiblePart}${invisiblePart}` +} + +type LoggableValue = string | number | boolean | bigint | null | undefined +type LoggableRecord = Record + +export type RecordLogger = (record: LoggableRecord) => void + +export const createRecordLogger = + (logger: Logger, separator = '\t'): RecordLogger => + (record: LoggableRecord): void => { + logger.info('') + + Object.entries(record).forEach(([label, value]) => { + if (Array.isArray(value)) { + logger.info(`${label}:`) + + value.forEach((item) => { + logger.info(`${separator}\t- ${chalk.bold(formatLoggableValue(item))}`) + }) + } else { + logger.info(`${label}:${separator}${chalk.bold(formatLoggableValue(value))}`) + } + }) + } + +const formatLoggableValue = (value: LoggableValue): string => { + if (value == null) return '-' + + switch (typeof value) { + case 'boolean': + return value ? TRUE_SYMBOL : FALSE_SYMBOL + + default: + return String(value) + } +} + +const TRUE_SYMBOL = COLORS.success`✓` +const FALSE_SYMBOL = COLORS.error`⚠` diff --git a/packages/verify-contract/src/common/promises.ts b/packages/verify-contract/src/common/promises.ts new file mode 100644 index 000000000..4c1ee20a3 --- /dev/null +++ b/packages/verify-contract/src/common/promises.ts @@ -0,0 +1,32 @@ +import assert from 'assert' + +export const sleep = (timeout: number) => + new Promise((resolve) => { + setTimeout(resolve, timeout) + }) + +/** + * Simple async retry functionality + * + * The onretry callback is async and will be awaited which allows for + * custom timeout functionality + */ +export const retry = async ( + callback: () => Promise, + numAttempts: number, + onRetry?: (error: unknown, attempt: number) => unknown +): Promise => { + assert(numAttempts > 0, `Number of attempts for retry must be larger than 0, got ${numAttempts}`) + + // We'll try/catch the first N - 1 attempts, invoking onRetry after every failed attempt + for (let attempt = 0; attempt < numAttempts - 1; attempt++) { + try { + return await callback() + } catch (error) { + await onRetry?.(error, attempt) + } + } + + // The last attempt we don't try/catch and let the error propagate to the user + return callback() +} diff --git a/packages/verify-contract/src/common/schema.ts b/packages/verify-contract/src/common/schema.ts new file mode 100644 index 000000000..eb191cbf4 --- /dev/null +++ b/packages/verify-contract/src/common/schema.ts @@ -0,0 +1,68 @@ +import { z } from 'zod' + +export const OptimizerSchema = z.object({ + enabled: z.boolean().optional(), + runs: z.number().optional(), +}) + +export const SourcesSchema = z.record( + z.string(), + z.object({ + content: z.string(), + }) +) + +export type MinimalAbi = z.TypeOf + +export const MinimalAbiSchema = z.array(z.record(z.string(), z.any())) + +export type Metadata = z.TypeOf + +export const MetadataSchema = z.object({ + language: z.string(), + compiler: z.object({ + version: z.string(), + }), + settings: z.object({ + compilationTarget: z.record(z.string(), z.string()), + evmVersion: z.string(), + optimizer: z.object({ + enabled: z.boolean().optional(), + runs: z.number().optional(), + }), + }), + sources: z.record( + z.string(), + z.object({ + content: z.string(), + }) + ), +}) + +export type Deployment = z.TypeOf + +export const DeploymentSchema = z.object({ + address: z.string(), + // The ABI schema from e.g. abitype is failing for the deployment files + // so we'll use a simplified but more tolerant schema + // + // Since zod will remove all the args we don't pass here, we need to include + // what's necessary for further processing - fragment & input types + abi: MinimalAbiSchema, + args: z.array(z.any()), + solcInputHash: z.string(), + metadata: z + .string() + .transform((value, ctx) => { + try { + return JSON.parse(value) + } catch (e) { + ctx.addIssue({ code: 'custom', message: 'Invalid JSON' }) + + return z.NEVER + } + }) + .pipe(MetadataSchema), + bytecode: z.string(), + deployedBytecode: z.string(), +}) diff --git a/packages/verify-contract/src/common/types.ts b/packages/verify-contract/src/common/types.ts new file mode 100644 index 000000000..0479f54d0 --- /dev/null +++ b/packages/verify-contract/src/common/types.ts @@ -0,0 +1,7 @@ +export type NetworkName = string + +export interface NetworkConfig { + apiUrl: string + apiKey?: string + browserUrl?: string +} diff --git a/packages/verify-contract/src/common/url.ts b/packages/verify-contract/src/common/url.ts new file mode 100644 index 000000000..ccfd29267 --- /dev/null +++ b/packages/verify-contract/src/common/url.ts @@ -0,0 +1,71 @@ +import { type NetworkName } from './types' + +export const getDefaultScanApiUrl = (networkName: string): string | undefined => DEFAULT_SCAN_API_URLS.get(networkName) + +/** + * Tries to use the scan API url to get a scan browser URL + * + * This will only work for URLs that starts with api. + * + * @param scanApiUrl + * @returns + */ +export const tryGetScanBrowserUrlFromScanUrl = (scanApiUrl: string): string | undefined => { + try { + const urlObject = new URL(scanApiUrl) + if (!urlObject.hostname.startsWith('api.') && !urlObject.hostname.startsWith('api-')) return undefined + + urlObject.hostname = urlObject.hostname.replace(/^api[.-]/, '') + urlObject.pathname = '/' + + return urlObject.toString() + } catch { + return undefined + } +} + +export const tryCreateScanContractUrl = (scanBrowserUrl: string, address: string): string | undefined => { + try { + const urlObject = new URL(scanBrowserUrl) + urlObject.pathname = `/address/${address}` + + return urlObject.toString() + } catch { + return undefined + } +} + +const DEFAULT_SCAN_API_URLS: Map = new Map([ + ['avalanche', 'https://api.snowtrace.io/api'], + ['avalanche-mainnet', 'https://api.snowtrace.io/api'], + ['fuji', 'https://api-testnet.snowtrace.io/api'], + ['avalanche-testnet', 'https://api-testnet.snowtrace.io/api'], + ['arbitrum', 'https://api.arbiscan.io/api'], + ['arbitrum-goerli', 'https://api-goerli.arbiscan.io/api'], + ['bsc', 'https://api.bscscan.com/api'], + ['bsc-testnet', 'https://api-testnet.bscscan.com/api'], + ['ethereum', 'https://api.etherscan.io/api'], + ['ethereum-goerli', 'https://api-goerli.etherscan.io/api'], + ['goerli', 'https://api-goerli.etherscan.io/api'], + ['fantom', 'https://api.ftmscan.com/api'], + ['fantom-testnet', 'https://api-testnet.ftmscan.com/api'], + ['kava', 'https://kavascan.com/api'], + ['kava-mainnet', 'https://kavascan.com/api'], + ['kava-testnet', 'https://testnet.kavascan.com/api'], + ['polygon', 'https://api.polygonscan.com/api'], + ['mumbai', 'https://api-testnet.polygonscan.com/api'], + ['optimism', 'https://api-optimistic.etherscan.io/api'], + ['optimism-goerli', 'https://api-goerli-optimistic.etherscan.io/api'], + ['gnosis', 'https://api.gnosisscan.io/api'], + ['zkpolygon', 'https://api-zkevm.polygonscan.com/api'], + ['zkpolygon-mainnet', 'https://api-zkevm.polygonscan.com/api'], + ['base', 'https://api.basescan.org/api'], + ['base-mainnet', 'https://api.basescan.org/api'], + ['base-goerli', 'https://api-goerli.basescan.org/api'], + ['linea', 'https://api.lineascan.build/api'], + ['linea-mainnet', 'https://api.lineascan.build/api'], + ['zkconsensys', 'https://api.lineascan.build/api'], + ['zkconsensys-mainnet', 'https://api.lineascan.build/api'], + ['moonbeam', 'https://api-moonbeam.moonscan.io/api'], + ['moonbeam-testnet', 'https://api-moonbase.moonscan.io/api'], +]) diff --git a/packages/verify-contract/src/hardhat-deploy/config.ts b/packages/verify-contract/src/hardhat-deploy/config.ts new file mode 100644 index 000000000..eaa70ef88 --- /dev/null +++ b/packages/verify-contract/src/hardhat-deploy/config.ts @@ -0,0 +1,68 @@ +import { VerifyHardhatFilterConfig, VerifyHardhatFilterFunction, VerifyHardhatPathsConfig } from './types' +import path from 'path' + +export const parsePathsConfig = ( + partialPathsConfig: Partial | null | undefined +): VerifyHardhatPathsConfig => ({ + deployments: partialPathsConfig?.deployments ?? path.resolve(process.cwd(), 'deployments'), +}) + +/** + * Takes VerifyHardhatFilterConfig and turns it into a verify function + * + * What does that mean? + * + * Well + * + * VerifyHardhatFilterConfig supports multiple ways of specifying which contracts + * to verify: + * + * - `string` matched against the contract name (case-sensitive) + * - `RegExp` matched against the contract name + * - `boolean` that enables/disabled verification for all contracts + * - `string[]` in which case the contract name is matched against against the elements of the array (case-sensitive) + * - `function` that gets passed the contract name and the contract path and returns a boolean to indicate whether that contract should be verified + * + * Before the verification script is ran, all of these configuration options + * are turned into a `function` (the last option) so that we can use this config in a uniform way + * without having to deal with all these cases in the script code + * + * @param filterConfig + * @returns VerifyHardhatFilterFunction + */ +export const parseFilterConfig = ( + filterConfig: VerifyHardhatFilterConfig | null | undefined +): VerifyHardhatFilterFunction => { + if (filterConfig == null) return () => true + + switch (typeof filterConfig) { + case 'boolean': + return () => filterConfig + + case 'string': + return (name) => name === filterConfig + + case 'function': + return filterConfig + + case 'object': + if (Array.isArray(filterConfig)) { + const contractsToVerify = new Set(filterConfig) + + return (name) => contractsToVerify.has(name) + } + + if (filterConfig instanceof RegExp) { + return (name) => filterConfig.test(name) + } + + throw new TypeError( + `Invalid verify configuration: expected string, string[], boolean, function or a RegExp, got ${filterConfig}` + ) + + default: + throw new TypeError( + `Invalid verify configuration: expected string, string[], boolean, function or a RegExp, got ${filterConfig}` + ) + } +} diff --git a/packages/verify-contract/src/hardhat-deploy/schema.ts b/packages/verify-contract/src/hardhat-deploy/schema.ts new file mode 100644 index 000000000..6e8c7b041 --- /dev/null +++ b/packages/verify-contract/src/hardhat-deploy/schema.ts @@ -0,0 +1,31 @@ +import { Metadata } from '../common/schema' + +/** + * Helper function that takes the metadata from hardhat deploy + * deployment file and reformats it to match solcInput format + * + * In general the metadata is a superset of solcInputs and contains + * additional information that breaks some of the scan APIs (e.g. BSC scan + * will fail verification if raw metadata has been sent) + * + * @param metadata Metadata + * @returns + */ +export const extractSolcInputFromMetadata = (metadata: Metadata) => { + const { compilationTarget: _, ...settings } = metadata.settings + const sources = Object.entries(metadata.sources).reduce( + (sources, [contractPath, source]) => ({ + ...sources, + [contractPath]: { + content: source.content, + }, + }), + {} + ) + + return { + language: metadata.language, + settings, + sources, + } +} diff --git a/packages/verify-contract/src/hardhat-deploy/types.ts b/packages/verify-contract/src/hardhat-deploy/types.ts new file mode 100644 index 000000000..9fe6df349 --- /dev/null +++ b/packages/verify-contract/src/hardhat-deploy/types.ts @@ -0,0 +1,44 @@ +import { SubmitForVerificationProps, VerificationResponse } from '../common/etherscan' +import type { NetworkName, NetworkConfig } from '../common/types' + +export interface VerifyHardhatPathsConfig { + deployments: string +} + +export type VerifyHardhatFilterConfig = boolean | string | string[] | RegExp | VerifyHardhatFilterFunction + +export type VerifyHardhatFilterFunction = (name: string, path: string, networkName: NetworkName) => boolean + +export interface VerifyHardhatBaseConfig { + paths?: Partial + networks?: Record> + dryRun?: boolean +} + +export interface VerifyHardhatTargetConfig extends VerifyHardhatBaseConfig { + filter?: VerifyHardhatFilterConfig +} + +export interface VerifyHardhatContractConfig { + network: NetworkName + address: string + deployment: string + contractName: string + constructorArguments?: unknown[] +} + +export interface VerifyHardhatNonTargetConfig extends VerifyHardhatBaseConfig { + contracts: VerifyHardhatContractConfig[] +} + +export interface VerificationArtifact { + networkName: string + networkConfig: NetworkConfig + submitProps: SubmitForVerificationProps +} + +export interface VerificationResult { + artifact: VerificationArtifact + response?: VerificationResponse + error?: unknown +} diff --git a/packages/verify-contract/src/hardhat-deploy/verify.ts b/packages/verify-contract/src/hardhat-deploy/verify.ts new file mode 100644 index 000000000..2be09623b --- /dev/null +++ b/packages/verify-contract/src/hardhat-deploy/verify.ts @@ -0,0 +1,365 @@ +import { parseNetworksConfig } from '../common/config' +import { basename, resolve } from 'path' +import { findLicenseType } from '../common/licenses' +import { SubmitForVerificationProps, createVerification } from '../common/etherscan' +import chalk from 'chalk' +import { COLORS, RecordLogger, anonymizeValue, createRecordLogger } from '../common/logger' +import { tryCreateScanContractUrl } from '../common/url' +import { DeploymentSchema } from '../common/schema' +import { extractSolcInputFromMetadata } from './schema' +import { encodeContructorArguments, getContructorABIFromSource } from '../common/abi' +import type { + VerificationArtifact, + VerificationResult, + VerifyHardhatNonTargetConfig, + VerifyHardhatTargetConfig, +} from './types' +import { parseFilterConfig, parsePathsConfig } from './config' +import { isDirectory, isFile } from '../common/fs' +import { readdirSync } from 'fs' +import type { Logger } from '@layerzerolabs/io-devtools' + +/** + * verifyNonTarget is useful when verifying a contract that does not have its own + * deployment file (i.e. is not a target of any hardhat deployment, hence the name). + * + * This happens when a contract is deployed dynamically from another contract, + * either using minimal proxy pattern or by new keyword + * + * In this case the construtor arguments must be provided manually for every contract/network combination + * + * @param config VerifyHardhatNonTargetConfig + * @param logger Logger + * + * @returns Promise + */ +export const verifyNonTarget = async ( + config: VerifyHardhatNonTargetConfig, + logger: Logger +): Promise => { + const networks = parseNetworksConfig(logger, config.networks) + const paths = parsePathsConfig(config.paths) + const recordLogger = createRecordLogger(logger) + const verifyAll = createVerifyAll(logger) + const logResult = createLogVerificationResult(recordLogger) + + const verificationArtifacts = config.contracts.flatMap((contract): VerificationArtifact[] => { + const { address, network, contractName, deployment: deploymentPathOrBasename } = contract + logger.info(`Collectiong information for contract ${contractName} on network ${network}`) + + const networkConfig = networks[network] + if (networkConfig == null) { + logger.info(`No network configured for contract ${contractName} on network ${network}`) + + return [] + } + + // To be tolerant we'll accept the deployment path both with and without the .json extension + const deploymentPath = `${basename(deploymentPathOrBasename, '.json')}.json` + + // Since the contract does not have its own deployment, we need to specify + // a deployment file to use + const contractDeploymentPath = resolve(paths.deployments, network, deploymentPath) + if (!isFile(contractDeploymentPath)) { + logger.error(COLORS.error`Deployment file ${contractDeploymentPath} does not exist or is not a file`) + + return [] + } + + // eslint-disable-next-line @typescript-eslint/no-var-requires + const rawDeployment = require(contractDeploymentPath) + const deploymentParseResult = DeploymentSchema.safeParse(rawDeployment) + if (!deploymentParseResult.success) { + logger.error(COLORS.error`No network configured for contract ${contractName} on network ${network}`) + + return [] + } + + // At this moment we have a type-safe deployment available + const deployment = deploymentParseResult.data + + const contractClassName = basename(contractName, '.sol') + const source = deployment.metadata.sources[contractName] + if (source == null) { + logger.error( + COLORS.error`Missing source for contract ${contractName} for network ${network} in ${deploymentPath}` + ) + + return [] + } + + const licenseType = findLicenseType(source.content) + const abi = getContructorABIFromSource(source.content) + const constructorArguments = encodeContructorArguments(abi, contract.constructorArguments) + + // Deployment metadata contains solcInput, just a bit rearranged + const solcInput = extractSolcInputFromMetadata(deployment.metadata) + + const submitProps: SubmitForVerificationProps = { + apiUrl: networkConfig.apiUrl, + apiKey: networkConfig.apiKey, + address, + contractName: `${contractName}:${contractClassName}`, + constructorArguments, + licenseType, + compilerVersion: deployment.metadata.compiler.version, + sourceCode: JSON.stringify(solcInput), + evmVersion: deployment.metadata.settings.evmVersion, + optimizerRuns: deployment.metadata.settings.optimizer?.runs, + } + + recordLogger({ + Contract: contractName, + Network: network, + Address: submitProps.address, + License: submitProps.licenseType, + Arguments: contract.constructorArguments ? JSON.stringify(contract.constructorArguments) : undefined, + Sources: Object.keys(deployment.metadata.sources), + 'Scan URL': submitProps.apiUrl, + 'Scan API Key': submitProps.apiKey ? anonymizeValue(submitProps.apiKey) : undefined, + }) + + return [ + { + networkName: network, + networkConfig, + submitProps, + }, + ] + }) + + if (verificationArtifacts.length === 0) { + logger.warn('No contracts match the verification criteria, exiting') + + return [] + } + + // If we are only running a dry run, we'll print out the important info and exit + if (config.dryRun) { + logger.debug('Dry run enabled, exiting') + + return [] + } + + // Now it's time to verify stuff + const results = await Promise.all(verifyAll(verificationArtifacts)) + + // And due to high demand we'll also like show results and stuff + results.forEach(logResult) + + return results +} + +export const verifyTarget = async ( + config: VerifyHardhatTargetConfig, + logger: Logger +): Promise => { + // First we parse the configuration and fill in the defaults + const verify = parseFilterConfig(config.filter) + const networks = parseNetworksConfig(logger, config.networks) + const paths = parsePathsConfig(config.paths) + const recordLogger = createRecordLogger(logger) + const verifyAll = createVerifyAll(logger) + const logResult = createLogVerificationResult(recordLogger) + + // We'll need to check whether the deployments path exists and is a directory + if (!isDirectory(paths.deployments)) { + throw new Error(`Path ${paths.deployments} is not a directory`) + } + + // We know that the deployments folder should contain folders named by networks + // so we'll get the list of deployed networks by listing the directory contents + const deployedNetworkNames = new Set(readdirSync(paths.deployments)) + const networkConfigEntries = Object.entries(networks) + + logger.debug('Verifying deployments for following networks:') + networkConfigEntries.forEach(([networkName, networkConfig]) => { + logger.debug(`\t\t- ${networkName} (API URL ${networkConfig.apiUrl})`) + }) + + // Then it's time to go over the networks and collect the contracts that need to be verified + const verificationArtifacts = networkConfigEntries.flatMap( + ([networkName, networkConfig]): VerificationArtifact[] => { + logger.info(`Collecting deployments for ${networkName}...`) + + // First we check that there is a deployment for this network name + // + // If there isn't, we just skip it instead of throwing an error + // This allows us to have all the networks configured at all times + // and only verify the deployed ones + if (!deployedNetworkNames.has(networkName)) { + logger.warn(`Could not find deployment for network ${networkName} in ${paths.deployments}`) + + return [] + } + + // Now we construct the absolute path to the deployment folder + const deploymentAbsolutePath = resolve(paths.deployments, networkName) + + // Then we get all the JSON files in the deployment folder + const deployedContractFileNames = readdirSync(deploymentAbsolutePath).filter((fileName) => + fileName.endsWith('.json') + ) + + // Now it's time to process the deployments + return deployedContractFileNames.flatMap((fileName) => { + logger.info(`Inspecting deployment file ${fileName} on network ${networkName}`) + + // We load the deployment file and make sure it's correctly formatted + const contractDeploymentPath = resolve(deploymentAbsolutePath, fileName) + // eslint-disable-next-line @typescript-eslint/no-var-requires + const rawDeployment = require(contractDeploymentPath) + const deploymentParseResult = DeploymentSchema.safeParse(rawDeployment) + if (!deploymentParseResult.success) { + throw new Error( + `Error parsing deployment file ${fileName} on network ${networkName}: ${deploymentParseResult.error}` + ) + } + + // At this moment we have a type-safe deployment available + const deployment = deploymentParseResult.data + + // We 'll now walk through the compilation targets + // and find the ones that we want to verify + const compilationTargets = deployment.metadata.settings.compilationTarget + return Object.entries(compilationTargets).flatMap(([compilationTarget, contractName]) => { + const shouldVerifyHardhatDeploy = verify(contractName, compilationTarget, networkName) + + if (!shouldVerifyHardhatDeploy) { + logger.debug(`Not verifying ${contractName} in ${fileName} on network ${networkName}`) + return [] + } + + // In order to find the correct license for this articular contract we'll need to find its source code + const source = deployment.metadata.sources[compilationTarget] + if (source == null) { + logger.error(COLORS.error`Could not find source for ${contractName} (${compilationTarget})`) + + return [] + } + + const licenseType = findLicenseType(source.content) + + // Constructor arguments need to come ABI-encoded but without the 0x + const constructorArguments = encodeContructorArguments(deployment.abi, deployment.args) + + // Deployment metadata contains solcInput, just a bit rearranged + const solcInput = extractSolcInputFromMetadata(deployment.metadata) + + const submitProps: SubmitForVerificationProps = { + apiUrl: networkConfig.apiUrl, + apiKey: networkConfig.apiKey, + address: deployment.address, + contractName: `${compilationTarget}:${contractName}`, + constructorArguments, + licenseType, + compilerVersion: deployment.metadata.compiler.version, + sourceCode: JSON.stringify(solcInput), + evmVersion: deployment.metadata.settings.evmVersion, + optimizerRuns: deployment.metadata.settings.optimizer?.runs, + } + + recordLogger({ + Contract: contractName, + Network: networkName, + Address: deployment.address, + License: submitProps.licenseType, + Arguments: JSON.stringify(deployment.args), + Sources: Object.keys(deployment.metadata.sources), + 'Scan URL': submitProps.apiUrl, + 'Scan API Key': submitProps.apiKey ? anonymizeValue(submitProps.apiKey) : undefined, + }) + + return { + submitProps, + networkName, + networkConfig, + } + }) + }) + } + ) + + if (verificationArtifacts.length === 0) { + logger.warn('No contracts match the verification criteria, exiting') + + return [] + } + + // If we are only running a dry run, we'll print out the important info and exit + if (config.dryRun) { + logger.debug('Dry run enabled, exiting') + + return [] + } + + // Now it's time to verify stuff + const results = await Promise.all(verifyAll(verificationArtifacts)) + + // And due to high demand we'll also like show results and stuff + results.forEach(logResult) + + return results +} + +const createVerifyAll = + (logger: Logger) => + (artifacts: VerificationArtifact[]): Promise[] => { + return artifacts.map(async (artifact, index) => { + const { submitProps } = artifact + const paletteColor = COLORS.palette[index % COLORS.palette.length]! + const counter = `[${index + 1}/${artifacts.length}]` + const contractName = chalk.bold(submitProps.contractName) + const networkName = chalk.bold(artifact.networkName) + + logger.info(paletteColor`Verifying contract ${contractName} for network ${networkName} ${counter}`) + + try { + const verification = createVerification(submitProps, logger) + + verification.on('poll', (guid) => { + logger.info( + paletteColor`Polling for verification status of ${contractName} for network ${networkName} (GUID ${guid}) ${counter}` + ) + }) + + verification.on('retry', (error, attempt) => { + logger.verbose(`Received an error: ${error}`) + logger.info( + paletteColor`Retrying failed verification attempt of ${contractName} for network ${networkName} (attempt ${ + attempt + 1 + }) ${counter}` + ) + }) + + const result = await verification.verify() + + return { artifact, result } + } catch (error) { + logger.error( + COLORS.error`Problem verifying contract ${contractName} for network ${networkName} ${counter}: ${error} ` + ) + + return { artifact, error } + } + }) + } + +const createLogVerificationResult = + (recordLogger: RecordLogger) => + ({ artifact, response, error }: VerificationResult) => { + const contractName = chalk.bold(artifact.submitProps.contractName) + const networkName = chalk.bold(artifact.networkName) + const contractUrl = artifact.networkConfig.browserUrl + ? tryCreateScanContractUrl(artifact.networkConfig.browserUrl, artifact.submitProps.address) + : undefined + + recordLogger({ + Contract: contractName, + Network: networkName, + Result: error == null, + 'Was verified': response?.alreadyVerified, + 'Contract URL': contractUrl, + Error: error ? COLORS.error(error) : undefined, + }) + } diff --git a/packages/verify-contract/src/index.ts b/packages/verify-contract/src/index.ts new file mode 100644 index 000000000..311683e1e --- /dev/null +++ b/packages/verify-contract/src/index.ts @@ -0,0 +1,4 @@ +export { + verifyTarget as verifyHardhatDeployTarget, + verifyNonTarget as verifyHardhatDeployNonTarget, +} from './hardhat-deploy/verify' diff --git a/packages/verify-contract/test/__data__/deployments/fuji/.chainId b/packages/verify-contract/test/__data__/deployments/fuji/.chainId new file mode 100644 index 000000000..a7350c72e --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/fuji/.chainId @@ -0,0 +1 @@ +43113 \ No newline at end of file diff --git a/packages/verify-contract/test/__data__/deployments/fuji/DistributeONFT721.json b/packages/verify-contract/test/__data__/deployments/fuji/DistributeONFT721.json new file mode 100644 index 000000000..2ded717a9 --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/fuji/DistributeONFT721.json @@ -0,0 +1,2291 @@ +{ + "address": "0xb8D3F18004117455186197b1a280B6cF40caa60A", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_minGasToTransfer", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_layerZeroEndpoint", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "_indexArray", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_valueArray", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "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": "bytes32", + "name": "_hashedPayload", + "type": "bytes32" + } + ], + "name": "CreditCleared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_hashedPayload", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "CreditStored", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct DistributeONFT721.TokenDistribute[]", + "name": "tokenDistribute", + "type": "tuple[]" + } + ], + "name": "Distribute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "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": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct DistributeONFT721.TokenDistribute[]", + "name": "tokenDistribute", + "type": "tuple[]" + } + ], + "name": "ReceiveDistribute", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "_toAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_distributeBaseDstGas", + "type": "uint256" + } + ], + "name": "SetDistributeBaseDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_distributeGasPerIdx", + "type": "uint256" + } + ], + "name": "SetDistributeGasPerIdx", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_dstChainIdToBatchLimit", + "type": "uint256" + } + ], + "name": "SetDstChainIdToBatchLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_dstChainIdToTransferGas", + "type": "uint256" + } + ], + "name": "SetDstChainIdToTransferGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_minGasToTransferAndStore", + "type": "uint256" + } + ], + "name": "SetMinGasToTransferAndStore", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "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": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FUNCTION_TYPE_DISTRIBUTE", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FUNCTION_TYPE_SEND", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_TOKENS_PER_INDEX", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NUM_TOKENS_PER_INDEX", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "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": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "clearCredits", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "countAllSetBits", + "outputs": [ + { + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "distributeBaseDstGas", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "distributeGasPerIdx", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct DistributeONFT721.TokenDistribute[]", + "name": "_tokenDistribute", + "type": "tuple[]" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + } + ], + "name": "distributeTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "dstChainIdToBatchLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "dstChainIdToTransferGas", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct DistributeONFT721.TokenDistribute[]", + "name": "_tokenDistribute", + "type": "tuple[]" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + } + ], + "name": "estimateDistributeFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendBatchFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "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": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "getDistributeTokens", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "internalType": "struct DistributeONFT721.TokenDistribute[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "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": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minGasToTransferAndStore", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "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": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "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": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "sendBatchFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_distributeBaseDstGas", + "type": "uint256" + } + ], + "name": "setDistributeBaseDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_distributeGasPerIdx", + "type": "uint256" + } + ], + "name": "setDistributeGasPerIdx", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_dstChainIdToBatchLimit", + "type": "uint256" + } + ], + "name": "setDstChainIdToBatchLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_dstChainIdToTransferGas", + "type": "uint256" + } + ], + "name": "setDstChainIdToTransferGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minGasToTransferAndStore", + "type": "uint256" + } + ], + "name": "setMinGasToTransferAndStore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "storedCredits", + "outputs": [ + { + "internalType": "uint16", + "name": "srcChainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "creditsRemain", + "type": "bool" + } + ], + "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": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "tokenIds", + "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": "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": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x772804bbf96c973f99d64e6fe2d5df5dfbcb3f13dcb6c462989d193ff21918ef", + "receipt": { + "to": null, + "from": "0x28921b09dB1C7add63265e5ec79B008F0851D5DC", + "contractAddress": "0xb8D3F18004117455186197b1a280B6cF40caa60A", + "transactionIndex": 0, + "gasUsed": "5299267", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000020000000010000000000000000000000000000000400000000000000040000000000", + "blockHash": "0xb53af0f2286721a9eac12972d75170e1ac6b5681251f62c0449f476e7cc8d9c2", + "transactionHash": "0x772804bbf96c973f99d64e6fe2d5df5dfbcb3f13dcb6c462989d193ff21918ef", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 21210501, + "transactionHash": "0x772804bbf96c973f99d64e6fe2d5df5dfbcb3f13dcb6c462989d193ff21918ef", + "address": "0xb8D3F18004117455186197b1a280B6cF40caa60A", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000028921b09db1c7add63265e5ec79b008f0851d5dc" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xb53af0f2286721a9eac12972d75170e1ac6b5681251f62c0449f476e7cc8d9c2" + } + ], + "blockNumber": 21210501, + "cumulativeGasUsed": "5299267", + "status": 1, + "byzantium": true + }, + "args": [ + "DistributeONFT721", + "ONFT", + 100000, + "0x93f54D755A063cE7bB9e6Ac47Eccc8e33411d706", + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], + [ + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0", + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0", + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0", + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0", + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0", + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0", + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0", + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0", + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0", + "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0" + ] + ], + "numDeployments": 1, + "solcInputHash": "44386ad6d22c39cd71448685cebc841a", + "metadata": "{\"compiler\":{\"version\":\"0.8.12+commit.f00d7308\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_minGasToTransfer\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_layerZeroEndpoint\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"_indexArray\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_valueArray\",\"type\":\"uint256[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"bytes32\",\"name\":\"_hashedPayload\",\"type\":\"bytes32\"}],\"name\":\"CreditCleared\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_hashedPayload\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"CreditStored\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct DistributeONFT721.TokenDistribute[]\",\"name\":\"tokenDistribute\",\"type\":\"tuple[]\"}],\"name\":\"Distribute\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"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\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"indexed\":false,\"internalType\":\"struct DistributeONFT721.TokenDistribute[]\",\"name\":\"tokenDistribute\",\"type\":\"tuple[]\"}],\"name\":\"ReceiveDistribute\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_toAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_distributeBaseDstGas\",\"type\":\"uint256\"}],\"name\":\"SetDistributeBaseDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_distributeGasPerIdx\",\"type\":\"uint256\"}],\"name\":\"SetDistributeGasPerIdx\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_dstChainIdToBatchLimit\",\"type\":\"uint256\"}],\"name\":\"SetDstChainIdToBatchLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_dstChainIdToTransferGas\",\"type\":\"uint256\"}],\"name\":\"SetDstChainIdToTransferGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minGasToTransferAndStore\",\"type\":\"uint256\"}],\"name\":\"SetMinGasToTransferAndStore\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"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\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FUNCTION_TYPE_DISTRIBUTE\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FUNCTION_TYPE_SEND\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_TOKENS_PER_INDEX\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NUM_TOKENS_PER_INDEX\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"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\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"clearCredits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"countAllSetBits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distributeBaseDstGas\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"distributeGasPerIdx\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct DistributeONFT721.TokenDistribute[]\",\"name\":\"_tokenDistribute\",\"type\":\"tuple[]\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"}],\"name\":\"distributeTokens\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"dstChainIdToBatchLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"dstChainIdToTransferGas\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct DistributeONFT721.TokenDistribute[]\",\"name\":\"_tokenDistribute\",\"type\":\"tuple[]\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"}],\"name\":\"estimateDistributeFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendBatchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"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\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"getDistributeTokens\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct DistributeONFT721.TokenDistribute[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"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\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minGasToTransferAndStore\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"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\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"sendBatchFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_distributeBaseDstGas\",\"type\":\"uint256\"}],\"name\":\"setDistributeBaseDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_distributeGasPerIdx\",\"type\":\"uint256\"}],\"name\":\"setDistributeGasPerIdx\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainIdToBatchLimit\",\"type\":\"uint256\"}],\"name\":\"setDstChainIdToBatchLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainIdToTransferGas\",\"type\":\"uint256\"}],\"name\":\"setDstChainIdToTransferGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minGasToTransferAndStore\",\"type\":\"uint256\"}],\"name\":\"setMinGasToTransferAndStore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"storedCredits\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"creditsRemain\",\"type\":\"bool\"}],\"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\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenIds\",\"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\":\"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\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"constructor\":{\"params\":{\"_indexArray\":\"to set to all ones representing token ids available to mint\",\"_layerZeroEndpoint\":\"handles message transmission across chains\",\"_name\":\"the name of the token\",\"_symbol\":\"the token symbol\"}},\"estimateSendFee(uint16,bytes,uint256,bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _tokenId - token Id to transfer _useZro - indicates to use zro to pay L0 fees _adapterParams - flexible bytes array to indicate messaging adapter services in L0\"},\"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}.\"},\"sendBatchFrom(address,uint16,bytes,uint256[],address,address,bytes)\":{\"details\":\"send tokens `_tokenIds[]` to (`_dstChainId`, `_toAddress`) from `_from` `_toAddress` can be any size depending on the `dstChainId`. `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"sendFrom(address,uint16,bytes,uint256,address,address,bytes)\":{\"details\":\"send token `_tokenId` to (`_dstChainId`, `_toAddress`) from `_from` `_toAddress` can be any size depending on the `dstChainId`. `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"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\":{\"constructor\":{\"notice\":\"Constructor for the DistributeONFT721\"}},\"notice\":\"DistributeONFT allows for contracts to distribute unused token ids to other chains. Default is set to 10,000 token ids w/ 2500 tokens on 4 chains. Uses uint[](40) to keep track of token ids on current chain. Each uint in the array uses 250 bits of its allotted 256 bits to represent token ids. If the bit is set to 1 then that token id can be minted. Token Ids are defined by where they are in the tokenIds array. For example: [0]: 1-250, [1]: 251-500, [2]: 501-750, ... , [40]: 9751-10000 Example using 8 bits to represent token distribution: Chain A | Chain B tokenIds[0]: 0xff | 0x0 tokenIds[1]: 0x0 | 0xff Binary equivalent: Chain A | Chain B tokenIds[0]: 1111 1111 | 0000 0000 tokenIds[1]: 0000 0000 | 1111 1111 In this scenario Chain A owns tokenIds: 1,2,3,4,5,6,7,8 and Chain B owns tokenIds: 9,10,11,12,13,14,15,16 Chain A wants to send over 2 Token Ids to Chain B Chain A | Chain B tokenIds[0]: 0x3f | 0xc0 tokenIds[1]: 0x0 | 0xff Binary equivalent: Chain A | Chain B tokenIds[0]: 0011 1111 | 1100 0000 tokenIds[1]: 0000 0000 | 1111 1111 Now Chain A owns tokenIds: 3,4,5,6,7,8 and Chain B owns tokenIds: 1,2,9,10,11,12,13,14,15,16*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/onft/extension/DistributeONFT721.sol\":\"DistributeONFT721\"},\"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/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/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xe9617a9f6db351b6ac4c9d5b1097798af59ad7f813e370e8cf69bb44addd8548\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0x909bf72002c91806f39a64172c12b4188219e8649deefbe8d862604d4f9d3faf\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xe3e50134e39aa3c0f916447d36367970c6e4df972d488b794227e0b052ce80d5\",\"license\":\"MIT\"},\"contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"../interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"../interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../util/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint constant public DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(_srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote), \\\"LzApp: invalid source sending contract\\\");\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams, uint _nativeFee) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(uint16 _dstChainId, uint16 _type, bytes memory _adapterParams, uint _extraGas) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type] + _extraGas;\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) { // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(uint16 _version, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _srcChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_srcChainId] = _path;\\n emit SetTrustedRemote(_srcChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(uint16 _dstChainId, uint16 _packetType, uint _minGas) external onlyOwner {\\n require(_minGas > 0, \\\"LzApp: invalid minGas\\\");\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0xf7a97c79e0670912e51cfe74a06bf049718640ac764706250a903a63fec6e0b6\",\"license\":\"MIT\"},\"contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../util/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft(), 150, abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload));\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload, bytes memory _reason) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function retryMessage(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x2afd4980a5850f45f2c4d7ec44d77b292a51b80f847566479548f89572065311\",\"license\":\"MIT\"},\"contracts/token/onft/IONFT721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./IONFT721Core.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\n/**\\n * @dev Interface of the ONFT standard\\n */\\ninterface IONFT721 is IONFT721Core, IERC721 {\\n\\n}\\n\",\"keccak256\":\"0x4d8faa00c9a920d92ee269453f44e55485fb7c8001a406ef2af826525f433ecd\",\"license\":\"MIT\"},\"contracts/token/onft/IONFT721Core.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the ONFT Core standard\\n */\\ninterface IONFT721Core is IERC165 {\\n /**\\n * @dev Emitted when `_tokenIds[]` are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\\n * `_nonce` is the outbound nonce from\\n */\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes indexed _toAddress, uint[] _tokenIds);\\n event ReceiveFromChain(uint16 indexed _srcChainId, bytes indexed _srcAddress, address indexed _toAddress, uint[] _tokenIds);\\n event SetMinGasToTransferAndStore(uint256 _minGasToTransferAndStore);\\n event SetDstChainIdToTransferGas(uint16 _dstChainId, uint256 _dstChainIdToTransferGas);\\n event SetDstChainIdToBatchLimit(uint16 _dstChainId, uint256 _dstChainIdToBatchLimit);\\n\\n /**\\n * @dev Emitted when `_payload` was received from lz, but not enough gas to deliver all tokenIds\\n */\\n event CreditStored(bytes32 _hashedPayload, bytes _payload);\\n /**\\n * @dev Emitted when `_hashedPayload` has been completely delivered\\n */\\n event CreditCleared(bytes32 _hashedPayload);\\n\\n /**\\n * @dev send token `_tokenId` to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n /**\\n * @dev send tokens `_tokenIds[]` to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendBatchFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint[] calldata _tokenIds, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _tokenId - token Id to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParams - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendFee(uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _tokenIds[] - token Ids to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParams - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendBatchFee(uint16 _dstChainId, bytes calldata _toAddress, uint[] calldata _tokenIds, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n}\\n\",\"keccak256\":\"0x00d59d0ee2a17fdaa68511b1678fce4bcb46c074a9bbc5bbb51e08ec68d1b00e\",\"license\":\"MIT\"},\"contracts/token/onft/ONFT721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IONFT721.sol\\\";\\nimport \\\"./ONFT721Core.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\n\\n// NOTE: this ONFT contract has no public minting logic.\\n// must implement your own minting logic in child classes\\ncontract ONFT721 is ONFT721Core, ERC721, IONFT721 {\\n constructor(string memory _name, string memory _symbol, uint256 _minGasToTransfer, address _lzEndpoint) ERC721(_name, _symbol) ONFT721Core(_minGasToTransfer, _lzEndpoint) {}\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ONFT721Core, ERC721, IERC165) returns (bool) {\\n return interfaceId == type(IONFT721).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function _debitFrom(address _from, uint16, bytes memory, uint _tokenId) internal virtual override {\\n require(_isApprovedOrOwner(_msgSender(), _tokenId), \\\"ONFT721: send caller is not owner nor approved\\\");\\n require(ERC721.ownerOf(_tokenId) == _from, \\\"ONFT721: send from incorrect owner\\\");\\n _transfer(_from, address(this), _tokenId);\\n }\\n\\n function _creditTo(uint16, address _toAddress, uint _tokenId) internal virtual override {\\n require(!_exists(_tokenId) || (_exists(_tokenId) && ERC721.ownerOf(_tokenId) == address(this)));\\n if (!_exists(_tokenId)) {\\n _safeMint(_toAddress, _tokenId);\\n } else {\\n _transfer(address(this), _toAddress, _tokenId);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5ce63fcc4ab9f0c4b9a6b8274991b377914a8c48434532d3ac4df046f0195bf\",\"license\":\"MIT\"},\"contracts/token/onft/ONFT721Core.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IONFT721Core.sol\\\";\\nimport \\\"../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract ONFT721Core is NonblockingLzApp, ERC165, IONFT721Core {\\n uint16 public constant FUNCTION_TYPE_SEND = 1;\\n\\n struct StoredCredit {\\n uint16 srcChainId;\\n address toAddress;\\n uint256 index; // which index of the tokenIds remain\\n bool creditsRemain;\\n }\\n\\n uint256 public minGasToTransferAndStore; // min amount of gas required to transfer, and also store the payload\\n mapping(uint16 => uint256) public dstChainIdToBatchLimit;\\n mapping(uint16 => uint256) public dstChainIdToTransferGas; // per transfer amount of gas required to mint/transfer on the dst\\n mapping(bytes32 => StoredCredit) public storedCredits;\\n\\n constructor(uint256 _minGasToTransferAndStore, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\\n require(_minGasToTransferAndStore > 0, \\\"minGasToTransferAndStore must be > 0\\\");\\n minGasToTransferAndStore = _minGasToTransferAndStore;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IONFT721Core).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, bool _useZro, bytes memory _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return estimateSendBatchFee(_dstChainId, _toAddress, _toSingletonArray(_tokenId), _useZro, _adapterParams);\\n }\\n\\n function estimateSendBatchFee(uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, bool _useZro, bytes memory _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {\\n bytes memory payload = abi.encode(_toAddress, _tokenIds);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function sendFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _toSingletonArray(_tokenId), _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function sendBatchFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _tokenIds, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _send(address _from, uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual {\\n // allow 1 by default\\n require(_tokenIds.length > 0, \\\"tokenIds[] is empty\\\");\\n require(_tokenIds.length == 1 || _tokenIds.length <= dstChainIdToBatchLimit[_dstChainId], \\\"batch size exceeds dst batch limit\\\");\\n\\n for (uint i = 0; i < _tokenIds.length; i++) {\\n _debitFrom(_from, _dstChainId, _toAddress, _tokenIds[i]);\\n }\\n\\n bytes memory payload = abi.encode(_toAddress, _tokenIds);\\n\\n _checkGasLimit(_dstChainId, FUNCTION_TYPE_SEND, _adapterParams, dstChainIdToTransferGas[_dstChainId] * _tokenIds.length);\\n _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n emit SendToChain(_dstChainId, _from, _toAddress, _tokenIds);\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64, /*_nonce*/\\n bytes memory _payload\\n ) internal virtual override {\\n // decode and load the toAddress\\n (bytes memory toAddressBytes, uint[] memory tokenIds) = abi.decode(_payload, (bytes, uint[]));\\n\\n address toAddress;\\n assembly {\\n toAddress := mload(add(toAddressBytes, 20))\\n }\\n\\n uint nextIndex = _creditTill(_srcChainId, toAddress, 0, tokenIds);\\n if (nextIndex < tokenIds.length) {\\n // not enough gas to complete transfers, store to be cleared in another tx\\n bytes32 hashedPayload = keccak256(_payload);\\n storedCredits[hashedPayload] = StoredCredit(_srcChainId, toAddress, nextIndex, true);\\n emit CreditStored(hashedPayload, _payload);\\n }\\n\\n emit ReceiveFromChain(_srcChainId, _srcAddress, toAddress, tokenIds);\\n }\\n\\n // Public function for anyone to clear and deliver the remaining batch sent tokenIds\\n function clearCredits(bytes memory _payload) external virtual {\\n bytes32 hashedPayload = keccak256(_payload);\\n require(storedCredits[hashedPayload].creditsRemain, \\\"no credits stored\\\");\\n\\n (, uint[] memory tokenIds) = abi.decode(_payload, (bytes, uint[]));\\n\\n uint nextIndex = _creditTill(storedCredits[hashedPayload].srcChainId, storedCredits[hashedPayload].toAddress, storedCredits[hashedPayload].index, tokenIds);\\n require(nextIndex > storedCredits[hashedPayload].index, \\\"not enough gas to process credit transfer\\\");\\n\\n if (nextIndex == tokenIds.length) {\\n // cleared the credits, delete the element\\n delete storedCredits[hashedPayload];\\n emit CreditCleared(hashedPayload);\\n } else {\\n // store the next index to mint\\n storedCredits[hashedPayload] = StoredCredit(storedCredits[hashedPayload].srcChainId, storedCredits[hashedPayload].toAddress, nextIndex, true);\\n }\\n }\\n\\n // When a srcChain has the ability to transfer more chainIds in a single tx than the dst can do.\\n // Needs the ability to iterate and stop if the minGasToTransferAndStore is not met\\n function _creditTill(uint16 _srcChainId, address _toAddress, uint _startIndex, uint[] memory _tokenIds) internal returns (uint256){\\n uint i = _startIndex;\\n while (i < _tokenIds.length) {\\n // if not enough gas to process, store this index for next loop\\n if (gasleft() < minGasToTransferAndStore) break;\\n\\n _creditTo(_srcChainId, _toAddress, _tokenIds[i]);\\n i++;\\n }\\n\\n // indicates the next index to send of tokenIds,\\n // if i == tokenIds.length, we are finished\\n return i;\\n }\\n\\n function setMinGasToTransferAndStore(uint256 _minGasToTransferAndStore) external onlyOwner {\\n require(_minGasToTransferAndStore > 0, \\\"minGasToTransferAndStore must be > 0\\\");\\n minGasToTransferAndStore = _minGasToTransferAndStore;\\n emit SetMinGasToTransferAndStore(_minGasToTransferAndStore);\\n }\\n\\n // ensures enough gas in adapter params to handle batch transfer gas amounts on the dst\\n function setDstChainIdToTransferGas(uint16 _dstChainId, uint256 _dstChainIdToTransferGas) external onlyOwner {\\n require(_dstChainIdToTransferGas > 0, \\\"dstChainIdToTransferGas must be > 0\\\");\\n dstChainIdToTransferGas[_dstChainId] = _dstChainIdToTransferGas;\\n emit SetDstChainIdToTransferGas(_dstChainId, _dstChainIdToTransferGas);\\n }\\n\\n // limit on src the amount of tokens to batch send\\n function setDstChainIdToBatchLimit(uint16 _dstChainId, uint256 _dstChainIdToBatchLimit) external onlyOwner {\\n require(_dstChainIdToBatchLimit > 0, \\\"dstChainIdToBatchLimit must be > 0\\\");\\n dstChainIdToBatchLimit[_dstChainId] = _dstChainIdToBatchLimit;\\n emit SetDstChainIdToBatchLimit(_dstChainId, _dstChainIdToBatchLimit);\\n }\\n\\n function _debitFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId) internal virtual;\\n\\n function _creditTo(uint16 _srcChainId, address _toAddress, uint _tokenId) internal virtual;\\n\\n function _toSingletonArray(uint element) internal pure returns (uint[] memory) {\\n uint[] memory array = new uint[](1);\\n array[0] = element;\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x3fa25a2c80132be23d3b4dd10ada4dc05bf728ee971dfa87e06e89a32d2c3fc2\",\"license\":\"MIT\"},\"contracts/token/onft/extension/DistributeONFT721.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ONFT721.sol\\\";\\nimport \\\"../../../util/BitLib.sol\\\";\\n\\n/**\\n DistributeONFT allows for contracts to distribute unused token ids to other chains. Default is set to 10,000 token ids\\n w/ 2500 tokens on 4 chains. Uses uint[](40) to keep track of token ids on current chain. Each uint in the array uses\\n 250 bits of its allotted 256 bits to represent token ids. If the bit is set to 1 then that token id can be minted.\\n Token Ids are defined by where they are in the tokenIds array.\\n For example:\\n [0]: 1-250,\\n [1]: 251-500,\\n [2]: 501-750,\\n ... ,\\n [40]: 9751-10000\\n\\nExample using 8 bits to represent token distribution:\\n\\n Chain A | Chain B\\ntokenIds[0]: 0xff | 0x0\\ntokenIds[1]: 0x0 | 0xff\\n\\nBinary equivalent:\\n\\n Chain A | Chain B\\ntokenIds[0]: 1111 1111 | 0000 0000\\ntokenIds[1]: 0000 0000 | 1111 1111\\n\\nIn this scenario Chain A owns tokenIds: 1,2,3,4,5,6,7,8 and Chain B owns tokenIds: 9,10,11,12,13,14,15,16\\n\\nChain A wants to send over 2 Token Ids to Chain B\\n\\n Chain A | Chain B\\ntokenIds[0]: 0x3f | 0xc0\\ntokenIds[1]: 0x0 | 0xff\\n\\nBinary equivalent:\\n\\n Chain A | Chain B\\ntokenIds[0]: 0011 1111 | 1100 0000\\ntokenIds[1]: 0000 0000 | 1111 1111\\n\\nNow Chain A owns tokenIds: 3,4,5,6,7,8 and Chain B owns tokenIds: 1,2,9,10,11,12,13,14,15,16\\n**/\\ncontract DistributeONFT721 is ONFT721 {\\n\\n uint16 public constant FUNCTION_TYPE_DISTRIBUTE = 2;\\n // Each uint in the array uses 250 bits of its allotted 256 bits to represent token ids.\\n uint16 public constant NUM_TOKENS_PER_INDEX = 250;\\n uint16 public constant MAX_TOKENS_PER_INDEX = 256;\\n\\n uint public distributeBaseDstGas = 47500;\\n uint public distributeGasPerIdx = 7000;\\n\\n event Distribute(uint16 indexed _srcChainId, TokenDistribute[] tokenDistribute);\\n event ReceiveDistribute(uint16 indexed _srcChainId, bytes indexed _srcAddress, TokenDistribute[] tokenDistribute);\\n event SetDistributeBaseDstGas(uint _distributeBaseDstGas);\\n event SetDistributeGasPerIdx(uint _distributeGasPerIdx);\\n\\n struct TokenDistribute {\\n uint index;\\n uint value;\\n }\\n\\n uint[] public tokenIds = new uint[](40);\\n\\n /// @notice Constructor for the DistributeONFT721\\n /// @param _name the name of the token\\n /// @param _symbol the token symbol\\n /// @param _layerZeroEndpoint handles message transmission across chains\\n /// @param _indexArray to set to all ones representing token ids available to mint\\n constructor(string memory _name, string memory _symbol, uint256 _minGasToTransfer, address _layerZeroEndpoint, uint[] memory _indexArray, uint[] memory _valueArray) ONFT721(_name, _symbol, _minGasToTransfer, _layerZeroEndpoint){\\n uint _indexArrayLength = _indexArray.length;\\n require(_indexArrayLength == _valueArray.length, \\\"_indexArray and _valueArray must be same length\\\");\\n for(uint i; i < _indexArrayLength;) {\\n tokenIds[_indexArray[i]] = _valueArray[i];\\n unchecked{++i;}\\n }\\n }\\n\\n //---------------------------Public Functions----------------------------------------\\n function estimateSendBatchFee(uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, bool _useZro, bytes memory _adapterParams) public view virtual override(IONFT721Core,ONFT721Core) returns (uint nativeFee, uint zroFee) {\\n bytes memory payload = abi.encode(FUNCTION_TYPE_SEND, _toAddress, _tokenIds);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function countAllSetBits() public view returns (uint count) {\\n uint tokenIdsLength = tokenIds.length;\\n for(uint i; i < tokenIdsLength;) {\\n if(tokenIds[i] > 0) {\\n count += BitLib.countSetBits(tokenIds[i]);\\n }\\n unchecked{++i;}\\n }\\n return count;\\n }\\n\\n //---------------------------External Functions----------------------------------------\\n\\n function distributeTokens(uint16 _dstChainId, TokenDistribute[] memory _tokenDistribute, address payable _refundAddress, address _zroPaymentAddress) external payable onlyOwner {\\n require(_verifyAmounts(_tokenDistribute), \\\"Invalid input\\\");\\n _flipBits(_tokenDistribute);\\n bytes memory payload = abi.encode(FUNCTION_TYPE_DISTRIBUTE, _tokenDistribute);\\n bytes memory _adapterParams = _getMultiAdaptParams(_tokenDistribute.length);\\n _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n emit Distribute(_dstChainId, _tokenDistribute);\\n }\\n\\n function getDistributeTokens(uint _amount) external view returns (TokenDistribute[] memory) {\\n uint tokenDistributeSize = _countTokenDistributeSize(_amount);\\n require(tokenDistributeSize != 0, \\\"Not enough tokens to distribute\\\");\\n\\n uint amountNeeded = _amount;\\n\\n uint tokenIdsLength = tokenIds.length;\\n\\n TokenDistribute[] memory tokenDistributeFixed = new TokenDistribute[](tokenDistributeSize);\\n uint index;\\n for(uint i; i < tokenIdsLength;) {\\n uint currentTokenId = tokenIds[i];\\n if(currentTokenId == 0) {\\n unchecked{++i;}\\n continue;\\n }\\n if(amountNeeded == 0) break;\\n uint sendValue;\\n uint position;\\n while(amountNeeded != 0) {\\n position = BitLib.mostSignificantBitPosition(currentTokenId);\\n uint temp = 1 << position;\\n currentTokenId = currentTokenId ^ temp;\\n sendValue = sendValue | temp;\\n amountNeeded -= 1;\\n if(currentTokenId == 0) break;\\n }\\n tokenDistributeFixed[index] = TokenDistribute(i, sendValue);\\n unchecked{++i;++index;}\\n }\\n\\n return tokenDistributeFixed;\\n }\\n\\n function estimateDistributeFee(uint16 _dstChainId, TokenDistribute[] memory _tokenDistribute, bool _useZro) external view returns (uint nativeFee, uint zroFee) {\\n return _estimatePayloadFee(_dstChainId, abi.encode(FUNCTION_TYPE_DISTRIBUTE, _tokenDistribute), _tokenDistribute.length, _useZro);\\n }\\n\\n //---------------------------Internal Functions----------------------------------------\\n\\n // override _send in ONFT721Core to pass in FUNCTION_TYPE into payload\\n function _send(address _from, uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual override(ONFT721Core) {\\n // allow 1 by default\\n require(_tokenIds.length > 0, \\\"tokenIds[] is empty\\\");\\n require(_tokenIds.length == 1 || _tokenIds.length <= dstChainIdToBatchLimit[_dstChainId], \\\"batch size exceeds dst batch limit\\\");\\n\\n for (uint i = 0; i < _tokenIds.length;) {\\n _debitFrom(_from, _dstChainId, _toAddress, _tokenIds[i]);\\n unchecked{++i;}\\n }\\n\\n bytes memory payload = abi.encode(FUNCTION_TYPE_SEND, _toAddress, _tokenIds);\\n\\n _checkGasLimit(_dstChainId, FUNCTION_TYPE_SEND, _adapterParams, dstChainIdToTransferGas[_dstChainId] * _tokenIds.length);\\n _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n emit SendToChain(_dstChainId, _from, _toAddress, _tokenIds);\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64, /*_nonce*/\\n bytes memory _payload\\n ) internal virtual override {\\n uint8 functionType;\\n assembly {\\n functionType := mload(add(_payload, 32))\\n }\\n\\n if(functionType == FUNCTION_TYPE_SEND) {\\n // decode and load the toAddress\\n (,bytes memory _toAddressBytes, uint[] memory _receivedTokenIds) = abi.decode(_payload, (uint16, bytes, uint[]));\\n\\n address toAddress;\\n assembly {\\n toAddress := mload(add(_toAddressBytes, 20))\\n }\\n\\n uint nextIndex = _creditTill(_srcChainId, toAddress, 0, _receivedTokenIds);\\n if (nextIndex < _receivedTokenIds.length) {\\n // not enough gas to complete transfers, store to be cleared in another tx\\n bytes32 hashedPayload = keccak256(_payload);\\n storedCredits[hashedPayload] = StoredCredit(_srcChainId, toAddress, nextIndex, true);\\n emit CreditStored(hashedPayload, _payload);\\n }\\n\\n emit ReceiveFromChain(_srcChainId, _srcAddress, toAddress, _receivedTokenIds);\\n } else if(functionType == FUNCTION_TYPE_DISTRIBUTE) {\\n (, TokenDistribute[] memory tokenDistribute) = abi.decode(_payload, (uint16, TokenDistribute[]));\\n uint tokenDistributeLength = tokenDistribute.length;\\n for(uint i; i < tokenDistributeLength;) {\\n uint temp = tokenIds[tokenDistribute[i].index];\\n tokenIds[tokenDistribute[i].index] = temp | tokenDistribute[i].value;\\n unchecked{++i;}\\n }\\n emit ReceiveDistribute(_srcChainId, _srcAddress, tokenDistribute);\\n }\\n }\\n\\n // Public function for anyone to clear and deliver the remaining batch sent tokenIds\\n function clearCredits(bytes memory _payload) external virtual override {\\n bytes32 hashedPayload = keccak256(_payload);\\n require(storedCredits[hashedPayload].creditsRemain, \\\"no credits stored\\\");\\n\\n (,, uint[] memory _tokenIds) = abi.decode(_payload, (uint16, bytes, uint[]));\\n\\n uint nextIndex = _creditTill(storedCredits[hashedPayload].srcChainId, storedCredits[hashedPayload].toAddress, storedCredits[hashedPayload].index, _tokenIds);\\n require(nextIndex > storedCredits[hashedPayload].index, \\\"not enough gas to process credit transfer\\\");\\n\\n if (nextIndex == _tokenIds.length) {\\n // cleared the credits, delete the element\\n delete storedCredits[hashedPayload];\\n emit CreditCleared(hashedPayload);\\n } else {\\n // store the next index to mint\\n storedCredits[hashedPayload] = StoredCredit(storedCredits[hashedPayload].srcChainId, storedCredits[hashedPayload].toAddress, nextIndex, true);\\n }\\n }\\n\\n function _verifyAmounts(TokenDistribute[] memory _tokenDistribute) internal view returns (bool) {\\n uint tokenDistributeLength = _tokenDistribute.length;\\n for(uint i; i < tokenDistributeLength;) {\\n uint tempTokenIds = tokenIds[_tokenDistribute[i].index];\\n uint result = tempTokenIds & _tokenDistribute[i].value;\\n if(result != _tokenDistribute[i].value) return false;\\n unchecked{++i;}\\n }\\n return true;\\n }\\n\\n function _flipBits(TokenDistribute[] memory _tokenDistribute) internal {\\n uint tokenDistributeLength = _tokenDistribute.length;\\n for(uint i; i < tokenDistributeLength;) {\\n tokenIds[_tokenDistribute[i].index] = tokenIds[_tokenDistribute[i].index] ^ _tokenDistribute[i].value;\\n unchecked{++i;}\\n }\\n }\\n\\n function _estimatePayloadFee(uint16 _dstChainId, bytes memory _payload, uint _amount, bool _useZro) internal view returns (uint nativeFee, uint zroFee) {\\n return lzEndpoint.estimateFees(_dstChainId, address(this), _payload, _useZro, _getMultiAdaptParams(_amount));\\n }\\n\\n function _countTokenDistributeSize(uint _amount) internal view returns (uint) {\\n uint totalCount;\\n uint size;\\n uint tokenIdsLength = tokenIds.length;\\n for(uint i; i < tokenIdsLength;) {\\n uint currentTokenId = tokenIds[i];\\n uint count = BitLib.countSetBits(currentTokenId);\\n if(count > 0) size += 1;\\n totalCount += count;\\n if(totalCount >= _amount) return size;\\n unchecked{++i;}\\n }\\n return 0;\\n }\\n\\n function _getMultiAdaptParams(uint _amount) internal view returns (bytes memory) {\\n require(_amount > 0, \\\"Amount must be greater than 0\\\");\\n uint16 version = 1;\\n uint destinationGas = distributeBaseDstGas + ((_amount - 1) * distributeGasPerIdx);\\n return abi.encodePacked(version, destinationGas);\\n }\\n\\n function _getNextMintTokenIdAndClearFlag() internal returns (uint tokenId) {\\n uint tokenIdsLength = tokenIds.length;\\n for(uint i; i < tokenIdsLength;) {\\n uint currentTokenId = tokenIds[i];\\n if(currentTokenId == 0) {\\n unchecked{++i;}\\n continue;\\n }\\n uint position = BitLib.mostSignificantBitPosition(currentTokenId);\\n uint temp = 1 << position;\\n tokenIds[i] = tokenIds[i] ^ temp;\\n tokenId = (MAX_TOKENS_PER_INDEX - position) + (i * NUM_TOKENS_PER_INDEX);\\n break;\\n }\\n return tokenId;\\n }\\n\\n function setDistributeBaseDstGas(uint _distributeBaseDstGas) external onlyOwner {\\n distributeBaseDstGas = _distributeBaseDstGas;\\n emit SetDistributeBaseDstGas(distributeBaseDstGas);\\n }\\n\\n function setDistributeGasPerIdx(uint _distributeGasPerIdx) external onlyOwner {\\n distributeGasPerIdx = _distributeGasPerIdx;\\n emit SetDistributeGasPerIdx(distributeGasPerIdx);\\n }\\n}\",\"keccak256\":\"0x853399ae050914c54646f8b248fce73b9dff7e01703e09d430e783616cc04f13\",\"license\":\"BUSL-1.1\"},\"contracts/util/BitLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\npragma solidity >=0.5.0;\\n\\n// mostSignificantBitPosition taken from: https://github.com/Uniswap/solidity-lib/blob/master/contracts/libraries/BitMath.sol\\n// countSetBits based off: https://en.wikipedia.org/wiki/Hamming_weight\\n\\nlibrary BitLib {\\n\\n uint256 constant m1 = 0x5555555555555555555555555555555555555555555555555555555555555555;\\n uint256 constant m2 = 0x3333333333333333333333333333333333333333333333333333333333333333;\\n uint256 constant m4 = 0x0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F0F;\\n uint256 constant m8 = 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF;\\n uint256 constant m16 = 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF;\\n uint256 constant m32 = 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF;\\n uint256 constant m64 = 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF;\\n uint256 constant m128= 0x00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\\n\\n function mostSignificantBitPosition(uint256 x) internal pure returns (uint8 r) {\\n if(x == 0) return 0;\\n\\n if (x >= 0x100000000000000000000000000000000) {\\n x >>= 128;\\n r += 128;\\n }\\n if (x >= 0x10000000000000000) {\\n x >>= 64;\\n r += 64;\\n }\\n if (x >= 0x100000000) {\\n x >>= 32;\\n r += 32;\\n }\\n if (x >= 0x10000) {\\n x >>= 16;\\n r += 16;\\n }\\n if (x >= 0x100) {\\n x >>= 8;\\n r += 8;\\n }\\n if (x >= 0x10) {\\n x >>= 4;\\n r += 4;\\n }\\n if (x >= 0x4) {\\n x >>= 2;\\n r += 2;\\n }\\n if (x >= 0x2) r += 1;\\n }\\n\\n function countSetBits(uint x) internal pure returns (uint256) {\\n x = (x & m1 ) + ((x >> 1) & m1 );\\n x = (x & m2 ) + ((x >> 2) & m2 );\\n x = (x & m4 ) + ((x >> 4) & m4 );\\n x = (x & m8 ) + ((x >> 8) & m8 );\\n x = (x & m16) + ((x >> 16) & m16);\\n x = (x & m32) + ((x >> 32) & m32);\\n x = (x & m64) + ((x >> 64) & m64);\\n x = (x & m128) + ((x >> 128) & m128);\\n return x;\\n }\\n}\",\"keccak256\":\"0x288c59cc05b4edf34f194ef4bd40599fc76013c55056c7ebeea03d6d9820496c\",\"license\":\"GPL-3.0-or-later\"},\"contracts/util/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\n\\nlibrary BytesLib {\\n function concat(\\n bytes memory _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1 , \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(\\n bytes storage _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n view\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x2255aadad70e87ed42b158776330175644b07fbbc7e77ed32cd6330974abbcee\",\"license\":\"Unlicense\"},\"contracts/util/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint256 constant LOW_28_MASK =\\n 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf)\\n internal\\n pure\\n {\\n require(_buf.length >= 4);\\n uint256 _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x23942250ddd277c443fa27c6b4ab51e6b3b5e654548b6b9e8d785a88ebec4dfe\",\"license\":\"MIT OR Apache-2.0\"}},\"version\":1}", + "bytecode": "0x61b98c601055611b58601155602860a08181526105c06040529060c06105008036833750508151620000399260129250602001906200025f565b503480156200004757600080fd5b5060405162005c6f38038062005c6f8339810160408190526200006a91620004c5565b858585858383838380806200007f336200020f565b6001600160a01b03166080525081620000eb5760405162461bcd60e51b8152602060048201526024808201527f6d696e476173546f5472616e73666572416e6453746f7265206d7573742062656044820152630203e20360e41b60648201526084015b60405180910390fd5b5060065581516200010490600a906020850190620002af565b5080516200011a90600b906020840190620002af565b5050505050505060008251905081518114620001915760405162461bcd60e51b815260206004820152602f60248201527f5f696e646578417272617920616e64205f76616c75654172726179206d75737460448201526e040c4ca40e6c2daca40d8cadccee8d608b1b6064820152608401620000e2565b60005b818110156200020157828181518110620001b257620001b262000599565b60200260200101516012858381518110620001d157620001d162000599565b602002602001015181548110620001ec57620001ec62000599565b60009182526020909120015560010162000194565b5050505050505050620005ec565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280548282559060005260206000209081019282156200029d579160200282015b828111156200029d57825182559160200191906001019062000280565b50620002ab9291506200032b565b5090565b828054620002bd90620005af565b90600052602060002090601f016020900481019282620002e157600085556200029d565b82601f10620002fc57805160ff19168380011785556200029d565b828001600101855582156200029d57918201828111156200029d57825182559160200191906001019062000280565b5b80821115620002ab57600081556001016200032c565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171562000383576200038362000342565b604052919050565b600082601f8301126200039d57600080fd5b81516001600160401b03811115620003b957620003b962000342565b6020620003cf601f8301601f1916820162000358565b8281528582848701011115620003e457600080fd5b60005b8381101562000404578581018301518282018401528201620003e7565b83811115620004165760008385840101525b5095945050505050565b80516001600160a01b03811681146200043857600080fd5b919050565b600082601f8301126200044f57600080fd5b815160206001600160401b038211156200046d576200046d62000342565b8160051b6200047e82820162000358565b92835284810182019282810190878511156200049957600080fd5b83870192505b84831015620004ba578251825291830191908301906200049f565b979650505050505050565b60008060008060008060c08789031215620004df57600080fd5b86516001600160401b0380821115620004f757600080fd5b620005058a838b016200038b565b975060208901519150808211156200051c57600080fd5b6200052a8a838b016200038b565b9650604089015195506200054160608a0162000420565b945060808901519150808211156200055857600080fd5b620005668a838b016200043d565b935060a08901519150808211156200057d57600080fd5b506200058c89828a016200043d565b9150509295509295509295565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680620005c457607f821691505b60208210811415620005e657634e487b7160e01b600052602260045260246000fd5b50919050565b6080516156286200064760003960008181610a1001528181610c7701528181610f7b0152818161123d0152818161144801528181611e72015281816124bf015281816125f5015281816131eb015261380301526156286000f3fe6080604052600436106103b75760003560e01c80638cfd8f5c116101f2578063baf3292d1161010d578063d807e9e9116100a0578063f23536411161006f578063f235364114610be7578063f2fde38b14610c07578063f5ecbdbc14610c27578063fa25f9b614610c4757600080fd5b8063d807e9e914610b31578063df2a5b3b14610b5e578063e985e9c514610b7e578063eb8d72b714610bc757600080fd5b8063ce30e2a9116100dc578063ce30e2a914610ac8578063d12473a514610ade578063d1deba1f14610afe578063d58778d614610b1157600080fd5b8063baf3292d14610a52578063c446183414610a72578063c87b56dd14610a88578063cbed8b9c14610aa857600080fd5b80639f38369a11610185578063ab3ffb9311610154578063ab3ffb93146109d6578063af3fb21c146109e9578063b353aaa7146109fe578063b88d4fde14610a3257600080fd5b80639f38369a14610963578063a22cb46514610983578063a3049482146109a3578063a6c3d165146109b657600080fd5b8063911611e7116101c1578063911611e7146108f8578063950c8a741461090e57806395d89b411461092e5780639ea5d6b11461094357600080fd5b80638cfd8f5c146108625780638da5cb5b1461089a5780638eca19b9146108b85780638ffa1f2a146108d857600080fd5b80632ea80877116102e25780635b8c41e6116102755780636a621d49116102445780636a621d49146107f857806370a082311461080d578063715018a61461082d5780637533d7881461084257600080fd5b80635b8c41e6146107495780636305cb97146107985780636352211e146107b857806366ad5c8a146107d857600080fd5b806342d65a8d116102b157806342d65a8d146106d357806348288190146106f35780634ac3f4ff14610709578063519056361461073657600080fd5b80632ea808771461063e5780633d8b38f6146106665780633f1f4fa41461068657806342842e0e146106b357600080fd5b80630df374831161035a57806322a3ecf91161032957806322a3ecf91461055057806323b872dd146105d35780632518552b146105f35780632a205e3d1461060957600080fd5b80630df37483146104cd5780630e751294146104ed57806310ddb1371461050d57806318ec341c1461052d57600080fd5b806307e0db171161039657806307e0db1714610435578063081812fc14610455578063095ea7b31461048d5780630b4cad4c146104ad57600080fd5b80621d3567146103bc57806301ffc9a7146103de57806306fdde0314610413575b600080fd5b3480156103c857600080fd5b506103dc6103d73660046143b1565b610c74565b005b3480156103ea57600080fd5b506103fe6103f936600461445c565b610ea5565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b50610428610ec8565b60405161040a91906144d1565b34801561044157600080fd5b506103dc6104503660046144e4565b610f5a565b34801561046157600080fd5b50610475610470366004614501565b610fe3565b6040516001600160a01b03909116815260200161040a565b34801561049957600080fd5b506103dc6104a836600461453a565b61100a565b3480156104b957600080fd5b506103dc6104c8366004614501565b611120565b3480156104d957600080fd5b506103dc6104e8366004614566565b6111c0565b3480156104f957600080fd5b506103dc610508366004614501565b6111df565b34801561051957600080fd5b506103dc6105283660046144e4565b61121c565b34801561053957600080fd5b50610542611274565b60405190815260200161040a565b34801561055c57600080fd5b506105a461056b366004614501565b60096020526000908152604090208054600182015460029092015461ffff821692620100009092046001600160a01b0316919060ff1684565b6040805161ffff90951685526001600160a01b039093166020850152918301521515606082015260800161040a565b3480156105df57600080fd5b506103dc6105ee366004614584565b6112ea565b3480156105ff57600080fd5b5061054260115481565b34801561061557600080fd5b506106296106243660046146c0565b61131c565b6040805192835260208301919091520161040a565b34801561064a57600080fd5b50610653600281565b60405161ffff909116815260200161040a565b34801561067257600080fd5b506103fe610681366004614750565b611342565b34801561069257600080fd5b506105426106a13660046144e4565b60036020526000908152604090205481565b3480156106bf57600080fd5b506103dc6106ce366004614584565b61140e565b3480156106df57600080fd5b506103dc6106ee366004614750565b611429565b3480156106ff57600080fd5b5061054260065481565b34801561071557600080fd5b506105426107243660046144e4565b60076020526000908152604090205481565b6103dc6107443660046147a4565b6114af565b34801561075557600080fd5b5061054261076436600461485f565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156107a457600080fd5b506103dc6107b3366004614501565b6114c6565b3480156107c457600080fd5b506104756107d3366004614501565b611503565b3480156107e457600080fd5b506103dc6107f33660046143b1565b611563565b34801561080457600080fd5b5061065360fa81565b34801561081957600080fd5b506105426108283660046148be565b61163f565b34801561083957600080fd5b506103dc6116c5565b34801561084e57600080fd5b5061042861085d3660046144e4565b6116d9565b34801561086e57600080fd5b5061054261087d3660046148db565b600260209081526000928352604080842090915290825290205481565b3480156108a657600080fd5b506000546001600160a01b0316610475565b3480156108c457600080fd5b506106296108d33660046149c1565b611773565b3480156108e457600080fd5b506103dc6108f3366004614a17565b6117b1565b34801561090457600080fd5b5061054260105481565b34801561091a57600080fd5b50600454610475906001600160a01b031681565b34801561093a57600080fd5b506104286119ed565b34801561094f57600080fd5b506103dc61095e366004614566565b6119fc565b34801561096f57600080fd5b5061042861097e3660046144e4565b611ab3565b34801561098f57600080fd5b506103dc61099e366004614a4b565b611bca565b6103dc6109b1366004614a80565b611bd9565b3480156109c257600080fd5b506103dc6109d1366004614750565b611cb6565b6103dc6109e4366004614b4f565b611d49565b3480156109f557600080fd5b50610653600181565b348015610a0a57600080fd5b506104757f000000000000000000000000000000000000000000000000000000000000000081565b348015610a3e57600080fd5b506103dc610a4d366004614c01565b611d58565b348015610a5e57600080fd5b506103dc610a6d3660046148be565b611d8a565b348015610a7e57600080fd5b5061054261271081565b348015610a9457600080fd5b50610428610aa3366004614501565b611de0565b348015610ab457600080fd5b506103dc610ac3366004614c6c565b611e53565b348015610ad457600080fd5b5061065361010081565b348015610aea57600080fd5b506103dc610af9366004614566565b611ee8565b6103dc610b0c3660046143b1565b611f98565b348015610b1d57600080fd5b50610542610b2c366004614501565b6121ae565b348015610b3d57600080fd5b50610b51610b4c366004614501565b6121cf565b60405161040a9190614d24565b348015610b6a57600080fd5b506103dc610b79366004614d37565b612371565b348015610b8a57600080fd5b506103fe610b99366004614d67565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205460ff1690565b348015610bd357600080fd5b506103dc610be2366004614750565b612423565b348015610bf357600080fd5b50610629610c02366004614d95565b61247d565b348015610c1357600080fd5b506103dc610c223660046148be565b61254b565b348015610c3357600080fd5b50610428610c42366004614e10565b6125c4565b348015610c5357600080fd5b50610542610c623660046144e4565b60086020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610cf15760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610d0f90614e61565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3b90614e61565b8015610d885780601f10610d5d57610100808354040283529160200191610d88565b820191906000526020600020905b815481529060010190602001808311610d6b57829003601f168201915b50505050509050805186869050148015610da3575060008151115b8015610dcb575080516020820120604051610dc19088908890614e9c565b6040518091039020145b610e265760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b6064820152608401610ce8565b610e9c8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061267792505050565b50505050505050565b60006001600160e01b031982161580610ec25750610ec2826126f0565b92915050565b6060600a8054610ed790614e61565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0390614e61565b8015610f505780601f10610f2557610100808354040283529160200191610f50565b820191906000526020600020905b815481529060010190602001808311610f3357829003601f168201915b5050505050905090565b610f62612730565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610fc857600080fd5b505af1158015610fdc573d6000803e3d6000fd5b5050505050565b6000610fee8261278a565b506000908152600e60205260409020546001600160a01b031690565b600061101582611503565b9050806001600160a01b0316836001600160a01b031614156110835760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610ce8565b336001600160a01b038216148061109f575061109f8133610b99565b6111115760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610ce8565b61111b83836127e9565b505050565b611128612730565b600081116111845760405162461bcd60e51b8152602060048201526024808201527f6d696e476173546f5472616e73666572416e6453746f7265206d7573742062656044820152630203e20360e41b6064820152608401610ce8565b60068190556040518181527ffebbc4f8bb9ec2313950c718d43123124b15778efda4c1f1d529de2995b4f34d906020015b60405180910390a150565b6111c8612730565b61ffff909116600090815260036020526040902055565b6111e7612730565b60118190556040518181527fe995f60b841a7336cf7af18b9017aab284c6678cf2a818f43c35098d5a901bc8906020016111b5565b611224612730565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610fae565b601254600090815b818110156112e55760006012828154811061129957611299614eac565b906000526020600020015411156112dd576112d0601282815481106112c0576112c0614eac565b9060005260206000200154612857565b6112da9084614ed8565b92505b60010161127c565b505090565b6112f5335b82612ab5565b6113115760405162461bcd60e51b8152600401610ce890614ef0565b61111b838383612b33565b600080611334878761132d88612ccf565b878761247d565b915091509550959350505050565b61ffff83166000908152600160205260408120805482919061136390614e61565b80601f016020809104026020016040519081016040528092919081815260200182805461138f90614e61565b80156113dc5780601f106113b1576101008083540402835291602001916113dc565b820191906000526020600020905b8154815290600101906020018083116113bf57829003601f168201915b5050505050905083836040516113f3929190614e9c565b60405180910390208180519060200120149150509392505050565b61111b83838360405180602001604052806000815250611d58565b611431612730565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061148190869086908690600401614f67565b600060405180830381600087803b15801561149b57600080fd5b505af1158015610e9c573d6000803e3d6000fd5b610e9c8787876114be88612ccf565b878787612d1a565b6114ce612730565b60108190556040518181527f872735ac071276affce3a0a7de8308e2d22a272718a68dcd010a42ec626ecb5f906020016111b5565b6000818152600c60205260408120546001600160a01b031680610ec25760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610ce8565b3330146115c15760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610ce8565b6116378686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f890181900481028201810190925287815289935091508790879081908401838280828437600092019190915250612ee792505050565b505050505050565b60006001600160a01b0382166116a95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610ce8565b506001600160a01b03166000908152600d602052604090205490565b6116cd612730565b6116d76000613196565b565b600160205260009081526040902080546116f290614e61565b80601f016020809104026020016040519081016040528092919081815260200182805461171e90614e61565b801561176b5780601f106117405761010080835404028352916020019161176b565b820191906000526020600020905b81548152906001019060200180831161174e57829003601f168201915b505050505081565b6000806117a58560028660405160200161178e929190614f85565b6040516020818303038152906040528651866131e6565b91509150935093915050565b80516020808301919091206000818152600990925260409091206002015460ff166118125760405162461bcd60e51b81526020600482015260116024820152701b9bc818dc99591a5d1cc81cdd1bdc9959607a1b6044820152606401610ce8565b6000828060200190518101906118289190614fe7565b60008581526009602052604081208054600190910154929550909350611866925061ffff811691620100009091046001600160a01b03169085613292565b60008481526009602052604090206001015490915081116118db5760405162461bcd60e51b815260206004820152602960248201527f6e6f7420656e6f7567682067617320746f2070726f6365737320637265646974604482015268103a3930b739b332b960b91b6064820152608401610ce8565b81518114156119535760008381526009602052604080822080546001600160b01b031916815560018101929092556002909101805460ff19169055517fd7be02b8dd0d27bd0517a9cb4d7469ce27df4313821ae5ec1ff69acc594ba233906119469085815260200190565b60405180910390a16119e7565b60408051608081018252600085815260096020818152848320805461ffff80821687526001600160a01b03620100008084048216868a019081529989018b8152600160608b01818152998f90529790965297519851169096026001600160b01b03199091169690951695909517939093178455915191830191909155516002909101805491151560ff199092169190911790555b50505050565b6060600b8054610ed790614e61565b611a04612730565b60008111611a5f5760405162461bcd60e51b815260206004820152602260248201527f647374436861696e4964546f42617463684c696d6974206d757374206265203e604482015261020360f41b6064820152608401610ce8565b61ffff8216600081815260076020908152604091829020849055815192835282018390527f7315f7654d594ead24a30160ed9ba2d23247f543016b918343591e93d7afdb6d91015b60405180910390a15050565b61ffff8116600090815260016020526040812080546060929190611ad690614e61565b80601f0160208091040260200160405190810160405280929190818152602001828054611b0290614e61565b8015611b4f5780601f10611b2457610100808354040283529160200191611b4f565b820191906000526020600020905b815481529060010190602001808311611b3257829003601f168201915b50505050509050805160001415611ba85760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610ce8565b611bc3600060148351611bbb91906150b4565b8391906132e4565b9392505050565b611bd53383836133f1565b5050565b611be1612730565b611bea836134c0565b611c265760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401610ce8565b611c2f83613576565b6000600284604051602001611c45929190614f85565b60405160208183030381529060405290506000611c628551613621565b9050611c728683868685346136d9565b8561ffff167f9a72ab77f30e4ce04bdedd777b2dc64764e70205166233d02bd8411af912c44386604051611ca69190614d24565b60405180910390a2505050505050565b611cbe612730565b818130604051602001611cd3939291906150cb565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611d0893919290910190614235565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611d3c93929190614f67565b60405180910390a1505050565b610e9c87878787878787612d1a565b611d623383612ab5565b611d7e5760405162461bcd60e51b8152600401610ce890614ef0565b6119e78484848461387f565b611d92612730565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016111b5565b6060611deb8261278a565b6000611e0260408051602081019091526000815290565b90506000815111611e225760405180602001604052806000815250611bc3565b80611e2c846138b2565b604051602001611e3d9291906150f1565b6040516020818303038152906040529392505050565b611e5b612730565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611eaf9088908890889088908890600401615120565b600060405180830381600087803b158015611ec957600080fd5b505af1158015611edd573d6000803e3d6000fd5b505050505050505050565b611ef0612730565b60008111611f4c5760405162461bcd60e51b815260206004820152602360248201527f647374436861696e4964546f5472616e73666572476173206d7573742062652060448201526203e20360ec1b6064820152608401610ce8565b61ffff8216600081815260086020908152604091829020849055815192835282018390527fc46df2983228ac2d9754e94a0d565e6671665dc8ad38602bc8e544f0685a29fb9101611aa7565b61ffff86166000908152600560205260408082209051611fbb9088908890614e9c565b90815260408051602092819003830190206001600160401b0387166000908152925290205490508061203b5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610ce8565b80838360405161204c929190614e9c565b6040518091039020146120ab5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610ce8565b61ffff871660009081526005602052604080822090516120ce9089908990614e9c565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252612166918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a935091508890889081908401838280828437600092019190915250612ee792505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e5878787878560405161219d959493929190615159565b60405180910390a150505050505050565b601281815481106121be57600080fd5b600091825260209091200154905081565b606060006121dc836139af565b90508061222b5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f75676820746f6b656e7320746f2064697374726962757465006044820152606401610ce8565b60125483906000836001600160401b0381111561224a5761224a6145c5565b60405190808252806020026020018201604052801561228f57816020015b60408051808201909152600080825260208201528152602001906001900390816122685790505b5090506000805b83811015612365576000601282815481106122b3576122b3614eac565b9060005260206000200154905080600014156122d25750600101612296565b856122dd5750612365565b6000805b8715612324576122f083613a3b565b600160ff9190911681811b948518949384179390925090612311908a6150b4565b98508361231e5750612324565b506122e1565b60405180604001604052808581526020018381525086868151811061234b5761234b614eac565b602090810291909101015250505060019182019101612296565b50909695505050505050565b612379612730565b600081116123c15760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b6044820152606401610ce8565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611d3c565b61242b612730565b61ffff831660009081526001602052604090206124499083836142b9565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611d3c93929190614f67565b600080600060018787604051602001612498939291906151c4565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906124fc908b90309086908b908b906004016151fd565b6040805180830381865afa158015612518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253c9190615251565b92509250509550959350505050565b612553612730565b6001600160a01b0381166125b85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ce8565b6125c181613196565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015612644573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261266c9190810190615275565b90505b949350505050565b6000806126da5a60966366ad5c8a60e01b8989898960405160240161269f94939291906152a9565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190613b31565b9150915081611637576116378686868685613bbb565b60006001600160e01b031982166380ac58cd60e01b148061272157506001600160e01b03198216635b5e139f60e01b145b80610ec25750610ec282613c58565b6000546001600160a01b031633146116d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ce8565b6000818152600c60205260409020546001600160a01b03166125c15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610ce8565b6000818152600e6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061281e82611503565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60007f5555555555555555555555555555555555555555555555555555555555555555600183901c167f555555555555555555555555555555555555555555555555555555555555555583166128ad9190614ed8565b91507f3333333333333333333333333333333333333333333333333333333333333333600283901c167f333333333333333333333333333333333333333333333333333333333333333383166129039190614ed8565b91507f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f600483901c167f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f83166129599190614ed8565b91507eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff600883901c167eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff83166129ad9190614ed8565b91507dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff601083901c167dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff83166129ff9190614ed8565b91507bffffffff00000000ffffffff00000000ffffffff00000000ffffffff602083901c167bffffffff00000000ffffffff00000000ffffffff00000000ffffffff8316612a4d9190614ed8565b915077ffffffffffffffff0000000000000000ffffffffffffffff604083901c1677ffffffffffffffff0000000000000000ffffffffffffffff8316612a939190614ed8565b9150610ec2608083901c6fffffffffffffffffffffffffffffffff8416614ed8565b600080612ac183611503565b9050806001600160a01b0316846001600160a01b03161480612b0857506001600160a01b038082166000908152600f602090815260408083209388168352929052205460ff165b8061266f5750836001600160a01b0316612b2184610fe3565b6001600160a01b031614949350505050565b826001600160a01b0316612b4682611503565b6001600160a01b031614612baa5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610ce8565b6001600160a01b038216612c0c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ce8565b612c176000826127e9565b6001600160a01b0383166000908152600d60205260408120805460019290612c409084906150b4565b90915550506001600160a01b0382166000908152600d60205260408120805460019290612c6e908490614ed8565b90915550506000818152600c602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612d0957612d09614eac565b602090810291909101015292915050565b6000845111612d615760405162461bcd60e51b8152602060048201526013602482015272746f6b656e4964735b5d20697320656d70747960681b6044820152606401610ce8565b835160011480612d85575061ffff8616600090815260076020526040902054845111155b612ddc5760405162461bcd60e51b815260206004820152602260248201527f62617463682073697a65206578636565647320647374206261746368206c696d6044820152611a5d60f21b6064820152608401610ce8565b60005b8451811015612e1557612e0d888888888581518110612e0057612e00614eac565b6020026020010151613c8d565b600101612ddf565b50600060018686604051602001612e2e939291906151c4565b6040516020818303038152906040529050612e73876001848851600860008d61ffff1661ffff16815260200190815260200160002054612e6e91906152e7565b613d78565b612e818782868686346136d9565b85604051612e8f9190615306565b6040518091039020886001600160a01b03168861ffff167fe1b87c47fdeb4f9cbadbca9df3af7aba453bb6e501075d0440d88125b711522a88604051612ed59190615322565b60405180910390a45050505050505050565b602081015160ff8116600114156130625760008083806020019051810190612f0f9190614fe7565b6014820151919450925090506000612f2989838386613292565b90508251811015612ffd5785516020808801919091206040805160808101825261ffff808e1682526001600160a01b0380881683870190815283850188815260016060860181815260008981526009909a529887902095518654935190941662010000026001600160b01b03199093169390941692909217178355519082015592516002909301805493151560ff199094169390931790925590517f10e0b70d256bccc84b7027506978bd8b68984a870788b93b479def144c839ad790612ff39083908a90615335565b60405180910390a1505b816001600160a01b0316886040516130159190615306565b60405180910390208a61ffff167f5b821db8a46f8ecbe1941ba2f51cfeea9643268b56631f70d45e2a745d990265866040516130519190615322565b60405180910390a450505050610fdc565b60ff811660021415610fdc57600082806020019051810190613084919061534e565b8051909250905060005b8181101561313a57600060128483815181106130ac576130ac614eac565b602002602001015160000151815481106130c8576130c8614eac565b906000526020600020015490508382815181106130e7576130e7614eac565b6020026020010151602001518117601285848151811061310957613109614eac565b6020026020010151600001518154811061312557613125614eac565b6000918252602090912001555060010161308e565b50856040516131499190615306565b60405180910390208761ffff167f3f87fd8a477104807d0f98e80e5446db6b5df756b08a6a7437b19c8f02f4c0cd846040516131859190614d24565b60405180910390a350505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340a7bb10873088876132258a613621565b6040518663ffffffff1660e01b81526004016132459594939291906151fd565b6040805180830381865afa158015613261573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132859190615251565b9150915094509492505050565b6000825b825181101561266c576006545a10156132ae5761266c565b6132d286868584815181106132c5576132c5614eac565b6020026020010151613e57565b806132dc81615419565b915050613296565b6060816132f281601f614ed8565b10156133315760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610ce8565b61333b8284614ed8565b8451101561337f5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610ce8565b60608215801561339e57604051915060008252602082016040526133e8565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156133d75780518352602092830192016133bf565b5050858452601f01601f1916604052505b50949350505050565b816001600160a01b0316836001600160a01b031614156134535760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ce8565b6001600160a01b038381166000818152600f6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b8051600090815b8181101561356c57600060128583815181106134e5576134e5614eac565b6020026020010151600001518154811061350157613501614eac565b90600052602060002001549050600085838151811061352257613522614eac565b6020026020010151602001518216905085838151811061354457613544614eac565b60200260200101516020015181146135625750600095945050505050565b50506001016134c7565b5060019392505050565b805160005b8181101561111b5782818151811061359557613595614eac565b60200260200101516020015160128483815181106135b5576135b5614eac565b602002602001015160000151815481106135d1576135d1614eac565b90600052602060002001541860128483815181106135f1576135f1614eac565b6020026020010151600001518154811061360d5761360d614eac565b60009182526020909120015560010161357b565b6060600082116136735760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610ce8565b60115460019060009061368683866150b4565b61369091906152e7565b60105461369d9190614ed8565b6040516001600160f01b031960f085901b1660208201526022810182905290915060420160405160208183030381529060405292505050919050565b61ffff8616600090815260016020526040812080546136f790614e61565b80601f016020809104026020016040519081016040528092919081815260200182805461372390614e61565b80156137705780601f1061374557610100808354040283529160200191613770565b820191906000526020600020905b81548152906001019060200180831161375357829003601f168201915b505050505090508051600014156137e25760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610ce8565b6137ed878751613ee6565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613844908b9086908c908c908c908c90600401615434565b6000604051808303818588803b15801561385d57600080fd5b505af1158015613871573d6000803e3d6000fd5b505050505050505050505050565b61388a848484612b33565b61389684848484613f54565b6119e75760405162461bcd60e51b8152600401610ce89061549b565b6060816138d65750506040805180820190915260018152600360fc1b602082015290565b8160005b811561390057806138ea81615419565b91506138f99050600a83615503565b91506138da565b6000816001600160401b0381111561391a5761391a6145c5565b6040519080825280601f01601f191660200182016040528015613944576020820181803683370190505b5090505b841561266f576139596001836150b4565b9150613966600a86615517565b613971906030614ed8565b60f81b81838151811061398657613986614eac565b60200101906001600160f81b031916908160001a9053506139a8600a86615503565b9450613948565b60125460009081908190815b81811015613a2f576000601282815481106139d8576139d8614eac565b9060005260206000200154905060006139f082612857565b90508015613a0657613a03600186614ed8565b94505b613a108187614ed8565b9550878610613a255750929695505050505050565b50506001016139bb565b50600095945050505050565b600081613a4a57506000919050565b600160801b8210613a6857608091821c91613a65908261552b565b90505b680100000000000000008210613a8b57604091821c91613a88908261552b565b90505b6401000000008210613aaa57602091821c91613aa7908261552b565b90505b620100008210613ac757601091821c91613ac4908261552b565b90505b6101008210613ae357600891821c91613ae0908261552b565b90505b60108210613afe57600491821c91613afb908261552b565b90505b60048210613b1957600291821c91613b16908261552b565b90505b60028210613b2c57610ec260018261552b565b919050565b6000606060008060008661ffff166001600160401b03811115613b5657613b566145c5565b6040519080825280601f01601f191660200182016040528015613b80576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115613ba2578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051613bec9190615306565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90613c499087908790879087908790615550565b60405180910390a15050505050565b60006001600160e01b031982166322bac5d960e01b1480610ec257506301ffc9a760e01b6001600160e01b0319831614610ec2565b613c96336112ef565b613cf95760405162461bcd60e51b815260206004820152602e60248201527f4f4e46543732313a2073656e642063616c6c6572206973206e6f74206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610ce8565b836001600160a01b0316613d0c82611503565b6001600160a01b031614613d6d5760405162461bcd60e51b815260206004820152602260248201527f4f4e46543732313a2073656e642066726f6d20696e636f7272656374206f776e60448201526132b960f11b6064820152608401610ce8565b6119e7843083612b33565b6000613d838361404f565b61ffff808716600090815260026020908152604080832093891683529290529081205491925090613db5908490614ed8565b905060008111613e075760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610ce8565b808210156116375760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610ce8565b6000818152600c60205260409020546001600160a01b03161580613eac57506000818152600c60205260409020546001600160a01b031615158015613eac575030613ea182611503565b6001600160a01b0316145b613eb557600080fd5b6000818152600c60205260409020546001600160a01b0316613edb5761111b82826140ab565b61111b308383612b33565b61ffff821660009081526003602052604090205480613f0457506127105b8082111561111b5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610ce8565b60006001600160a01b0384163b1561404757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613f989033908990889088906004016155a2565b6020604051808303816000875af1925050508015613fd3575060408051601f3d908101601f19168201909252613fd0918101906155d5565b60015b61402d573d808015614001576040519150601f19603f3d011682016040523d82523d6000602084013e614006565b606091505b5080516140255760405162461bcd60e51b8152600401610ce89061549b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061266f565b50600161266f565b60006022825110156140a35760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610ce8565b506022015190565b611bd58282604051806020016040528060008152506140ca83836140f3565b6140d76000848484613f54565b61111b5760405162461bcd60e51b8152600401610ce89061549b565b6001600160a01b0382166141495760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ce8565b6000818152600c60205260409020546001600160a01b0316156141ae5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ce8565b6001600160a01b0382166000908152600d602052604081208054600192906141d7908490614ed8565b90915550506000818152600c602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461424190614e61565b90600052602060002090601f01602090048101928261426357600085556142a9565b82601f1061427c57805160ff19168380011785556142a9565b828001600101855582156142a9579182015b828111156142a957825182559160200191906001019061428e565b506142b592915061432d565b5090565b8280546142c590614e61565b90600052602060002090601f0160209004810192826142e757600085556142a9565b82601f106143005782800160ff198235161785556142a9565b828001600101855582156142a9579182015b828111156142a9578235825591602001919060010190614312565b5b808211156142b5576000815560010161432e565b61ffff811681146125c157600080fd5b60008083601f84011261436457600080fd5b5081356001600160401b0381111561437b57600080fd5b60208301915083602082850101111561439357600080fd5b9250929050565b80356001600160401b0381168114613b2c57600080fd5b600080600080600080608087890312156143ca57600080fd5b86356143d581614342565b955060208701356001600160401b03808211156143f157600080fd5b6143fd8a838b01614352565b909750955085915061441160408a0161439a565b9450606089013591508082111561442757600080fd5b5061443489828a01614352565b979a9699509497509295939492505050565b6001600160e01b0319811681146125c157600080fd5b60006020828403121561446e57600080fd5b8135611bc381614446565b60005b8381101561449457818101518382015260200161447c565b838111156119e75750506000910152565b600081518084526144bd816020860160208601614479565b601f01601f19169290920160200192915050565b602081526000611bc360208301846144a5565b6000602082840312156144f657600080fd5b8135611bc381614342565b60006020828403121561451357600080fd5b5035919050565b6001600160a01b03811681146125c157600080fd5b8035613b2c8161451a565b6000806040838503121561454d57600080fd5b82356145588161451a565b946020939093013593505050565b6000806040838503121561457957600080fd5b823561455881614342565b60008060006060848603121561459957600080fd5b83356145a48161451a565b925060208401356145b48161451a565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156145fd576145fd6145c5565b60405290565b604051601f8201601f191681016001600160401b038111828210171561462b5761462b6145c5565b604052919050565b60006001600160401b0382111561464c5761464c6145c5565b50601f01601f191660200190565b600082601f83011261466b57600080fd5b813561467e61467982614633565b614603565b81815284602083860101111561469357600080fd5b816020850160208301376000918101602001919091529392505050565b80358015158114613b2c57600080fd5b600080600080600060a086880312156146d857600080fd5b85356146e381614342565b945060208601356001600160401b03808211156146ff57600080fd5b61470b89838a0161465a565b955060408801359450614720606089016146b0565b9350608088013591508082111561473657600080fd5b506147438882890161465a565b9150509295509295909350565b60008060006040848603121561476557600080fd5b833561477081614342565b925060208401356001600160401b0381111561478b57600080fd5b61479786828701614352565b9497909650939450505050565b600080600080600080600060e0888a0312156147bf57600080fd5b87356147ca8161451a565b965060208801356147da81614342565b955060408801356001600160401b03808211156147f657600080fd5b6148028b838c0161465a565b965060608a0135955060808a0135915061481b8261451a565b90935060a08901359061482d8261451a565b90925060c0890135908082111561484357600080fd5b506148508a828b0161465a565b91505092959891949750929550565b60008060006060848603121561487457600080fd5b833561487f81614342565b925060208401356001600160401b0381111561489a57600080fd5b6148a68682870161465a565b9250506148b56040850161439a565b90509250925092565b6000602082840312156148d057600080fd5b8135611bc38161451a565b600080604083850312156148ee57600080fd5b82356148f981614342565b9150602083013561490981614342565b809150509250929050565b60006001600160401b0382111561492d5761492d6145c5565b5060051b60200190565b600082601f83011261494857600080fd5b8135602061495861467983614914565b82815260069290921b8401810191818101908684111561497757600080fd5b8286015b848110156149b657604081890312156149945760008081fd5b61499c6145db565b81358152848201358582015283529183019160400161497b565b509695505050505050565b6000806000606084860312156149d657600080fd5b83356149e181614342565b925060208401356001600160401b038111156149fc57600080fd5b614a0886828701614937565b9250506148b5604085016146b0565b600060208284031215614a2957600080fd5b81356001600160401b03811115614a3f57600080fd5b61266f8482850161465a565b60008060408385031215614a5e57600080fd5b8235614a698161451a565b9150614a77602084016146b0565b90509250929050565b60008060008060808587031215614a9657600080fd5b8435614aa181614342565b935060208501356001600160401b03811115614abc57600080fd5b614ac887828801614937565b9350506040850135614ad98161451a565b91506060850135614ae98161451a565b939692955090935050565b600082601f830112614b0557600080fd5b81356020614b1561467983614914565b82815260059290921b84018101918181019086841115614b3457600080fd5b8286015b848110156149b65780358352918301918301614b38565b600080600080600080600060e0888a031215614b6a57600080fd5b8735614b758161451a565b96506020880135614b8581614342565b955060408801356001600160401b0380821115614ba157600080fd5b614bad8b838c0161465a565b965060608a0135915080821115614bc357600080fd5b614bcf8b838c01614af4565b9550614bdd60808b0161452f565b9450614beb60a08b0161452f565b935060c08a013591508082111561484357600080fd5b60008060008060808587031215614c1757600080fd5b8435614c228161451a565b93506020850135614c328161451a565b92506040850135915060608501356001600160401b03811115614c5457600080fd5b614c608782880161465a565b91505092959194509250565b600080600080600060808688031215614c8457600080fd5b8535614c8f81614342565b94506020860135614c9f81614342565b93506040860135925060608601356001600160401b03811115614cc157600080fd5b614ccd88828901614352565b969995985093965092949392505050565b600081518084526020808501945080840160005b83811015614d19578151805188528301518388015260409096019590820190600101614cf2565b509495945050505050565b602081526000611bc36020830184614cde565b600080600060608486031215614d4c57600080fd5b8335614d5781614342565b925060208401356145b481614342565b60008060408385031215614d7a57600080fd5b8235614d858161451a565b915060208301356149098161451a565b600080600080600060a08688031215614dad57600080fd5b8535614db881614342565b945060208601356001600160401b0380821115614dd457600080fd5b614de089838a0161465a565b95506040880135915080821115614df657600080fd5b614e0289838a01614af4565b9450614720606089016146b0565b60008060008060808587031215614e2657600080fd5b8435614e3181614342565b93506020850135614e4181614342565b92506040850135614e518161451a565b9396929550929360600135925050565b600181811c90821680614e7557607f821691505b60208210811415614e9657634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115614eeb57614eeb614ec2565b500190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061266c604083018486614f3e565b61ffff8316815260406020820152600061266f6040830184614cde565b600082601f830112614fb357600080fd5b8151614fc161467982614633565b818152846020838601011115614fd657600080fd5b61266f826020830160208701614479565b600080600060608486031215614ffc57600080fd5b835161500781614342565b809350506020808501516001600160401b038082111561502657600080fd5b61503288838901614fa2565b9450604087015191508082111561504857600080fd5b508501601f8101871361505a57600080fd5b805161506861467982614914565b81815260059190911b8201830190838101908983111561508757600080fd5b928401925b828410156150a55783518252928401929084019061508c565b80955050505050509250925092565b6000828210156150c6576150c6614ec2565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008351615103818460208801614479565b835190830190615117818360208801614479565b01949350505050565b600061ffff80881683528087166020840152508460408301526080606083015261514e608083018486614f3e565b979650505050505050565b61ffff86168152608060208201526000615177608083018688614f3e565b6001600160401b0394909416604083015250606001529392505050565b600081518084526020808501945080840160005b83811015614d19578151875295820195908201906001016151a8565b61ffff841681526060602082015260006151e160608301856144a5565b82810360408401526151f38185615194565b9695505050505050565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061522b908301866144a5565b8415156060840152828103608084015261524581856144a5565b98975050505050505050565b6000806040838503121561526457600080fd5b505080516020909101519092909150565b60006020828403121561528757600080fd5b81516001600160401b0381111561529d57600080fd5b61266f84828501614fa2565b61ffff851681526080602082015260006152c660808301866144a5565b6001600160401b0385166040840152828103606084015261514e81856144a5565b600081600019048311821515161561530157615301614ec2565b500290565b60008251615318818460208701614479565b9190910192915050565b602081526000611bc36020830184615194565b82815260406020820152600061266f60408301846144a5565b600080604080848603121561536257600080fd5b835161536d81614342565b809350506020808501516001600160401b0381111561538b57600080fd5b8501601f8101871361539c57600080fd5b80516153aa61467982614914565b81815260069190911b820183019083810190898311156153c957600080fd5b928401925b828410156154095785848b0312156153e65760008081fd5b6153ee6145db565b845181528585015186820152825292850192908401906153ce565b8096505050505050509250929050565b600060001982141561542d5761542d614ec2565b5060010190565b61ffff8716815260c06020820152600061545160c08301886144a5565b828103604084015261546381886144a5565b6001600160a01b0387811660608601528616608085015283810360a0850152905061548e81856144a5565b9998505050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082615512576155126154ed565b500490565b600082615526576155266154ed565b500690565b600060ff821660ff84168060ff0382111561554857615548614ec2565b019392505050565b61ffff8616815260a06020820152600061556d60a08301876144a5565b6001600160401b0386166040840152828103606084015261558e81866144a5565b9050828103608084015261524581856144a5565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906151f3908301846144a5565b6000602082840312156155e757600080fd5b8151611bc38161444656fea2646970667358221220fc16c29987a46dfecea78ed568583565b0933d08b8d48c682011384e71d847b064736f6c634300080c0033", + "deployedBytecode": "0x6080604052600436106103b75760003560e01c80638cfd8f5c116101f2578063baf3292d1161010d578063d807e9e9116100a0578063f23536411161006f578063f235364114610be7578063f2fde38b14610c07578063f5ecbdbc14610c27578063fa25f9b614610c4757600080fd5b8063d807e9e914610b31578063df2a5b3b14610b5e578063e985e9c514610b7e578063eb8d72b714610bc757600080fd5b8063ce30e2a9116100dc578063ce30e2a914610ac8578063d12473a514610ade578063d1deba1f14610afe578063d58778d614610b1157600080fd5b8063baf3292d14610a52578063c446183414610a72578063c87b56dd14610a88578063cbed8b9c14610aa857600080fd5b80639f38369a11610185578063ab3ffb9311610154578063ab3ffb93146109d6578063af3fb21c146109e9578063b353aaa7146109fe578063b88d4fde14610a3257600080fd5b80639f38369a14610963578063a22cb46514610983578063a3049482146109a3578063a6c3d165146109b657600080fd5b8063911611e7116101c1578063911611e7146108f8578063950c8a741461090e57806395d89b411461092e5780639ea5d6b11461094357600080fd5b80638cfd8f5c146108625780638da5cb5b1461089a5780638eca19b9146108b85780638ffa1f2a146108d857600080fd5b80632ea80877116102e25780635b8c41e6116102755780636a621d49116102445780636a621d49146107f857806370a082311461080d578063715018a61461082d5780637533d7881461084257600080fd5b80635b8c41e6146107495780636305cb97146107985780636352211e146107b857806366ad5c8a146107d857600080fd5b806342d65a8d116102b157806342d65a8d146106d357806348288190146106f35780634ac3f4ff14610709578063519056361461073657600080fd5b80632ea808771461063e5780633d8b38f6146106665780633f1f4fa41461068657806342842e0e146106b357600080fd5b80630df374831161035a57806322a3ecf91161032957806322a3ecf91461055057806323b872dd146105d35780632518552b146105f35780632a205e3d1461060957600080fd5b80630df37483146104cd5780630e751294146104ed57806310ddb1371461050d57806318ec341c1461052d57600080fd5b806307e0db171161039657806307e0db1714610435578063081812fc14610455578063095ea7b31461048d5780630b4cad4c146104ad57600080fd5b80621d3567146103bc57806301ffc9a7146103de57806306fdde0314610413575b600080fd5b3480156103c857600080fd5b506103dc6103d73660046143b1565b610c74565b005b3480156103ea57600080fd5b506103fe6103f936600461445c565b610ea5565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b50610428610ec8565b60405161040a91906144d1565b34801561044157600080fd5b506103dc6104503660046144e4565b610f5a565b34801561046157600080fd5b50610475610470366004614501565b610fe3565b6040516001600160a01b03909116815260200161040a565b34801561049957600080fd5b506103dc6104a836600461453a565b61100a565b3480156104b957600080fd5b506103dc6104c8366004614501565b611120565b3480156104d957600080fd5b506103dc6104e8366004614566565b6111c0565b3480156104f957600080fd5b506103dc610508366004614501565b6111df565b34801561051957600080fd5b506103dc6105283660046144e4565b61121c565b34801561053957600080fd5b50610542611274565b60405190815260200161040a565b34801561055c57600080fd5b506105a461056b366004614501565b60096020526000908152604090208054600182015460029092015461ffff821692620100009092046001600160a01b0316919060ff1684565b6040805161ffff90951685526001600160a01b039093166020850152918301521515606082015260800161040a565b3480156105df57600080fd5b506103dc6105ee366004614584565b6112ea565b3480156105ff57600080fd5b5061054260115481565b34801561061557600080fd5b506106296106243660046146c0565b61131c565b6040805192835260208301919091520161040a565b34801561064a57600080fd5b50610653600281565b60405161ffff909116815260200161040a565b34801561067257600080fd5b506103fe610681366004614750565b611342565b34801561069257600080fd5b506105426106a13660046144e4565b60036020526000908152604090205481565b3480156106bf57600080fd5b506103dc6106ce366004614584565b61140e565b3480156106df57600080fd5b506103dc6106ee366004614750565b611429565b3480156106ff57600080fd5b5061054260065481565b34801561071557600080fd5b506105426107243660046144e4565b60076020526000908152604090205481565b6103dc6107443660046147a4565b6114af565b34801561075557600080fd5b5061054261076436600461485f565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156107a457600080fd5b506103dc6107b3366004614501565b6114c6565b3480156107c457600080fd5b506104756107d3366004614501565b611503565b3480156107e457600080fd5b506103dc6107f33660046143b1565b611563565b34801561080457600080fd5b5061065360fa81565b34801561081957600080fd5b506105426108283660046148be565b61163f565b34801561083957600080fd5b506103dc6116c5565b34801561084e57600080fd5b5061042861085d3660046144e4565b6116d9565b34801561086e57600080fd5b5061054261087d3660046148db565b600260209081526000928352604080842090915290825290205481565b3480156108a657600080fd5b506000546001600160a01b0316610475565b3480156108c457600080fd5b506106296108d33660046149c1565b611773565b3480156108e457600080fd5b506103dc6108f3366004614a17565b6117b1565b34801561090457600080fd5b5061054260105481565b34801561091a57600080fd5b50600454610475906001600160a01b031681565b34801561093a57600080fd5b506104286119ed565b34801561094f57600080fd5b506103dc61095e366004614566565b6119fc565b34801561096f57600080fd5b5061042861097e3660046144e4565b611ab3565b34801561098f57600080fd5b506103dc61099e366004614a4b565b611bca565b6103dc6109b1366004614a80565b611bd9565b3480156109c257600080fd5b506103dc6109d1366004614750565b611cb6565b6103dc6109e4366004614b4f565b611d49565b3480156109f557600080fd5b50610653600181565b348015610a0a57600080fd5b506104757f000000000000000000000000000000000000000000000000000000000000000081565b348015610a3e57600080fd5b506103dc610a4d366004614c01565b611d58565b348015610a5e57600080fd5b506103dc610a6d3660046148be565b611d8a565b348015610a7e57600080fd5b5061054261271081565b348015610a9457600080fd5b50610428610aa3366004614501565b611de0565b348015610ab457600080fd5b506103dc610ac3366004614c6c565b611e53565b348015610ad457600080fd5b5061065361010081565b348015610aea57600080fd5b506103dc610af9366004614566565b611ee8565b6103dc610b0c3660046143b1565b611f98565b348015610b1d57600080fd5b50610542610b2c366004614501565b6121ae565b348015610b3d57600080fd5b50610b51610b4c366004614501565b6121cf565b60405161040a9190614d24565b348015610b6a57600080fd5b506103dc610b79366004614d37565b612371565b348015610b8a57600080fd5b506103fe610b99366004614d67565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205460ff1690565b348015610bd357600080fd5b506103dc610be2366004614750565b612423565b348015610bf357600080fd5b50610629610c02366004614d95565b61247d565b348015610c1357600080fd5b506103dc610c223660046148be565b61254b565b348015610c3357600080fd5b50610428610c42366004614e10565b6125c4565b348015610c5357600080fd5b50610542610c623660046144e4565b60086020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610cf15760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610d0f90614e61565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3b90614e61565b8015610d885780601f10610d5d57610100808354040283529160200191610d88565b820191906000526020600020905b815481529060010190602001808311610d6b57829003601f168201915b50505050509050805186869050148015610da3575060008151115b8015610dcb575080516020820120604051610dc19088908890614e9c565b6040518091039020145b610e265760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b6064820152608401610ce8565b610e9c8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061267792505050565b50505050505050565b60006001600160e01b031982161580610ec25750610ec2826126f0565b92915050565b6060600a8054610ed790614e61565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0390614e61565b8015610f505780601f10610f2557610100808354040283529160200191610f50565b820191906000526020600020905b815481529060010190602001808311610f3357829003601f168201915b5050505050905090565b610f62612730565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610fc857600080fd5b505af1158015610fdc573d6000803e3d6000fd5b5050505050565b6000610fee8261278a565b506000908152600e60205260409020546001600160a01b031690565b600061101582611503565b9050806001600160a01b0316836001600160a01b031614156110835760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610ce8565b336001600160a01b038216148061109f575061109f8133610b99565b6111115760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610ce8565b61111b83836127e9565b505050565b611128612730565b600081116111845760405162461bcd60e51b8152602060048201526024808201527f6d696e476173546f5472616e73666572416e6453746f7265206d7573742062656044820152630203e20360e41b6064820152608401610ce8565b60068190556040518181527ffebbc4f8bb9ec2313950c718d43123124b15778efda4c1f1d529de2995b4f34d906020015b60405180910390a150565b6111c8612730565b61ffff909116600090815260036020526040902055565b6111e7612730565b60118190556040518181527fe995f60b841a7336cf7af18b9017aab284c6678cf2a818f43c35098d5a901bc8906020016111b5565b611224612730565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610fae565b601254600090815b818110156112e55760006012828154811061129957611299614eac565b906000526020600020015411156112dd576112d0601282815481106112c0576112c0614eac565b9060005260206000200154612857565b6112da9084614ed8565b92505b60010161127c565b505090565b6112f5335b82612ab5565b6113115760405162461bcd60e51b8152600401610ce890614ef0565b61111b838383612b33565b600080611334878761132d88612ccf565b878761247d565b915091509550959350505050565b61ffff83166000908152600160205260408120805482919061136390614e61565b80601f016020809104026020016040519081016040528092919081815260200182805461138f90614e61565b80156113dc5780601f106113b1576101008083540402835291602001916113dc565b820191906000526020600020905b8154815290600101906020018083116113bf57829003601f168201915b5050505050905083836040516113f3929190614e9c565b60405180910390208180519060200120149150509392505050565b61111b83838360405180602001604052806000815250611d58565b611431612730565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d9061148190869086908690600401614f67565b600060405180830381600087803b15801561149b57600080fd5b505af1158015610e9c573d6000803e3d6000fd5b610e9c8787876114be88612ccf565b878787612d1a565b6114ce612730565b60108190556040518181527f872735ac071276affce3a0a7de8308e2d22a272718a68dcd010a42ec626ecb5f906020016111b5565b6000818152600c60205260408120546001600160a01b031680610ec25760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610ce8565b3330146115c15760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610ce8565b6116378686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f890181900481028201810190925287815289935091508790879081908401838280828437600092019190915250612ee792505050565b505050505050565b60006001600160a01b0382166116a95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610ce8565b506001600160a01b03166000908152600d602052604090205490565b6116cd612730565b6116d76000613196565b565b600160205260009081526040902080546116f290614e61565b80601f016020809104026020016040519081016040528092919081815260200182805461171e90614e61565b801561176b5780601f106117405761010080835404028352916020019161176b565b820191906000526020600020905b81548152906001019060200180831161174e57829003601f168201915b505050505081565b6000806117a58560028660405160200161178e929190614f85565b6040516020818303038152906040528651866131e6565b91509150935093915050565b80516020808301919091206000818152600990925260409091206002015460ff166118125760405162461bcd60e51b81526020600482015260116024820152701b9bc818dc99591a5d1cc81cdd1bdc9959607a1b6044820152606401610ce8565b6000828060200190518101906118289190614fe7565b60008581526009602052604081208054600190910154929550909350611866925061ffff811691620100009091046001600160a01b03169085613292565b60008481526009602052604090206001015490915081116118db5760405162461bcd60e51b815260206004820152602960248201527f6e6f7420656e6f7567682067617320746f2070726f6365737320637265646974604482015268103a3930b739b332b960b91b6064820152608401610ce8565b81518114156119535760008381526009602052604080822080546001600160b01b031916815560018101929092556002909101805460ff19169055517fd7be02b8dd0d27bd0517a9cb4d7469ce27df4313821ae5ec1ff69acc594ba233906119469085815260200190565b60405180910390a16119e7565b60408051608081018252600085815260096020818152848320805461ffff80821687526001600160a01b03620100008084048216868a019081529989018b8152600160608b01818152998f90529790965297519851169096026001600160b01b03199091169690951695909517939093178455915191830191909155516002909101805491151560ff199092169190911790555b50505050565b6060600b8054610ed790614e61565b611a04612730565b60008111611a5f5760405162461bcd60e51b815260206004820152602260248201527f647374436861696e4964546f42617463684c696d6974206d757374206265203e604482015261020360f41b6064820152608401610ce8565b61ffff8216600081815260076020908152604091829020849055815192835282018390527f7315f7654d594ead24a30160ed9ba2d23247f543016b918343591e93d7afdb6d91015b60405180910390a15050565b61ffff8116600090815260016020526040812080546060929190611ad690614e61565b80601f0160208091040260200160405190810160405280929190818152602001828054611b0290614e61565b8015611b4f5780601f10611b2457610100808354040283529160200191611b4f565b820191906000526020600020905b815481529060010190602001808311611b3257829003601f168201915b50505050509050805160001415611ba85760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610ce8565b611bc3600060148351611bbb91906150b4565b8391906132e4565b9392505050565b611bd53383836133f1565b5050565b611be1612730565b611bea836134c0565b611c265760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401610ce8565b611c2f83613576565b6000600284604051602001611c45929190614f85565b60405160208183030381529060405290506000611c628551613621565b9050611c728683868685346136d9565b8561ffff167f9a72ab77f30e4ce04bdedd777b2dc64764e70205166233d02bd8411af912c44386604051611ca69190614d24565b60405180910390a2505050505050565b611cbe612730565b818130604051602001611cd3939291906150cb565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251611d0893919290910190614235565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611d3c93929190614f67565b60405180910390a1505050565b610e9c87878787878787612d1a565b611d623383612ab5565b611d7e5760405162461bcd60e51b8152600401610ce890614ef0565b6119e78484848461387f565b611d92612730565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020016111b5565b6060611deb8261278a565b6000611e0260408051602081019091526000815290565b90506000815111611e225760405180602001604052806000815250611bc3565b80611e2c846138b2565b604051602001611e3d9291906150f1565b6040516020818303038152906040529392505050565b611e5b612730565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611eaf9088908890889088908890600401615120565b600060405180830381600087803b158015611ec957600080fd5b505af1158015611edd573d6000803e3d6000fd5b505050505050505050565b611ef0612730565b60008111611f4c5760405162461bcd60e51b815260206004820152602360248201527f647374436861696e4964546f5472616e73666572476173206d7573742062652060448201526203e20360ec1b6064820152608401610ce8565b61ffff8216600081815260086020908152604091829020849055815192835282018390527fc46df2983228ac2d9754e94a0d565e6671665dc8ad38602bc8e544f0685a29fb9101611aa7565b61ffff86166000908152600560205260408082209051611fbb9088908890614e9c565b90815260408051602092819003830190206001600160401b0387166000908152925290205490508061203b5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610ce8565b80838360405161204c929190614e9c565b6040518091039020146120ab5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610ce8565b61ffff871660009081526005602052604080822090516120ce9089908990614e9c565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252612166918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a935091508890889081908401838280828437600092019190915250612ee792505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e5878787878560405161219d959493929190615159565b60405180910390a150505050505050565b601281815481106121be57600080fd5b600091825260209091200154905081565b606060006121dc836139af565b90508061222b5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f75676820746f6b656e7320746f2064697374726962757465006044820152606401610ce8565b60125483906000836001600160401b0381111561224a5761224a6145c5565b60405190808252806020026020018201604052801561228f57816020015b60408051808201909152600080825260208201528152602001906001900390816122685790505b5090506000805b83811015612365576000601282815481106122b3576122b3614eac565b9060005260206000200154905080600014156122d25750600101612296565b856122dd5750612365565b6000805b8715612324576122f083613a3b565b600160ff9190911681811b948518949384179390925090612311908a6150b4565b98508361231e5750612324565b506122e1565b60405180604001604052808581526020018381525086868151811061234b5761234b614eac565b602090810291909101015250505060019182019101612296565b50909695505050505050565b612379612730565b600081116123c15760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b6044820152606401610ce8565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611d3c565b61242b612730565b61ffff831660009081526001602052604090206124499083836142b9565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611d3c93929190614f67565b600080600060018787604051602001612498939291906151c4565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906124fc908b90309086908b908b906004016151fd565b6040805180830381865afa158015612518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253c9190615251565b92509250509550959350505050565b612553612730565b6001600160a01b0381166125b85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ce8565b6125c181613196565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015612644573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261266c9190810190615275565b90505b949350505050565b6000806126da5a60966366ad5c8a60e01b8989898960405160240161269f94939291906152a9565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190613b31565b9150915081611637576116378686868685613bbb565b60006001600160e01b031982166380ac58cd60e01b148061272157506001600160e01b03198216635b5e139f60e01b145b80610ec25750610ec282613c58565b6000546001600160a01b031633146116d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ce8565b6000818152600c60205260409020546001600160a01b03166125c15760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610ce8565b6000818152600e6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061281e82611503565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60007f5555555555555555555555555555555555555555555555555555555555555555600183901c167f555555555555555555555555555555555555555555555555555555555555555583166128ad9190614ed8565b91507f3333333333333333333333333333333333333333333333333333333333333333600283901c167f333333333333333333333333333333333333333333333333333333333333333383166129039190614ed8565b91507f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f600483901c167f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f83166129599190614ed8565b91507eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff600883901c167eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff83166129ad9190614ed8565b91507dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff601083901c167dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff83166129ff9190614ed8565b91507bffffffff00000000ffffffff00000000ffffffff00000000ffffffff602083901c167bffffffff00000000ffffffff00000000ffffffff00000000ffffffff8316612a4d9190614ed8565b915077ffffffffffffffff0000000000000000ffffffffffffffff604083901c1677ffffffffffffffff0000000000000000ffffffffffffffff8316612a939190614ed8565b9150610ec2608083901c6fffffffffffffffffffffffffffffffff8416614ed8565b600080612ac183611503565b9050806001600160a01b0316846001600160a01b03161480612b0857506001600160a01b038082166000908152600f602090815260408083209388168352929052205460ff165b8061266f5750836001600160a01b0316612b2184610fe3565b6001600160a01b031614949350505050565b826001600160a01b0316612b4682611503565b6001600160a01b031614612baa5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610ce8565b6001600160a01b038216612c0c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610ce8565b612c176000826127e9565b6001600160a01b0383166000908152600d60205260408120805460019290612c409084906150b4565b90915550506001600160a01b0382166000908152600d60205260408120805460019290612c6e908490614ed8565b90915550506000818152600c602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612d0957612d09614eac565b602090810291909101015292915050565b6000845111612d615760405162461bcd60e51b8152602060048201526013602482015272746f6b656e4964735b5d20697320656d70747960681b6044820152606401610ce8565b835160011480612d85575061ffff8616600090815260076020526040902054845111155b612ddc5760405162461bcd60e51b815260206004820152602260248201527f62617463682073697a65206578636565647320647374206261746368206c696d6044820152611a5d60f21b6064820152608401610ce8565b60005b8451811015612e1557612e0d888888888581518110612e0057612e00614eac565b6020026020010151613c8d565b600101612ddf565b50600060018686604051602001612e2e939291906151c4565b6040516020818303038152906040529050612e73876001848851600860008d61ffff1661ffff16815260200190815260200160002054612e6e91906152e7565b613d78565b612e818782868686346136d9565b85604051612e8f9190615306565b6040518091039020886001600160a01b03168861ffff167fe1b87c47fdeb4f9cbadbca9df3af7aba453bb6e501075d0440d88125b711522a88604051612ed59190615322565b60405180910390a45050505050505050565b602081015160ff8116600114156130625760008083806020019051810190612f0f9190614fe7565b6014820151919450925090506000612f2989838386613292565b90508251811015612ffd5785516020808801919091206040805160808101825261ffff808e1682526001600160a01b0380881683870190815283850188815260016060860181815260008981526009909a529887902095518654935190941662010000026001600160b01b03199093169390941692909217178355519082015592516002909301805493151560ff199094169390931790925590517f10e0b70d256bccc84b7027506978bd8b68984a870788b93b479def144c839ad790612ff39083908a90615335565b60405180910390a1505b816001600160a01b0316886040516130159190615306565b60405180910390208a61ffff167f5b821db8a46f8ecbe1941ba2f51cfeea9643268b56631f70d45e2a745d990265866040516130519190615322565b60405180910390a450505050610fdc565b60ff811660021415610fdc57600082806020019051810190613084919061534e565b8051909250905060005b8181101561313a57600060128483815181106130ac576130ac614eac565b602002602001015160000151815481106130c8576130c8614eac565b906000526020600020015490508382815181106130e7576130e7614eac565b6020026020010151602001518117601285848151811061310957613109614eac565b6020026020010151600001518154811061312557613125614eac565b6000918252602090912001555060010161308e565b50856040516131499190615306565b60405180910390208761ffff167f3f87fd8a477104807d0f98e80e5446db6b5df756b08a6a7437b19c8f02f4c0cd846040516131859190614d24565b60405180910390a350505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340a7bb10873088876132258a613621565b6040518663ffffffff1660e01b81526004016132459594939291906151fd565b6040805180830381865afa158015613261573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132859190615251565b9150915094509492505050565b6000825b825181101561266c576006545a10156132ae5761266c565b6132d286868584815181106132c5576132c5614eac565b6020026020010151613e57565b806132dc81615419565b915050613296565b6060816132f281601f614ed8565b10156133315760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610ce8565b61333b8284614ed8565b8451101561337f5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610ce8565b60608215801561339e57604051915060008252602082016040526133e8565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156133d75780518352602092830192016133bf565b5050858452601f01601f1916604052505b50949350505050565b816001600160a01b0316836001600160a01b031614156134535760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610ce8565b6001600160a01b038381166000818152600f6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b8051600090815b8181101561356c57600060128583815181106134e5576134e5614eac565b6020026020010151600001518154811061350157613501614eac565b90600052602060002001549050600085838151811061352257613522614eac565b6020026020010151602001518216905085838151811061354457613544614eac565b60200260200101516020015181146135625750600095945050505050565b50506001016134c7565b5060019392505050565b805160005b8181101561111b5782818151811061359557613595614eac565b60200260200101516020015160128483815181106135b5576135b5614eac565b602002602001015160000151815481106135d1576135d1614eac565b90600052602060002001541860128483815181106135f1576135f1614eac565b6020026020010151600001518154811061360d5761360d614eac565b60009182526020909120015560010161357b565b6060600082116136735760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e20300000006044820152606401610ce8565b60115460019060009061368683866150b4565b61369091906152e7565b60105461369d9190614ed8565b6040516001600160f01b031960f085901b1660208201526022810182905290915060420160405160208183030381529060405292505050919050565b61ffff8616600090815260016020526040812080546136f790614e61565b80601f016020809104026020016040519081016040528092919081815260200182805461372390614e61565b80156137705780601f1061374557610100808354040283529160200191613770565b820191906000526020600020905b81548152906001019060200180831161375357829003601f168201915b505050505090508051600014156137e25760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610ce8565b6137ed878751613ee6565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613844908b9086908c908c908c908c90600401615434565b6000604051808303818588803b15801561385d57600080fd5b505af1158015613871573d6000803e3d6000fd5b505050505050505050505050565b61388a848484612b33565b61389684848484613f54565b6119e75760405162461bcd60e51b8152600401610ce89061549b565b6060816138d65750506040805180820190915260018152600360fc1b602082015290565b8160005b811561390057806138ea81615419565b91506138f99050600a83615503565b91506138da565b6000816001600160401b0381111561391a5761391a6145c5565b6040519080825280601f01601f191660200182016040528015613944576020820181803683370190505b5090505b841561266f576139596001836150b4565b9150613966600a86615517565b613971906030614ed8565b60f81b81838151811061398657613986614eac565b60200101906001600160f81b031916908160001a9053506139a8600a86615503565b9450613948565b60125460009081908190815b81811015613a2f576000601282815481106139d8576139d8614eac565b9060005260206000200154905060006139f082612857565b90508015613a0657613a03600186614ed8565b94505b613a108187614ed8565b9550878610613a255750929695505050505050565b50506001016139bb565b50600095945050505050565b600081613a4a57506000919050565b600160801b8210613a6857608091821c91613a65908261552b565b90505b680100000000000000008210613a8b57604091821c91613a88908261552b565b90505b6401000000008210613aaa57602091821c91613aa7908261552b565b90505b620100008210613ac757601091821c91613ac4908261552b565b90505b6101008210613ae357600891821c91613ae0908261552b565b90505b60108210613afe57600491821c91613afb908261552b565b90505b60048210613b1957600291821c91613b16908261552b565b90505b60028210613b2c57610ec260018261552b565b919050565b6000606060008060008661ffff166001600160401b03811115613b5657613b566145c5565b6040519080825280601f01601f191660200182016040528015613b80576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115613ba2578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051613bec9190615306565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90613c499087908790879087908790615550565b60405180910390a15050505050565b60006001600160e01b031982166322bac5d960e01b1480610ec257506301ffc9a760e01b6001600160e01b0319831614610ec2565b613c96336112ef565b613cf95760405162461bcd60e51b815260206004820152602e60248201527f4f4e46543732313a2073656e642063616c6c6572206973206e6f74206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610ce8565b836001600160a01b0316613d0c82611503565b6001600160a01b031614613d6d5760405162461bcd60e51b815260206004820152602260248201527f4f4e46543732313a2073656e642066726f6d20696e636f7272656374206f776e60448201526132b960f11b6064820152608401610ce8565b6119e7843083612b33565b6000613d838361404f565b61ffff808716600090815260026020908152604080832093891683529290529081205491925090613db5908490614ed8565b905060008111613e075760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610ce8565b808210156116375760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610ce8565b6000818152600c60205260409020546001600160a01b03161580613eac57506000818152600c60205260409020546001600160a01b031615158015613eac575030613ea182611503565b6001600160a01b0316145b613eb557600080fd5b6000818152600c60205260409020546001600160a01b0316613edb5761111b82826140ab565b61111b308383612b33565b61ffff821660009081526003602052604090205480613f0457506127105b8082111561111b5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610ce8565b60006001600160a01b0384163b1561404757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613f989033908990889088906004016155a2565b6020604051808303816000875af1925050508015613fd3575060408051601f3d908101601f19168201909252613fd0918101906155d5565b60015b61402d573d808015614001576040519150601f19603f3d011682016040523d82523d6000602084013e614006565b606091505b5080516140255760405162461bcd60e51b8152600401610ce89061549b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061266f565b50600161266f565b60006022825110156140a35760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610ce8565b506022015190565b611bd58282604051806020016040528060008152506140ca83836140f3565b6140d76000848484613f54565b61111b5760405162461bcd60e51b8152600401610ce89061549b565b6001600160a01b0382166141495760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610ce8565b6000818152600c60205260409020546001600160a01b0316156141ae5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610ce8565b6001600160a01b0382166000908152600d602052604081208054600192906141d7908490614ed8565b90915550506000818152600c602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461424190614e61565b90600052602060002090601f01602090048101928261426357600085556142a9565b82601f1061427c57805160ff19168380011785556142a9565b828001600101855582156142a9579182015b828111156142a957825182559160200191906001019061428e565b506142b592915061432d565b5090565b8280546142c590614e61565b90600052602060002090601f0160209004810192826142e757600085556142a9565b82601f106143005782800160ff198235161785556142a9565b828001600101855582156142a9579182015b828111156142a9578235825591602001919060010190614312565b5b808211156142b5576000815560010161432e565b61ffff811681146125c157600080fd5b60008083601f84011261436457600080fd5b5081356001600160401b0381111561437b57600080fd5b60208301915083602082850101111561439357600080fd5b9250929050565b80356001600160401b0381168114613b2c57600080fd5b600080600080600080608087890312156143ca57600080fd5b86356143d581614342565b955060208701356001600160401b03808211156143f157600080fd5b6143fd8a838b01614352565b909750955085915061441160408a0161439a565b9450606089013591508082111561442757600080fd5b5061443489828a01614352565b979a9699509497509295939492505050565b6001600160e01b0319811681146125c157600080fd5b60006020828403121561446e57600080fd5b8135611bc381614446565b60005b8381101561449457818101518382015260200161447c565b838111156119e75750506000910152565b600081518084526144bd816020860160208601614479565b601f01601f19169290920160200192915050565b602081526000611bc360208301846144a5565b6000602082840312156144f657600080fd5b8135611bc381614342565b60006020828403121561451357600080fd5b5035919050565b6001600160a01b03811681146125c157600080fd5b8035613b2c8161451a565b6000806040838503121561454d57600080fd5b82356145588161451a565b946020939093013593505050565b6000806040838503121561457957600080fd5b823561455881614342565b60008060006060848603121561459957600080fd5b83356145a48161451a565b925060208401356145b48161451a565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156145fd576145fd6145c5565b60405290565b604051601f8201601f191681016001600160401b038111828210171561462b5761462b6145c5565b604052919050565b60006001600160401b0382111561464c5761464c6145c5565b50601f01601f191660200190565b600082601f83011261466b57600080fd5b813561467e61467982614633565b614603565b81815284602083860101111561469357600080fd5b816020850160208301376000918101602001919091529392505050565b80358015158114613b2c57600080fd5b600080600080600060a086880312156146d857600080fd5b85356146e381614342565b945060208601356001600160401b03808211156146ff57600080fd5b61470b89838a0161465a565b955060408801359450614720606089016146b0565b9350608088013591508082111561473657600080fd5b506147438882890161465a565b9150509295509295909350565b60008060006040848603121561476557600080fd5b833561477081614342565b925060208401356001600160401b0381111561478b57600080fd5b61479786828701614352565b9497909650939450505050565b600080600080600080600060e0888a0312156147bf57600080fd5b87356147ca8161451a565b965060208801356147da81614342565b955060408801356001600160401b03808211156147f657600080fd5b6148028b838c0161465a565b965060608a0135955060808a0135915061481b8261451a565b90935060a08901359061482d8261451a565b90925060c0890135908082111561484357600080fd5b506148508a828b0161465a565b91505092959891949750929550565b60008060006060848603121561487457600080fd5b833561487f81614342565b925060208401356001600160401b0381111561489a57600080fd5b6148a68682870161465a565b9250506148b56040850161439a565b90509250925092565b6000602082840312156148d057600080fd5b8135611bc38161451a565b600080604083850312156148ee57600080fd5b82356148f981614342565b9150602083013561490981614342565b809150509250929050565b60006001600160401b0382111561492d5761492d6145c5565b5060051b60200190565b600082601f83011261494857600080fd5b8135602061495861467983614914565b82815260069290921b8401810191818101908684111561497757600080fd5b8286015b848110156149b657604081890312156149945760008081fd5b61499c6145db565b81358152848201358582015283529183019160400161497b565b509695505050505050565b6000806000606084860312156149d657600080fd5b83356149e181614342565b925060208401356001600160401b038111156149fc57600080fd5b614a0886828701614937565b9250506148b5604085016146b0565b600060208284031215614a2957600080fd5b81356001600160401b03811115614a3f57600080fd5b61266f8482850161465a565b60008060408385031215614a5e57600080fd5b8235614a698161451a565b9150614a77602084016146b0565b90509250929050565b60008060008060808587031215614a9657600080fd5b8435614aa181614342565b935060208501356001600160401b03811115614abc57600080fd5b614ac887828801614937565b9350506040850135614ad98161451a565b91506060850135614ae98161451a565b939692955090935050565b600082601f830112614b0557600080fd5b81356020614b1561467983614914565b82815260059290921b84018101918181019086841115614b3457600080fd5b8286015b848110156149b65780358352918301918301614b38565b600080600080600080600060e0888a031215614b6a57600080fd5b8735614b758161451a565b96506020880135614b8581614342565b955060408801356001600160401b0380821115614ba157600080fd5b614bad8b838c0161465a565b965060608a0135915080821115614bc357600080fd5b614bcf8b838c01614af4565b9550614bdd60808b0161452f565b9450614beb60a08b0161452f565b935060c08a013591508082111561484357600080fd5b60008060008060808587031215614c1757600080fd5b8435614c228161451a565b93506020850135614c328161451a565b92506040850135915060608501356001600160401b03811115614c5457600080fd5b614c608782880161465a565b91505092959194509250565b600080600080600060808688031215614c8457600080fd5b8535614c8f81614342565b94506020860135614c9f81614342565b93506040860135925060608601356001600160401b03811115614cc157600080fd5b614ccd88828901614352565b969995985093965092949392505050565b600081518084526020808501945080840160005b83811015614d19578151805188528301518388015260409096019590820190600101614cf2565b509495945050505050565b602081526000611bc36020830184614cde565b600080600060608486031215614d4c57600080fd5b8335614d5781614342565b925060208401356145b481614342565b60008060408385031215614d7a57600080fd5b8235614d858161451a565b915060208301356149098161451a565b600080600080600060a08688031215614dad57600080fd5b8535614db881614342565b945060208601356001600160401b0380821115614dd457600080fd5b614de089838a0161465a565b95506040880135915080821115614df657600080fd5b614e0289838a01614af4565b9450614720606089016146b0565b60008060008060808587031215614e2657600080fd5b8435614e3181614342565b93506020850135614e4181614342565b92506040850135614e518161451a565b9396929550929360600135925050565b600181811c90821680614e7557607f821691505b60208210811415614e9657634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115614eeb57614eeb614ec2565b500190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061266c604083018486614f3e565b61ffff8316815260406020820152600061266f6040830184614cde565b600082601f830112614fb357600080fd5b8151614fc161467982614633565b818152846020838601011115614fd657600080fd5b61266f826020830160208701614479565b600080600060608486031215614ffc57600080fd5b835161500781614342565b809350506020808501516001600160401b038082111561502657600080fd5b61503288838901614fa2565b9450604087015191508082111561504857600080fd5b508501601f8101871361505a57600080fd5b805161506861467982614914565b81815260059190911b8201830190838101908983111561508757600080fd5b928401925b828410156150a55783518252928401929084019061508c565b80955050505050509250925092565b6000828210156150c6576150c6614ec2565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b60008351615103818460208801614479565b835190830190615117818360208801614479565b01949350505050565b600061ffff80881683528087166020840152508460408301526080606083015261514e608083018486614f3e565b979650505050505050565b61ffff86168152608060208201526000615177608083018688614f3e565b6001600160401b0394909416604083015250606001529392505050565b600081518084526020808501945080840160005b83811015614d19578151875295820195908201906001016151a8565b61ffff841681526060602082015260006151e160608301856144a5565b82810360408401526151f38185615194565b9695505050505050565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061522b908301866144a5565b8415156060840152828103608084015261524581856144a5565b98975050505050505050565b6000806040838503121561526457600080fd5b505080516020909101519092909150565b60006020828403121561528757600080fd5b81516001600160401b0381111561529d57600080fd5b61266f84828501614fa2565b61ffff851681526080602082015260006152c660808301866144a5565b6001600160401b0385166040840152828103606084015261514e81856144a5565b600081600019048311821515161561530157615301614ec2565b500290565b60008251615318818460208701614479565b9190910192915050565b602081526000611bc36020830184615194565b82815260406020820152600061266f60408301846144a5565b600080604080848603121561536257600080fd5b835161536d81614342565b809350506020808501516001600160401b0381111561538b57600080fd5b8501601f8101871361539c57600080fd5b80516153aa61467982614914565b81815260069190911b820183019083810190898311156153c957600080fd5b928401925b828410156154095785848b0312156153e65760008081fd5b6153ee6145db565b845181528585015186820152825292850192908401906153ce565b8096505050505050509250929050565b600060001982141561542d5761542d614ec2565b5060010190565b61ffff8716815260c06020820152600061545160c08301886144a5565b828103604084015261546381886144a5565b6001600160a01b0387811660608601528616608085015283810360a0850152905061548e81856144a5565b9998505050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082615512576155126154ed565b500490565b600082615526576155266154ed565b500690565b600060ff821660ff84168060ff0382111561554857615548614ec2565b019392505050565b61ffff8616815260a06020820152600061556d60a08301876144a5565b6001600160401b0386166040840152828103606084015261558e81866144a5565b9050828103608084015261524581856144a5565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906151f3908301846144a5565b6000602082840312156155e757600080fd5b8151611bc38161444656fea2646970667358221220fc16c29987a46dfecea78ed568583565b0933d08b8d48c682011384e71d847b064736f6c634300080c0033", + "devdoc": { + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "constructor": { + "params": { + "_indexArray": "to set to all ones representing token ids available to mint", + "_layerZeroEndpoint": "handles message transmission across chains", + "_name": "the name of the token", + "_symbol": "the token symbol" + } + }, + "estimateSendFee(uint16,bytes,uint256,bool,bytes)": { + "details": "estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _tokenId - token Id to transfer _useZro - indicates to use zro to pay L0 fees _adapterParams - flexible bytes array to indicate messaging adapter services in L0" + }, + "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}." + }, + "sendBatchFrom(address,uint16,bytes,uint256[],address,address,bytes)": { + "details": "send tokens `_tokenIds[]` to (`_dstChainId`, `_toAddress`) from `_from` `_toAddress` can be any size depending on the `dstChainId`. `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services" + }, + "sendFrom(address,uint16,bytes,uint256,address,address,bytes)": { + "details": "send token `_tokenId` to (`_dstChainId`, `_toAddress`) from `_from` `_toAddress` can be any size depending on the `dstChainId`. `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services" + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenURI(uint256)": { + "details": "See {IERC721Metadata-tokenURI}." + }, + "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": { + "constructor": { + "notice": "Constructor for the DistributeONFT721" + } + }, + "notice": "DistributeONFT allows for contracts to distribute unused token ids to other chains. Default is set to 10,000 token ids w/ 2500 tokens on 4 chains. Uses uint[](40) to keep track of token ids on current chain. Each uint in the array uses 250 bits of its allotted 256 bits to represent token ids. If the bit is set to 1 then that token id can be minted. Token Ids are defined by where they are in the tokenIds array. For example: [0]: 1-250, [1]: 251-500, [2]: 501-750, ... , [40]: 9751-10000 Example using 8 bits to represent token distribution: Chain A | Chain B tokenIds[0]: 0xff | 0x0 tokenIds[1]: 0x0 | 0xff Binary equivalent: Chain A | Chain B tokenIds[0]: 1111 1111 | 0000 0000 tokenIds[1]: 0000 0000 | 1111 1111 In this scenario Chain A owns tokenIds: 1,2,3,4,5,6,7,8 and Chain B owns tokenIds: 9,10,11,12,13,14,15,16 Chain A wants to send over 2 Token Ids to Chain B Chain A | Chain B tokenIds[0]: 0x3f | 0xc0 tokenIds[1]: 0x0 | 0xff Binary equivalent: Chain A | Chain B tokenIds[0]: 0011 1111 | 1100 0000 tokenIds[1]: 0000 0000 | 1111 1111 Now Chain A owns tokenIds: 3,4,5,6,7,8 and Chain B owns tokenIds: 1,2,9,10,11,12,13,14,15,16*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4047, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 14681, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "trustedRemoteLookup", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint16,t_bytes_storage)" + }, + { + "astId": 14687, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "minDstGasLookup", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))" + }, + { + "astId": 14691, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "payloadSizeLimitLookup", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 14693, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "precrime", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 15230, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "failedMessages", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" + }, + { + "astId": 24486, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "minGasToTransferAndStore", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 24490, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "dstChainIdToBatchLimit", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 24494, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "dstChainIdToTransferGas", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 24499, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "storedCredits", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_bytes32,t_struct(StoredCredit)24484_storage)" + }, + { + "astId": 6798, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "_name", + "offset": 0, + "slot": "10", + "type": "t_string_storage" + }, + { + "astId": 6800, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "_symbol", + "offset": 0, + "slot": "11", + "type": "t_string_storage" + }, + { + "astId": 6804, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "_owners", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 6808, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "_balances", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 6812, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "_tokenApprovals", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 6818, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "_operatorApprovals", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 25140, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "distributeBaseDstGas", + "offset": 0, + "slot": "16", + "type": "t_uint256" + }, + { + "astId": 25143, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "distributeGasPerIdx", + "offset": 0, + "slot": "17", + "type": "t_uint256" + }, + { + "astId": 25182, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "tokenIds", + "offset": 0, + "slot": "18", + "type": "t_array(t_uint256)dyn_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "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_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "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_bytes32,t_struct(StoredCredit)24484_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct ONFT721Core.StoredCredit)", + "numberOfBytes": "32", + "value": "t_struct(StoredCredit)24484_storage" + }, + "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bytes32))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bytes32)" + }, + "t_mapping(t_uint16,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))" + }, + "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(uint16 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint16,t_uint256)" + }, + "t_mapping(t_uint16,t_uint256)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint64,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(StoredCredit)24484_storage": { + "encoding": "inplace", + "label": "struct ONFT721Core.StoredCredit", + "members": [ + { + "astId": 24477, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "srcChainId", + "offset": 0, + "slot": "0", + "type": "t_uint16" + }, + { + "astId": 24479, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "toAddress", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 24481, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "index", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 24483, + "contract": "contracts/token/onft/extension/DistributeONFT721.sol:DistributeONFT721", + "label": "creditsRemain", + "offset": 0, + "slot": "2", + "type": "t_bool" + } + ], + "numberOfBytes": "96" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/packages/verify-contract/test/__data__/deployments/fuji/ExampleOFTV2.json b/packages/verify-contract/test/__data__/deployments/fuji/ExampleOFTV2.json new file mode 100644 index 000000000..a51049e0d --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/fuji/ExampleOFTV2.json @@ -0,0 +1,1820 @@ +{ + "address": "0xDB0066c9Ca56D297ae627BEE3A9f9A1574907d24", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_layerZeroEndpoint", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_initialSupply", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "_sharedDecimals", + "type": "uint8" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + } + ], + "name": "CallOFTReceivedSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "NonContractAddress", + "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": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "_useCustomAdapterParams", + "type": "bool" + } + ], + "name": "SetUseCustomAdapterParams", + "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": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_EXTRA_GAS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PT_SEND_AND_CALL", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "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": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "_from", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_gasForCall", + "type": "uint256" + } + ], + "name": "callOnOFTReceived", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "circulatingSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "creditedPackets", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendAndCallFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "addedValue", + "type": "uint256" + } + ], + "name": "increaseAllowance", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_dstGasForCall", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes32", + "name": "_toAddress", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address payable", + "name": "refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "adapterParams", + "type": "bytes" + } + ], + "internalType": "struct ICommonOFT.LzCallParams", + "name": "_callParams", + "type": "tuple" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_useCustomAdapterParams", + "type": "bool" + } + ], + "name": "setUseCustomAdapterParams", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sharedDecimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "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": "token", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "useCustomAdapterParams", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x1081c480579f3c0f2f96d681eb3268807f70fb40c3e1dd0e05b70b5672d6ed08", + "receipt": { + "to": null, + "from": "0x28921b09dB1C7add63265e5ec79B008F0851D5DC", + "contractAddress": "0xDB0066c9Ca56D297ae627BEE3A9f9A1574907d24", + "transactionIndex": 0, + "gasUsed": "3904740", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000008000000002001000000000000000000000000000000000000020000000000000000000800000000000000000000000010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000800000000020000000000000000000000000000000000000000400000020000000040000000000", + "blockHash": "0x0d9aa10c0992577f0e3f322924302764a963ca6527c680f43b3e0e1b7bc59ccc", + "transactionHash": "0x1081c480579f3c0f2f96d681eb3268807f70fb40c3e1dd0e05b70b5672d6ed08", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 20397307, + "transactionHash": "0x1081c480579f3c0f2f96d681eb3268807f70fb40c3e1dd0e05b70b5672d6ed08", + "address": "0xDB0066c9Ca56D297ae627BEE3A9f9A1574907d24", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000028921b09db1c7add63265e5ec79b008f0851d5dc" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x0d9aa10c0992577f0e3f322924302764a963ca6527c680f43b3e0e1b7bc59ccc" + }, + { + "transactionIndex": 0, + "blockNumber": 20397307, + "transactionHash": "0x1081c480579f3c0f2f96d681eb3268807f70fb40c3e1dd0e05b70b5672d6ed08", + "address": "0xDB0066c9Ca56D297ae627BEE3A9f9A1574907d24", + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000028921b09db1c7add63265e5ec79b008f0851d5dc" + ], + "data": "0x00000000000000000000000000000000000000000000d3c21bcecceda1000000", + "logIndex": 1, + "blockHash": "0x0d9aa10c0992577f0e3f322924302764a963ca6527c680f43b3e0e1b7bc59ccc" + } + ], + "blockNumber": 20397307, + "cumulativeGasUsed": "3904740", + "status": 1, + "byzantium": true + }, + "args": [ + "0x93f54D755A063cE7bB9e6Ac47Eccc8e33411d706", + "1000000000000000000000000", + 6 + ], + "numDeployments": 1, + "solcInputHash": "7df41c471f28bca85d725749bcc65f30", + "metadata": "{\"compiler\":{\"version\":\"0.8.12+commit.f00d7308\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_layerZeroEndpoint\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_initialSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_sharedDecimals\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"}],\"name\":\"CallOFTReceivedSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"NonContractAddress\",\"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\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_useCustomAdapterParams\",\"type\":\"bool\"}],\"name\":\"SetUseCustomAdapterParams\",\"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\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NO_EXTRA_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PT_SEND_AND_CALL\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"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\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"_from\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_gasForCall\",\"type\":\"uint256\"}],\"name\":\"callOnOFTReceived\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"circulatingSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"creditedPackets\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendAndCallFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_dstGasForCall\",\"type\":\"uint64\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes32\",\"name\":\"_toAddress\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address payable\",\"name\":\"refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"adapterParams\",\"type\":\"bytes\"}],\"internalType\":\"struct ICommonOFT.LzCallParams\",\"name\":\"_callParams\",\"type\":\"tuple\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_useCustomAdapterParams\",\"type\":\"bool\"}],\"name\":\"setUseCustomAdapterParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sharedDecimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"token\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useCustomAdapterParams\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"circulatingSupply()\":{\"details\":\"returns the circulating amount of tokens on current chain\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"estimateSendFee(uint16,bytes32,uint256,bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _amount - amount of the tokens to transfer _useZro - indicates to use zro to pay L0 fees _adapterParam - flexible bytes array to indicate messaging adapter services in L0\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"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.\"},\"sendFrom(address,uint16,bytes32,uint256,(address,address,bytes))\":{\"details\":\"send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` `_from` the owner of token `_dstChainId` the destination chain identifier `_toAddress` can be any size depending on the `dstChainId`. `_amount` the quantity of tokens in wei `_refundAddress` the address LayerZero refunds if too much message fee is sent `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"token()\":{\"details\":\"returns the address of the ERC20 token\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"A LayerZero OmnichainFungibleToken example of BasedOFT\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Use this contract only on the BASE CHAIN. It locks tokens on source, on outgoing send(), and unlocks tokens when receiving from other chains.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/examples/ExampleOFTV2.sol\":\"ExampleOFTV2\"},\"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/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/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/examples/ExampleOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/oft/v2/OFTV2.sol\\\";\\n\\n/// @title A LayerZero OmnichainFungibleToken example of BasedOFT\\n/// @notice Use this contract only on the BASE CHAIN. It locks tokens on source, on outgoing send(), and unlocks tokens when receiving from other chains.\\ncontract ExampleOFTV2 is OFTV2 {\\n constructor(address _layerZeroEndpoint, uint _initialSupply, uint8 _sharedDecimals) OFTV2(\\\"ExampleOFT\\\", \\\"OFT\\\", _sharedDecimals, _layerZeroEndpoint) {\\n _mint(_msgSender(), _initialSupply);\\n }\\n}\\n\",\"keccak256\":\"0xf30d01de7dedf535949f60a94360c7206529041177dac7c791fd1f329bbc11e5\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xe9617a9f6db351b6ac4c9d5b1097798af59ad7f813e370e8cf69bb44addd8548\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0x909bf72002c91806f39a64172c12b4188219e8649deefbe8d862604d4f9d3faf\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xe3e50134e39aa3c0f916447d36367970c6e4df972d488b794227e0b052ce80d5\",\"license\":\"MIT\"},\"contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"../interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"../interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../util/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint constant public DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(_srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote), \\\"LzApp: invalid source sending contract\\\");\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams, uint _nativeFee) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(uint16 _dstChainId, uint16 _type, bytes memory _adapterParams, uint _extraGas) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type] + _extraGas;\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) { // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(uint16 _version, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _srcChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_srcChainId] = _path;\\n emit SetTrustedRemote(_srcChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(uint16 _dstChainId, uint16 _packetType, uint _minGas) external onlyOwner {\\n require(_minGas > 0, \\\"LzApp: invalid minGas\\\");\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0xf7a97c79e0670912e51cfe74a06bf049718640ac764706250a903a63fec6e0b6\",\"license\":\"MIT\"},\"contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../util/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft(), 150, abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload));\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload, bytes memory _reason) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function retryMessage(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x2afd4980a5850f45f2c4d7ec44d77b292a51b80f847566479548f89572065311\",\"license\":\"MIT\"},\"contracts/token/oft/v2/BaseOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./OFTCoreV2.sol\\\";\\nimport \\\"./IOFTV2.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract BaseOFTV2 is OFTCoreV2, ERC165, IOFTV2 {\\n\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) OFTCoreV2(_sharedDecimals, _lzEndpoint) {\\n }\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\\n }\\n\\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) public payable virtual override {\\n _sendAndCall(_from, _dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);\\n }\\n\\n /************************************************************************\\n * public view functions\\n ************************************************************************/\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IOFTV2).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);\\n }\\n\\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return _estimateSendAndCallFee(_dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _useZro, _adapterParams);\\n }\\n\\n function circulatingSupply() public view virtual override returns (uint);\\n\\n function token() public view virtual override returns (address);\\n}\\n\",\"keccak256\":\"0xbf09a6b713f3553a46d19047d172c6524d5615625d1c8fb019fa741c806d52b3\",\"license\":\"MIT\"},\"contracts/token/oft/v2/ICommonOFT.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface ICommonOFT is IERC165 {\\n\\n struct LzCallParams {\\n address payable refundAddress;\\n address zroPaymentAddress;\\n bytes adapterParams;\\n }\\n\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _amount - amount of the tokens to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParam - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n function estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n /**\\n * @dev returns the circulating amount of tokens on current chain\\n */\\n function circulatingSupply() external view returns (uint);\\n\\n /**\\n * @dev returns the address of the ERC20 token\\n */\\n function token() external view returns (address);\\n}\\n\",\"keccak256\":\"0x1d034ba786436c1fce8057352c87373098bd1d8026b24c8fbc7be28636d0c15d\",\"license\":\"MIT\"},\"contracts/token/oft/v2/IOFTReceiverV2.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity >=0.5.0;\\n\\ninterface IOFTReceiverV2 {\\n /**\\n * @dev Called by the OFT contract when tokens are received from source chain.\\n * @param _srcChainId The chain id of the source chain.\\n * @param _srcAddress The address of the OFT token contract on the source chain.\\n * @param _nonce The nonce of the transaction on the source chain.\\n * @param _from The address of the account who calls the sendAndCall() on the source chain.\\n * @param _amount The amount of tokens to transfer.\\n * @param _payload Additional data with no specified format.\\n */\\n function onOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, uint _amount, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0xf57e437ced3bc10bb333123bb49475dab47c7615b86401c4d872c29ad4928fd5\",\"license\":\"BUSL-1.1\"},\"contracts/token/oft/v2/IOFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ICommonOFT.sol\\\";\\n\\n/**\\n * @dev Interface of the IOFT core standard\\n */\\ninterface IOFTV2 is ICommonOFT {\\n\\n /**\\n * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_from` the owner of token\\n * `_dstChainId` the destination chain identifier\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_amount` the quantity of tokens in wei\\n * `_refundAddress` the address LayerZero refunds if too much message fee is sent\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, LzCallParams calldata _callParams) external payable;\\n\\n function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) external payable;\\n}\\n\",\"keccak256\":\"0xb1d31f341715347d49db4e2c0de27c49bbd70b5b3d9b0adb1050b2b3a305ab87\",\"license\":\"MIT\"},\"contracts/token/oft/v2/OFTCoreV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"../../../util/ExcessivelySafeCall.sol\\\";\\nimport \\\"./ICommonOFT.sol\\\";\\nimport \\\"./IOFTReceiverV2.sol\\\";\\n\\nabstract contract OFTCoreV2 is NonblockingLzApp {\\n using BytesLib for bytes;\\n using ExcessivelySafeCall for address;\\n\\n uint public constant NO_EXTRA_GAS = 0;\\n\\n // packet type\\n uint8 public constant PT_SEND = 0;\\n uint8 public constant PT_SEND_AND_CALL = 1;\\n\\n uint8 public immutable sharedDecimals;\\n\\n bool public useCustomAdapterParams;\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bool))) public creditedPackets;\\n\\n /**\\n * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\\n * `_nonce` is the outbound nonce\\n */\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes32 indexed _toAddress, uint _amount);\\n\\n /**\\n * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.\\n * `_nonce` is the inbound nonce.\\n */\\n event ReceiveFromChain(uint16 indexed _srcChainId, address indexed _to, uint _amount);\\n\\n event SetUseCustomAdapterParams(bool _useCustomAdapterParams);\\n\\n event CallOFTReceivedSuccess(uint16 indexed _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _hash);\\n\\n event NonContractAddress(address _address);\\n\\n // _sharedDecimals should be the minimum decimals on all chains\\n constructor(uint8 _sharedDecimals, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\\n sharedDecimals = _sharedDecimals;\\n }\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function callOnOFTReceived(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes32 _from, address _to, uint _amount, bytes calldata _payload, uint _gasForCall) public virtual {\\n require(_msgSender() == address(this), \\\"OFTCore: caller must be OFTCore\\\");\\n\\n // send\\n _amount = _transferFrom(address(this), _to, _amount);\\n emit ReceiveFromChain(_srcChainId, _to, _amount);\\n\\n // call\\n IOFTReceiverV2(_to).onOFTReceived{gas: _gasForCall}(_srcChainId, _srcAddress, _nonce, _from, _amount, _payload);\\n }\\n\\n function setUseCustomAdapterParams(bool _useCustomAdapterParams) public virtual onlyOwner {\\n useCustomAdapterParams = _useCustomAdapterParams;\\n emit SetUseCustomAdapterParams(_useCustomAdapterParams);\\n }\\n\\n /************************************************************************\\n * internal functions\\n ************************************************************************/\\n function _estimateSendFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bool _useZro, bytes memory _adapterParams) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendFrom()\\n bytes memory payload = _encodeSendPayload(_toAddress, _ld2sd(_amount));\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _estimateSendAndCallFee(uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes memory _payload, uint64 _dstGasForCall, bool _useZro, bytes memory _adapterParams) internal view virtual returns (uint nativeFee, uint zroFee) {\\n // mock the payload for sendAndCall()\\n bytes memory payload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(_amount), _payload, _dstGasForCall);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {\\n uint8 packetType = _payload.toUint8(0);\\n\\n if (packetType == PT_SEND) {\\n _sendAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else if (packetType == PT_SEND_AND_CALL) {\\n _sendAndCallAck(_srcChainId, _srcAddress, _nonce, _payload);\\n } else {\\n revert(\\\"OFTCore: unknown packet type\\\");\\n }\\n }\\n\\n function _send(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual returns (uint amount) {\\n _checkAdapterParams(_dstChainId, PT_SEND, _adapterParams, NO_EXTRA_GAS);\\n\\n (amount,) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount); // amount returned should not have dust\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n bytes memory lzPayload = _encodeSendPayload(_toAddress, _ld2sd(amount));\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAck(uint16 _srcChainId, bytes memory, uint64, bytes memory _payload) internal virtual {\\n (address to, uint64 amountSD) = _decodeSendPayload(_payload);\\n if (to == address(0)) {\\n to = address(0xdead);\\n }\\n\\n uint amount = _sd2ld(amountSD);\\n amount = _creditTo(_srcChainId, to, amount);\\n\\n emit ReceiveFromChain(_srcChainId, to, amount);\\n }\\n\\n function _sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, bytes memory _payload, uint64 _dstGasForCall, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual returns (uint amount) {\\n _checkAdapterParams(_dstChainId, PT_SEND_AND_CALL, _adapterParams, _dstGasForCall);\\n\\n (amount,) = _removeDust(_amount);\\n amount = _debitFrom(_from, _dstChainId, _toAddress, amount);\\n require(amount > 0, \\\"OFTCore: amount too small\\\");\\n\\n // encode the msg.sender into the payload instead of _from\\n bytes memory lzPayload = _encodeSendAndCallPayload(msg.sender, _toAddress, _ld2sd(amount), _payload, _dstGasForCall);\\n _lzSend(_dstChainId, lzPayload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n\\n emit SendToChain(_dstChainId, _from, _toAddress, amount);\\n }\\n\\n function _sendAndCallAck(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual {\\n (bytes32 from, address to, uint64 amountSD, bytes memory payloadForCall, uint64 gasForCall) = _decodeSendAndCallPayload(_payload);\\n\\n bool credited = creditedPackets[_srcChainId][_srcAddress][_nonce];\\n uint amount = _sd2ld(amountSD);\\n\\n // credit to this contract first, and then transfer to receiver only if callOnOFTReceived() succeeds\\n if (!credited) {\\n amount = _creditTo(_srcChainId, address(this), amount);\\n creditedPackets[_srcChainId][_srcAddress][_nonce] = true;\\n }\\n\\n if (!_isContract(to)) {\\n emit NonContractAddress(to);\\n return;\\n }\\n\\n // workaround for stack too deep\\n uint16 srcChainId = _srcChainId;\\n bytes memory srcAddress = _srcAddress;\\n uint64 nonce = _nonce;\\n bytes memory payload = _payload;\\n bytes32 from_ = from;\\n address to_ = to;\\n uint amount_ = amount;\\n bytes memory payloadForCall_ = payloadForCall;\\n\\n // no gas limit for the call if retry\\n uint gas = credited ? gasleft() : gasForCall;\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft(), 150, abi.encodeWithSelector(this.callOnOFTReceived.selector, srcChainId, srcAddress, nonce, from_, to_, amount_, payloadForCall_, gas));\\n\\n if (success) {\\n bytes32 hash = keccak256(payload);\\n emit CallOFTReceivedSuccess(srcChainId, srcAddress, nonce, hash);\\n } else {\\n // store the failed message into the nonblockingLzApp\\n _storeFailedMessage(srcChainId, srcAddress, nonce, payload, reason);\\n }\\n }\\n\\n function _isContract(address _account) internal view returns (bool) {\\n return _account.code.length > 0;\\n }\\n\\n function _checkAdapterParams(uint16 _dstChainId, uint16 _pkType, bytes memory _adapterParams, uint _extraGas) internal virtual {\\n if (useCustomAdapterParams) {\\n _checkGasLimit(_dstChainId, _pkType, _adapterParams, _extraGas);\\n } else {\\n require(_adapterParams.length == 0, \\\"OFTCore: _adapterParams must be empty.\\\");\\n }\\n }\\n\\n function _ld2sd(uint _amount) internal virtual view returns (uint64) {\\n uint amountSD = _amount / _ld2sdRate();\\n require(amountSD <= type(uint64).max, \\\"OFTCore: amountSD overflow\\\");\\n return uint64(amountSD);\\n }\\n\\n function _sd2ld(uint64 _amountSD) internal virtual view returns (uint) {\\n return _amountSD * _ld2sdRate();\\n }\\n\\n function _removeDust(uint _amount) internal virtual view returns (uint amountAfter, uint dust) {\\n dust = _amount % _ld2sdRate();\\n amountAfter = _amount - dust;\\n }\\n\\n function _encodeSendPayload(bytes32 _toAddress, uint64 _amountSD) internal virtual view returns (bytes memory) {\\n return abi.encodePacked(PT_SEND, _toAddress, _amountSD);\\n }\\n\\n function _decodeSendPayload(bytes memory _payload) internal virtual view returns (address to, uint64 amountSD) {\\n require(_payload.toUint8(0) == PT_SEND && _payload.length == 41, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n }\\n\\n function _encodeSendAndCallPayload(address _from, bytes32 _toAddress, uint64 _amountSD, bytes memory _payload, uint64 _dstGasForCall) internal virtual view returns (bytes memory) {\\n return abi.encodePacked(\\n PT_SEND_AND_CALL,\\n _toAddress,\\n _amountSD,\\n _addressToBytes32(_from),\\n _dstGasForCall,\\n _payload\\n );\\n }\\n\\n function _decodeSendAndCallPayload(bytes memory _payload) internal virtual view returns (bytes32 from, address to, uint64 amountSD, bytes memory payload, uint64 dstGasForCall) {\\n require(_payload.toUint8(0) == PT_SEND_AND_CALL, \\\"OFTCore: invalid payload\\\");\\n\\n to = _payload.toAddress(13); // drop the first 12 bytes of bytes32\\n amountSD = _payload.toUint64(33);\\n from = _payload.toBytes32(41);\\n dstGasForCall = _payload.toUint64(73);\\n payload = _payload.slice(81, _payload.length - 81);\\n }\\n\\n function _addressToBytes32(address _address) internal pure virtual returns (bytes32) {\\n return bytes32(uint(uint160(_address)));\\n }\\n\\n function _debitFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount) internal virtual returns (uint);\\n\\n function _creditTo(uint16 _srcChainId, address _toAddress, uint _amount) internal virtual returns (uint);\\n\\n function _transferFrom(address _from, address _to, uint _amount) internal virtual returns (uint);\\n\\n function _ld2sdRate() internal view virtual returns (uint);\\n}\\n\",\"keccak256\":\"0x89fa0c1355ae4173bac750ffde5e5a4e53723f4d1d0738fcac3e0780cc54f57d\",\"license\":\"MIT\"},\"contracts/token/oft/v2/OFTV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"./BaseOFTV2.sol\\\";\\n\\ncontract OFTV2 is BaseOFTV2, ERC20 {\\n\\n uint internal immutable ld2sdRate;\\n\\n constructor(string memory _name, string memory _symbol, uint8 _sharedDecimals, address _lzEndpoint) ERC20(_name, _symbol) BaseOFTV2(_sharedDecimals, _lzEndpoint) {\\n uint8 decimals = decimals();\\n require(_sharedDecimals <= decimals, \\\"OFT: sharedDecimals must be <= decimals\\\");\\n ld2sdRate = 10 ** (decimals - _sharedDecimals);\\n }\\n\\n /************************************************************************\\n * public functions\\n ************************************************************************/\\n function circulatingSupply() public view virtual override returns (uint) {\\n return totalSupply();\\n }\\n\\n function token() public view virtual override returns (address) {\\n return address(this);\\n }\\n\\n /************************************************************************\\n * internal functions\\n ************************************************************************/\\n function _debitFrom(address _from, uint16, bytes32, uint _amount) internal virtual override returns (uint) {\\n address spender = _msgSender();\\n if (_from != spender) _spendAllowance(_from, spender, _amount);\\n _burn(_from, _amount);\\n return _amount;\\n }\\n\\n function _creditTo(uint16, address _toAddress, uint _amount) internal virtual override returns (uint) {\\n _mint(_toAddress, _amount);\\n return _amount;\\n }\\n\\n function _transferFrom(address _from, address _to, uint _amount) internal virtual override returns (uint) {\\n address spender = _msgSender();\\n // if transfer from this contract, no need to check allowance\\n if (_from != address(this) && _from != spender) _spendAllowance(_from, spender, _amount);\\n _transfer(_from, _to, _amount);\\n return _amount;\\n }\\n\\n function _ld2sdRate() internal view virtual override returns (uint) {\\n return ld2sdRate;\\n }\\n}\\n\",\"keccak256\":\"0x0232fca007068612a9d212de6245701b9f343647b76cd00baea62695f4f7216c\",\"license\":\"MIT\"},\"contracts/util/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\n\\nlibrary BytesLib {\\n function concat(\\n bytes memory _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1 , \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(\\n bytes storage _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n view\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x2255aadad70e87ed42b158776330175644b07fbbc7e77ed32cd6330974abbcee\",\"license\":\"Unlicense\"},\"contracts/util/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint256 constant LOW_28_MASK =\\n 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf)\\n internal\\n pure\\n {\\n require(_buf.length >= 4);\\n uint256 _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x23942250ddd277c443fa27c6b4ab51e6b3b5e654548b6b9e8d785a88ebec4dfe\",\"license\":\"MIT OR Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60e06040523480156200001157600080fd5b506040516200493e3803806200493e833981016040819052620000349162000381565b6040518060400160405280600a815260200169115e185b5c1b1953d19560b21b8152506040518060400160405280600381526020016213d19560ea1b8152508285838383838181808062000097620000916200019d60201b60201c565b620001a1565b6001600160a01b0316608052505060ff1660a05250508151620000c290600b906020850190620002db565b508051620000d890600c906020840190620002db565b5050506000620000ed620001f160201b60201c565b90508060ff168360ff1611156200015b5760405162461bcd60e51b815260206004820152602760248201527f4f46543a20736861726564446563696d616c73206d757374206265203c3d20646044820152666563696d616c7360c81b60648201526084015b60405180910390fd5b620001678382620003ef565b6200017490600a62000514565b60c052506200019493506200018d9250506200019d9050565b83620001f6565b50505062000584565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b601290565b6001600160a01b0382166200024e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640162000152565b80600a60008282546200026291906200052c565b90915550506001600160a01b03821660009081526008602052604081208054839290620002919084906200052c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b828054620002e99062000547565b90600052602060002090601f0160209004810192826200030d576000855562000358565b82601f106200032857805160ff191683800117855562000358565b8280016001018555821562000358579182015b82811115620003585782518255916020019190600101906200033b565b50620003669291506200036a565b5090565b5b808211156200036657600081556001016200036b565b6000806000606084860312156200039757600080fd5b83516001600160a01b0381168114620003af57600080fd5b60208501516040860151919450925060ff81168114620003ce57600080fd5b809150509250925092565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8416808210156200040c576200040c620003d9565b90039392505050565b600181815b80851115620004565781600019048211156200043a576200043a620003d9565b808516156200044857918102915b93841c93908002906200041a565b509250929050565b6000826200046f575060016200050e565b816200047e575060006200050e565b8160018114620004975760028114620004a257620004c2565b60019150506200050e565b60ff841115620004b657620004b6620003d9565b50506001821b6200050e565b5060208310610133831016604e8410600b8410161715620004e7575081810a6200050e565b620004f3838362000415565b80600019048211156200050a576200050a620003d9565b0290505b92915050565b60006200052560ff8416836200045e565b9392505050565b60008219821115620005425762000542620003d9565b500190565b600181811c908216806200055c57607f821691505b602082108114156200057e57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05161433d620006016000396000818161274d01528181612b470152612e240152600061064001526000818161081a015281816109ca01528181610ce201528181610da201528181610f5f015281816115c701528181611b91015281816120b8015281816125390152612cdb015261433d6000f3fe6080604052600436106102e35760003560e01c80638cfd8f5c11610190578063c4461834116100dc578063eab45d9c11610095578063ed629c5c1161006f578063ed629c5c1461095a578063f2fde38b14610974578063f5ecbdbc14610994578063fc0c546a146109b457600080fd5b8063eab45d9c146108fa578063eaffd49a1461091a578063eb8d72b71461093a57600080fd5b8063c44618341461085c578063cbed8b9c14610872578063d1deba1f14610892578063dd62ed3e146108a5578063df2a5b3b146108c5578063e6a20ae6146108e557600080fd5b80639f38369a11610149578063a6c3d16511610123578063a6c3d165146107c8578063a9059cbb146107e8578063b353aaa714610808578063baf3292d1461083c57600080fd5b80639f38369a14610768578063a457c2d714610788578063a4c51df5146107a857600080fd5b80638cfd8f5c146106625780638da5cb5b1461069a5780639358928b146106cc578063950c8a74146106e157806395d89b41146107015780639bdb98121461071657600080fd5b80633d8b38f61161024f57806366ad5c8a11610208578063715018a6116101e2578063715018a6146105e65780637533d788146105fb57806376203b481461061b578063857749b01461062e57600080fd5b806366ad5c8a1461057d578063695ef6bf1461059d57806370a08231146105b057600080fd5b80633d8b38f6146104975780633f1f4fa4146104b757806342d65a8d146104e457806344770515146105045780634c42899a146105195780635b8c41e61461052e57600080fd5b806310ddb137116102a157806310ddb137146103c157806318160ddd146103e157806323b872dd14610400578063313ce56714610420578063365260b414610442578063395093511461047757600080fd5b80621d3567146102e857806301ffc9a71461030a57806306fdde031461033f57806307e0db1714610361578063095ea7b3146103815780630df37483146103a1575b600080fd5b3480156102f457600080fd5b50610308610303366004613595565b6109c7565b005b34801561031657600080fd5b5061032a610325366004613628565b610bf8565b60405190151581526020015b60405180910390f35b34801561034b57600080fd5b50610354610c2f565b60405161033691906136aa565b34801561036d57600080fd5b5061030861037c3660046136bd565b610cc1565b34801561038d57600080fd5b5061032a61039c3660046136ed565b610d4a565b3480156103ad57600080fd5b506103086103bc366004613719565b610d62565b3480156103cd57600080fd5b506103086103dc3660046136bd565b610d81565b3480156103ed57600080fd5b50600a545b604051908152602001610336565b34801561040c57600080fd5b5061032a61041b366004613735565b610dd9565b34801561042c57600080fd5b5060125b60405160ff9091168152602001610336565b34801561044e57600080fd5b5061046261045d366004613786565b610dfd565b60408051928352602083019190915201610336565b34801561048357600080fd5b5061032a6104923660046136ed565b610e52565b3480156104a357600080fd5b5061032a6104b23660046137eb565b610e74565b3480156104c357600080fd5b506103f26104d23660046136bd565b60036020526000908152604090205481565b3480156104f057600080fd5b506103086104ff3660046137eb565b610f40565b34801561051057600080fd5b506103f2600081565b34801561052557600080fd5b50610430600081565b34801561053a57600080fd5b506103f26105493660046138aa565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561058957600080fd5b50610308610598366004613595565b610fc6565b6103086105ab366004613962565b6110a2565b3480156105bc57600080fd5b506103f26105cb3660046139d5565b6001600160a01b031660009081526008602052604090205490565b3480156105f257600080fd5b5061030861110d565b34801561060757600080fd5b506103546106163660046136bd565b611121565b6103086106293660046139f2565b6111bb565b34801561063a57600080fd5b506104307f000000000000000000000000000000000000000000000000000000000000000081565b34801561066e57600080fd5b506103f261067d366004613aa4565b600260209081526000928352604080842090915290825290205481565b3480156106a657600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610336565b3480156106d857600080fd5b506103f261126a565b3480156106ed57600080fd5b506004546106b4906001600160a01b031681565b34801561070d57600080fd5b5061035461127a565b34801561072257600080fd5b5061032a6107313660046138aa565b6007602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b34801561077457600080fd5b506103546107833660046136bd565b611289565b34801561079457600080fd5b5061032a6107a33660046136ed565b6113a0565b3480156107b457600080fd5b506104626107c3366004613ad7565b61141b565b3480156107d457600080fd5b506103086107e33660046137eb565b6114aa565b3480156107f457600080fd5b5061032a6108033660046136ed565b61153d565b34801561081457600080fd5b506106b47f000000000000000000000000000000000000000000000000000000000000000081565b34801561084857600080fd5b506103086108573660046139d5565b61154b565b34801561086857600080fd5b506103f261271081565b34801561087e57600080fd5b5061030861088d366004613b90565b6115a8565b6103086108a0366004613595565b611632565b3480156108b157600080fd5b506103f26108c0366004613bfe565b611848565b3480156108d157600080fd5b506103086108e0366004613c37565b611873565b3480156108f157600080fd5b50610430600181565b34801561090657600080fd5b50610308610915366004613c73565b611925565b34801561092657600080fd5b50610308610935366004613c8e565b61196e565b34801561094657600080fd5b506103086109553660046137eb565b611a8d565b34801561096657600080fd5b5060065461032a9060ff1681565b34801561098057600080fd5b5061030861098f3660046139d5565b611ae7565b3480156109a057600080fd5b506103546109af366004613d56565b611b60565b3480156109c057600080fd5b50306106b4565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610a445760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610a6290613da3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8e90613da3565b8015610adb5780601f10610ab057610100808354040283529160200191610adb565b820191906000526020600020905b815481529060010190602001808311610abe57829003601f168201915b50505050509050805186869050148015610af6575060008151115b8015610b1e575080516020820120604051610b149088908890613dd8565b6040518091039020145b610b795760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b6064820152608401610a3b565b610bef8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a935091508890889081908401838280828437600092019190915250611c1192505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610c2957506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600b8054610c3e90613da3565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6a90613da3565b8015610cb75780601f10610c8c57610100808354040283529160200191610cb7565b820191906000526020600020905b815481529060010190602001808311610c9a57829003601f168201915b5050505050905090565b610cc9611c8a565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610d2f57600080fd5b505af1158015610d43573d6000803e3d6000fd5b5050505050565b600033610d58818585611ce4565b5060019392505050565b610d6a611c8a565b61ffff909116600090815260036020526040902055565b610d89611c8a565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610d15565b600033610de7858285611e08565b610df2858585611e82565b506001949350505050565b600080610e438888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061205092505050565b91509150965096945050505050565b600033610d58818585610e658383611848565b610e6f9190613dfe565b611ce4565b61ffff831660009081526001602052604081208054829190610e9590613da3565b80601f0160208091040260200160405190810160405280929190818152602001828054610ec190613da3565b8015610f0e5780601f10610ee357610100808354040283529160200191610f0e565b820191906000526020600020905b815481529060010190602001808311610ef157829003601f168201915b505050505090508383604051610f25929190613dd8565b60405180910390208180519060200120149150509392505050565b610f48611c8a565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610f9890869086908690600401613e3f565b600060405180830381600087803b158015610fb257600080fd5b505af1158015610bef573d6000803e3d6000fd5b3330146110245760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610a3b565b61109a8686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061214492505050565b505050505050565b61109a858585856110b660208701876139d5565b6110c660408801602089016139d5565b6110d36040890189613e5d565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506121cb92505050565b611115611c8a565b61111f60006122b3565b565b6001602052600090815260409020805461113a90613da3565b80601f016020809104026020016040519081016040528092919081815260200182805461116690613da3565b80156111b35780601f10611188576101008083540402835291602001916111b3565b820191906000526020600020905b81548152906001019060200180831161119657829003601f168201915b505050505081565b61125f8888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a925061120891505060208901896139d5565b61121860408a0160208b016139d5565b61122560408b018b613e5d565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061230392505050565b505050505050505050565b6000611275600a5490565b905090565b6060600c8054610c3e90613da3565b61ffff81166000908152600160205260408120805460609291906112ac90613da3565b80601f01602080910402602001604051908101604052809291908181526020018280546112d890613da3565b80156113255780601f106112fa57610100808354040283529160200191611325565b820191906000526020600020905b81548152906001019060200180831161130857829003601f168201915b5050505050905080516000141561137e5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610a3b565b6113996000601483516113919190613ea3565b8391906123ff565b9392505050565b600033816113ae8286611848565b90508381101561140e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610a3b565b610df28286868403611ce4565b6000806114988b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c908190840183828082843760009201919091525061250c92505050565b91509150995099975050505050505050565b6114b2611c8a565b8181306040516020016114c793929190613eba565b60408051601f1981840301815291815261ffff851660009081526001602090815291902082516114fc93919290910190613412565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce83838360405161153093929190613e3f565b60405180910390a1505050565b600033610d58818585611e82565b611553611c8a565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020015b60405180910390a150565b6115b0611c8a565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c906116049088908890889088908890600401613ee0565b600060405180830381600087803b15801561161e57600080fd5b505af115801561125f573d6000803e3d6000fd5b61ffff861660009081526005602052604080822090516116559088908890613dd8565b90815260408051602092819003830190206001600160401b038716600090815292529020549050806116d55760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610a3b565b8083836040516116e6929190613dd8565b6040518091039020146117455760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610a3b565b61ffff871660009081526005602052604080822090516117689089908990613dd8565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611800918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061214492505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611837959493929190613f19565b60405180910390a150505050505050565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205490565b61187b611c8a565b600081116118c35760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b6044820152606401610a3b565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611530565b61192d611c8a565b6006805460ff19168215159081179091556040519081527f1584ad594a70cbe1e6515592e1272a987d922b097ead875069cebe8b40c004a49060200161159d565b3330146119bd5760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610a3b565b6119c83086866125c7565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf86604051611a0a91815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da908390611a4e908e908e908e908e908e908d908d908d90600401613f54565b600060405180830381600088803b158015611a6857600080fd5b5087f1158015611a7c573d6000803e3d6000fd5b505050505050505050505050505050565b611a95611c8a565b61ffff83166000908152600160205260409020611ab3908383613496565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161153093929190613e3f565b611aef611c8a565b6001600160a01b038116611b545760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a3b565b611b5d816122b3565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611be0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c089190810190613faf565b95945050505050565b600080611c745a60966366ad5c8a60e01b89898989604051602401611c39949392919061401c565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612619565b915091508161109a5761109a86868686856126a3565b6000546001600160a01b0316331461111f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a3b565b6001600160a01b038316611d465760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610a3b565b6001600160a01b038216611da75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610a3b565b6001600160a01b0383811660008181526009602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000611e148484611848565b90506000198114611e7c5781811015611e6f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610a3b565b611e7c8484848403611ce4565b50505050565b6001600160a01b038316611ee65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610a3b565b6001600160a01b038216611f485760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a3b565b6001600160a01b03831660009081526008602052604090205481811015611fc05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610a3b565b6001600160a01b03808516600090815260086020526040808220858503905591851681529081208054849290611ff7908490613dfe565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161204391815260200190565b60405180910390a3611e7c565b600080600061209e8761206288612745565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906120f5908b90309086908b908b9060040161405a565b6040805180830381865afa158015612111573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213591906140ae565b92509250509550959350505050565b600061215082826127cb565b905060ff811661216b5761216685858585612827565b610d43565b60ff81166001141561218357612166858585856128b7565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610a3b565b60006121d987828481612ac5565b6121e285612b3f565b5090506121f188888884612b7f565b90506000811161223f5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610a3b565b600061224e8761206284612745565b905061225e888287878734612bb1565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161229f91815260200190565b60405180910390a450979650505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061231b896001846001600160401b038916612ac5565b61232487612b3f565b5090506123338a8a8a84612b7f565b9050600081116123815760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610a3b565b6000612398338a61239185612745565b8a8a612d57565b90506123a88a8287878734612bb1565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a856040516123e991815260200190565b60405180910390a4509998505050505050505050565b60608161240d81601f613dfe565b101561244c5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610a3b565b6124568284613dfe565b8451101561249a5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610a3b565b6060821580156124b95760405191506000825260208201604052612503565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156124f25780518352602092830192016124da565b5050858452601f01601f1916604052505b50949350505050565b600080600061251f338a6123918b612745565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612576908d90309086908b908b9060040161405a565b6040805180830381865afa158015612592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125b691906140ae565b925092505097509795505050505050565b600033306001600160a01b038616148015906125f55750806001600160a01b0316856001600160a01b031614155b1561260557612605858285611e08565b612610858585611e82565b50909392505050565b6000606060008060008661ffff166001600160401b0381111561263e5761263e61383d565b6040519080825280601f01601f191660200182016040528015612668576020820181803683370190505b50905060008087516020890160008d8df191503d92508683111561268a578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff168152602001908152602001600020856040516126d491906140d2565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c9061273190879087908790879087906140ee565b60405180910390a15050505050565b505050565b6000806127727f000000000000000000000000000000000000000000000000000000000000000084614156565b90506001600160401b03811115610c295760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610a3b565b60006127d8826001613dfe565b8351101561281e5760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610a3b565b50016001015190565b60008061283383612d98565b90925090506001600160a01b03821661284c5761dead91505b600061285782612e1d565b9050612864878483612e52565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf836040516128a691815260200190565b60405180910390a350505050505050565b60008060008060006128c886612e65565b945094509450945094506000600760008b61ffff1661ffff168152602001908152602001600020896040516128fd91906140d2565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff16915061293085612e1d565b90508161299e576129428b3083612e52565b61ffff8c1660009081526007602052604090819020905191925060019161296a908d906140d2565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b6129f5576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a150505050505050611e7c565b8a8a8a8a8a8a868a60008a612a13578b6001600160401b0316612a15565b5a5b9050600080612a475a609663eaffd49a60e01b8e8e8e8d8d8d8d8d604051602401611c3998979695949392919061416a565b915091508115612aa0578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490612a92908e908e9086906141de565b60405180910390a250612aad565b612aad8b8b8b8b856126a3565b50505050505050505050505050505050505050505050565b60065460ff1615612ae157612adc84848484612f1c565b611e7c565b815115611e7c5760405162461bcd60e51b815260206004820152602660248201527f4f4654436f72653a205f61646170746572506172616d73206d7573742062652060448201526532b6b83a3c9760d11b6064820152608401610a3b565b600080612b6c7f00000000000000000000000000000000000000000000000000000000000000008461420c565b9050612b788184613ea3565b9150915091565b6000336001600160a01b0386168114612b9d57612b9d868285611e08565b612ba78684612ffb565b5090949350505050565b61ffff861660009081526001602052604081208054612bcf90613da3565b80601f0160208091040260200160405190810160405280929190818152602001828054612bfb90613da3565b8015612c485780601f10612c1d57610100808354040283529160200191612c48565b820191906000526020600020905b815481529060010190602001808311612c2b57829003601f168201915b50505050509050805160001415612cba5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610a3b565b612cc5878751613149565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490612d1c908b9086908c908c908c908c90600401614220565b6000604051808303818588803b158015612d3557600080fd5b505af1158015612d49573d6000803e3d6000fd5b505050505050505050505050565b6060600185856001600160a01b0389168587604051602001612d7e96959493929190614287565b604051602081830303815290604052905095945050505050565b60008080612da684826127cb565b60ff16148015612db7575082516029145b612dfe5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610a3b565b612e0983600d6131b7565b9150612e1683602161321c565b9050915091565b6000610c297f00000000000000000000000000000000000000000000000000000000000000006001600160401b0384166142e8565b6000612e5e8383613279565b5092915050565b600080806060816001612e7887836127cb565b60ff1614612ec35760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610a3b565b612ece86600d6131b7565b9350612edb86602161321c565b9250612ee8866029613358565b9450612ef586604961321c565b9050612f116051808851612f099190613ea3565b8891906123ff565b915091939590929450565b6000612f27836133b6565b61ffff808716600090815260026020908152604080832093891683529290529081205491925090612f59908490613dfe565b905060008111612fab5760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610a3b565b8082101561109a5760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610a3b565b6001600160a01b03821661305b5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610a3b565b6001600160a01b038216600090815260086020526040902054818110156130cf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610a3b565b6001600160a01b03831660009081526008602052604081208383039055600a80548492906130fe908490613ea3565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b61ffff82166000908152600360205260409020548061316757506127105b808211156127405760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610a3b565b60006131c4826014613dfe565b8351101561320c5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610a3b565b500160200151600160601b900490565b6000613229826008613dfe565b835110156132705760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610a3b565b50016008015190565b6001600160a01b0382166132cf5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610a3b565b80600a60008282546132e19190613dfe565b90915550506001600160a01b0382166000908152600860205260408120805483929061330e908490613dfe565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6000613365826020613dfe565b835110156133ad5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610a3b565b50016020015190565b600060228251101561340a5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610a3b565b506022015190565b82805461341e90613da3565b90600052602060002090601f0160209004810192826134405760008555613486565b82601f1061345957805160ff1916838001178555613486565b82800160010185558215613486579182015b8281111561348657825182559160200191906001019061346b565b5061349292915061350a565b5090565b8280546134a290613da3565b90600052602060002090601f0160209004810192826134c45760008555613486565b82601f106134dd5782800160ff19823516178555613486565b82800160010185558215613486579182015b828111156134865782358255916020019190600101906134ef565b5b80821115613492576000815560010161350b565b803561ffff8116811461353157600080fd5b919050565b60008083601f84011261354857600080fd5b5081356001600160401b0381111561355f57600080fd5b60208301915083602082850101111561357757600080fd5b9250929050565b80356001600160401b038116811461353157600080fd5b600080600080600080608087890312156135ae57600080fd5b6135b78761351f565b955060208701356001600160401b03808211156135d357600080fd5b6135df8a838b01613536565b90975095508591506135f360408a0161357e565b9450606089013591508082111561360957600080fd5b5061361689828a01613536565b979a9699509497509295939492505050565b60006020828403121561363a57600080fd5b81356001600160e01b03198116811461139957600080fd5b60005b8381101561366d578181015183820152602001613655565b83811115611e7c5750506000910152565b60008151808452613696816020860160208601613652565b601f01601f19169290920160200192915050565b602081526000611399602083018461367e565b6000602082840312156136cf57600080fd5b6113998261351f565b6001600160a01b0381168114611b5d57600080fd5b6000806040838503121561370057600080fd5b823561370b816136d8565b946020939093013593505050565b6000806040838503121561372c57600080fd5b61370b8361351f565b60008060006060848603121561374a57600080fd5b8335613755816136d8565b92506020840135613765816136d8565b929592945050506040919091013590565b8035801515811461353157600080fd5b60008060008060008060a0878903121561379f57600080fd5b6137a88761351f565b955060208701359450604087013593506137c460608801613776565b925060808701356001600160401b038111156137df57600080fd5b61361689828a01613536565b60008060006040848603121561380057600080fd5b6138098461351f565b925060208401356001600160401b0381111561382457600080fd5b61383086828701613536565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561387b5761387b61383d565b604052919050565b60006001600160401b0382111561389c5761389c61383d565b50601f01601f191660200190565b6000806000606084860312156138bf57600080fd5b6138c88461351f565b925060208401356001600160401b038111156138e357600080fd5b8401601f810186136138f457600080fd5b803561390761390282613883565b613853565b81815287602083850101111561391c57600080fd5b816020840160208301376000602083830101528094505050506139416040850161357e565b90509250925092565b60006060828403121561395c57600080fd5b50919050565b600080600080600060a0868803121561397a57600080fd5b8535613985816136d8565b94506139936020870161351f565b9350604086013592506060860135915060808601356001600160401b038111156139bc57600080fd5b6139c88882890161394a565b9150509295509295909350565b6000602082840312156139e757600080fd5b8135611399816136d8565b60008060008060008060008060e0898b031215613a0e57600080fd5b8835613a19816136d8565b9750613a2760208a0161351f565b9650604089013595506060890135945060808901356001600160401b0380821115613a5157600080fd5b613a5d8c838d01613536565b9096509450849150613a7160a08c0161357e565b935060c08b0135915080821115613a8757600080fd5b50613a948b828c0161394a565b9150509295985092959890939650565b60008060408385031215613ab757600080fd5b613ac08361351f565b9150613ace6020840161351f565b90509250929050565b600080600080600080600080600060e08a8c031215613af557600080fd5b613afe8a61351f565b985060208a0135975060408a0135965060608a01356001600160401b0380821115613b2857600080fd5b613b348d838e01613536565b9098509650869150613b4860808d0161357e565b9550613b5660a08d01613776565b945060c08c0135915080821115613b6c57600080fd5b50613b798c828d01613536565b915080935050809150509295985092959850929598565b600080600080600060808688031215613ba857600080fd5b613bb18661351f565b9450613bbf6020870161351f565b93506040860135925060608601356001600160401b03811115613be157600080fd5b613bed88828901613536565b969995985093965092949392505050565b60008060408385031215613c1157600080fd5b8235613c1c816136d8565b91506020830135613c2c816136d8565b809150509250929050565b600080600060608486031215613c4c57600080fd5b613c558461351f565b9250613c636020850161351f565b9150604084013590509250925092565b600060208284031215613c8557600080fd5b61139982613776565b6000806000806000806000806000806101008b8d031215613cae57600080fd5b613cb78b61351f565b995060208b01356001600160401b0380821115613cd357600080fd5b613cdf8e838f01613536565b909b509950899150613cf360408e0161357e565b985060608d0135975060808d01359150613d0c826136d8565b90955060a08c0135945060c08c01359080821115613d2957600080fd5b50613d368d828e01613536565b9150809450508092505060e08b013590509295989b9194979a5092959850565b60008060008060808587031215613d6c57600080fd5b613d758561351f565b9350613d836020860161351f565b92506040850135613d93816136d8565b9396929550929360600135925050565b600181811c90821680613db757607f821691505b6020821081141561395c57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115613e1157613e11613de8565b500190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611c08604083018486613e16565b6000808335601e19843603018112613e7457600080fd5b8301803591506001600160401b03821115613e8e57600080fd5b60200191503681900382131561357757600080fd5b600082821015613eb557613eb5613de8565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152613f0e608083018486613e16565b979650505050505050565b61ffff86168152608060208201526000613f37608083018688613e16565b6001600160401b0394909416604083015250606001529392505050565b61ffff8916815260c060208201526000613f7260c08301898b613e16565b6001600160401b038816604084015286606084015285608084015282810360a0840152613fa0818587613e16565b9b9a5050505050505050505050565b600060208284031215613fc157600080fd5b81516001600160401b03811115613fd757600080fd5b8201601f81018413613fe857600080fd5b8051613ff661390282613883565b81815285602083850101111561400b57600080fd5b611c08826020830160208601613652565b61ffff85168152608060208201526000614039608083018661367e565b6001600160401b03851660408401528281036060840152613f0e818561367e565b61ffff861681526001600160a01b038516602082015260a0604082018190526000906140889083018661367e565b841515606084015282810360808401526140a2818561367e565b98975050505050505050565b600080604083850312156140c157600080fd5b505080516020909101519092909150565b600082516140e4818460208701613652565b9190910192915050565b61ffff8616815260a06020820152600061410b60a083018761367e565b6001600160401b0386166040840152828103606084015261412c818661367e565b905082810360808401526140a2818561367e565b634e487b7160e01b600052601260045260246000fd5b60008261416557614165614140565b500490565b600061010061ffff8b1683528060208401526141888184018b61367e565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c085015290506141c8818661367e565b9150508260e08301529998505050505050505050565b6060815260006141f1606083018661367e565b6001600160401b039490941660208301525060400152919050565b60008261421b5761421b614140565b500690565b61ffff8716815260c06020820152600061423d60c083018861367e565b828103604084015261424f818861367e565b6001600160a01b0387811660608601528616608085015283810360a0850152905061427a818561367e565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b1660498401525082516142d6816051850160208701613652565b91909101605101979650505050505050565b600081600019048311821515161561430257614302613de8565b50029056fea2646970667358221220bf7f7e103f5ce7dce346a4397c6be5e247cfbed76166cae1c0a27024fc4025c664736f6c634300080c0033", + "deployedBytecode": "0x6080604052600436106102e35760003560e01c80638cfd8f5c11610190578063c4461834116100dc578063eab45d9c11610095578063ed629c5c1161006f578063ed629c5c1461095a578063f2fde38b14610974578063f5ecbdbc14610994578063fc0c546a146109b457600080fd5b8063eab45d9c146108fa578063eaffd49a1461091a578063eb8d72b71461093a57600080fd5b8063c44618341461085c578063cbed8b9c14610872578063d1deba1f14610892578063dd62ed3e146108a5578063df2a5b3b146108c5578063e6a20ae6146108e557600080fd5b80639f38369a11610149578063a6c3d16511610123578063a6c3d165146107c8578063a9059cbb146107e8578063b353aaa714610808578063baf3292d1461083c57600080fd5b80639f38369a14610768578063a457c2d714610788578063a4c51df5146107a857600080fd5b80638cfd8f5c146106625780638da5cb5b1461069a5780639358928b146106cc578063950c8a74146106e157806395d89b41146107015780639bdb98121461071657600080fd5b80633d8b38f61161024f57806366ad5c8a11610208578063715018a6116101e2578063715018a6146105e65780637533d788146105fb57806376203b481461061b578063857749b01461062e57600080fd5b806366ad5c8a1461057d578063695ef6bf1461059d57806370a08231146105b057600080fd5b80633d8b38f6146104975780633f1f4fa4146104b757806342d65a8d146104e457806344770515146105045780634c42899a146105195780635b8c41e61461052e57600080fd5b806310ddb137116102a157806310ddb137146103c157806318160ddd146103e157806323b872dd14610400578063313ce56714610420578063365260b414610442578063395093511461047757600080fd5b80621d3567146102e857806301ffc9a71461030a57806306fdde031461033f57806307e0db1714610361578063095ea7b3146103815780630df37483146103a1575b600080fd5b3480156102f457600080fd5b50610308610303366004613595565b6109c7565b005b34801561031657600080fd5b5061032a610325366004613628565b610bf8565b60405190151581526020015b60405180910390f35b34801561034b57600080fd5b50610354610c2f565b60405161033691906136aa565b34801561036d57600080fd5b5061030861037c3660046136bd565b610cc1565b34801561038d57600080fd5b5061032a61039c3660046136ed565b610d4a565b3480156103ad57600080fd5b506103086103bc366004613719565b610d62565b3480156103cd57600080fd5b506103086103dc3660046136bd565b610d81565b3480156103ed57600080fd5b50600a545b604051908152602001610336565b34801561040c57600080fd5b5061032a61041b366004613735565b610dd9565b34801561042c57600080fd5b5060125b60405160ff9091168152602001610336565b34801561044e57600080fd5b5061046261045d366004613786565b610dfd565b60408051928352602083019190915201610336565b34801561048357600080fd5b5061032a6104923660046136ed565b610e52565b3480156104a357600080fd5b5061032a6104b23660046137eb565b610e74565b3480156104c357600080fd5b506103f26104d23660046136bd565b60036020526000908152604090205481565b3480156104f057600080fd5b506103086104ff3660046137eb565b610f40565b34801561051057600080fd5b506103f2600081565b34801561052557600080fd5b50610430600081565b34801561053a57600080fd5b506103f26105493660046138aa565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561058957600080fd5b50610308610598366004613595565b610fc6565b6103086105ab366004613962565b6110a2565b3480156105bc57600080fd5b506103f26105cb3660046139d5565b6001600160a01b031660009081526008602052604090205490565b3480156105f257600080fd5b5061030861110d565b34801561060757600080fd5b506103546106163660046136bd565b611121565b6103086106293660046139f2565b6111bb565b34801561063a57600080fd5b506104307f000000000000000000000000000000000000000000000000000000000000000081565b34801561066e57600080fd5b506103f261067d366004613aa4565b600260209081526000928352604080842090915290825290205481565b3480156106a657600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610336565b3480156106d857600080fd5b506103f261126a565b3480156106ed57600080fd5b506004546106b4906001600160a01b031681565b34801561070d57600080fd5b5061035461127a565b34801561072257600080fd5b5061032a6107313660046138aa565b6007602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205460ff1681565b34801561077457600080fd5b506103546107833660046136bd565b611289565b34801561079457600080fd5b5061032a6107a33660046136ed565b6113a0565b3480156107b457600080fd5b506104626107c3366004613ad7565b61141b565b3480156107d457600080fd5b506103086107e33660046137eb565b6114aa565b3480156107f457600080fd5b5061032a6108033660046136ed565b61153d565b34801561081457600080fd5b506106b47f000000000000000000000000000000000000000000000000000000000000000081565b34801561084857600080fd5b506103086108573660046139d5565b61154b565b34801561086857600080fd5b506103f261271081565b34801561087e57600080fd5b5061030861088d366004613b90565b6115a8565b6103086108a0366004613595565b611632565b3480156108b157600080fd5b506103f26108c0366004613bfe565b611848565b3480156108d157600080fd5b506103086108e0366004613c37565b611873565b3480156108f157600080fd5b50610430600181565b34801561090657600080fd5b50610308610915366004613c73565b611925565b34801561092657600080fd5b50610308610935366004613c8e565b61196e565b34801561094657600080fd5b506103086109553660046137eb565b611a8d565b34801561096657600080fd5b5060065461032a9060ff1681565b34801561098057600080fd5b5061030861098f3660046139d5565b611ae7565b3480156109a057600080fd5b506103546109af366004613d56565b611b60565b3480156109c057600080fd5b50306106b4565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610a445760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610a6290613da3565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8e90613da3565b8015610adb5780601f10610ab057610100808354040283529160200191610adb565b820191906000526020600020905b815481529060010190602001808311610abe57829003601f168201915b50505050509050805186869050148015610af6575060008151115b8015610b1e575080516020820120604051610b149088908890613dd8565b6040518091039020145b610b795760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b6064820152608401610a3b565b610bef8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a935091508890889081908401838280828437600092019190915250611c1192505050565b50505050505050565b60006001600160e01b03198216631f7ecdf760e01b1480610c2957506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600b8054610c3e90613da3565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6a90613da3565b8015610cb75780601f10610c8c57610100808354040283529160200191610cb7565b820191906000526020600020905b815481529060010190602001808311610c9a57829003601f168201915b5050505050905090565b610cc9611c8a565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610d2f57600080fd5b505af1158015610d43573d6000803e3d6000fd5b5050505050565b600033610d58818585611ce4565b5060019392505050565b610d6a611c8a565b61ffff909116600090815260036020526040902055565b610d89611c8a565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610d15565b600033610de7858285611e08565b610df2858585611e82565b506001949350505050565b600080610e438888888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061205092505050565b91509150965096945050505050565b600033610d58818585610e658383611848565b610e6f9190613dfe565b611ce4565b61ffff831660009081526001602052604081208054829190610e9590613da3565b80601f0160208091040260200160405190810160405280929190818152602001828054610ec190613da3565b8015610f0e5780601f10610ee357610100808354040283529160200191610f0e565b820191906000526020600020905b815481529060010190602001808311610ef157829003601f168201915b505050505090508383604051610f25929190613dd8565b60405180910390208180519060200120149150509392505050565b610f48611c8a565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610f9890869086908690600401613e3f565b600060405180830381600087803b158015610fb257600080fd5b505af1158015610bef573d6000803e3d6000fd5b3330146110245760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610a3b565b61109a8686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061214492505050565b505050505050565b61109a858585856110b660208701876139d5565b6110c660408801602089016139d5565b6110d36040890189613e5d565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506121cb92505050565b611115611c8a565b61111f60006122b3565b565b6001602052600090815260409020805461113a90613da3565b80601f016020809104026020016040519081016040528092919081815260200182805461116690613da3565b80156111b35780601f10611188576101008083540402835291602001916111b3565b820191906000526020600020905b81548152906001019060200180831161119657829003601f168201915b505050505081565b61125f8888888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a925061120891505060208901896139d5565b61121860408a0160208b016139d5565b61122560408b018b613e5d565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061230392505050565b505050505050505050565b6000611275600a5490565b905090565b6060600c8054610c3e90613da3565b61ffff81166000908152600160205260408120805460609291906112ac90613da3565b80601f01602080910402602001604051908101604052809291908181526020018280546112d890613da3565b80156113255780601f106112fa57610100808354040283529160200191611325565b820191906000526020600020905b81548152906001019060200180831161130857829003601f168201915b5050505050905080516000141561137e5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610a3b565b6113996000601483516113919190613ea3565b8391906123ff565b9392505050565b600033816113ae8286611848565b90508381101561140e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610a3b565b610df28286868403611ce4565b6000806114988b8b8b8b8b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8d018190048102820181019092528b81528e93508d9250908c908c908190840183828082843760009201919091525061250c92505050565b91509150995099975050505050505050565b6114b2611c8a565b8181306040516020016114c793929190613eba565b60408051601f1981840301815291815261ffff851660009081526001602090815291902082516114fc93919290910190613412565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce83838360405161153093929190613e3f565b60405180910390a1505050565b600033610d58818585611e82565b611553611c8a565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020015b60405180910390a150565b6115b0611c8a565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c906116049088908890889088908890600401613ee0565b600060405180830381600087803b15801561161e57600080fd5b505af115801561125f573d6000803e3d6000fd5b61ffff861660009081526005602052604080822090516116559088908890613dd8565b90815260408051602092819003830190206001600160401b038716600090815292529020549050806116d55760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610a3b565b8083836040516116e6929190613dd8565b6040518091039020146117455760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610a3b565b61ffff871660009081526005602052604080822090516117689089908990613dd8565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611800918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061214492505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611837959493929190613f19565b60405180910390a150505050505050565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205490565b61187b611c8a565b600081116118c35760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b6044820152606401610a3b565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611530565b61192d611c8a565b6006805460ff19168215159081179091556040519081527f1584ad594a70cbe1e6515592e1272a987d922b097ead875069cebe8b40c004a49060200161159d565b3330146119bd5760405162461bcd60e51b815260206004820152601f60248201527f4f4654436f72653a2063616c6c6572206d757374206265204f4654436f7265006044820152606401610a3b565b6119c83086866125c7565b9350846001600160a01b03168a61ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf86604051611a0a91815260200190565b60405180910390a3604051633fe79aed60e11b81526001600160a01b03861690637fcf35da908390611a4e908e908e908e908e908e908d908d908d90600401613f54565b600060405180830381600088803b158015611a6857600080fd5b5087f1158015611a7c573d6000803e3d6000fd5b505050505050505050505050505050565b611a95611c8a565b61ffff83166000908152600160205260409020611ab3908383613496565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab83838360405161153093929190613e3f565b611aef611c8a565b6001600160a01b038116611b545760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a3b565b611b5d816122b3565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611be0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611c089190810190613faf565b95945050505050565b600080611c745a60966366ad5c8a60e01b89898989604051602401611c39949392919061401c565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612619565b915091508161109a5761109a86868686856126a3565b6000546001600160a01b0316331461111f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a3b565b6001600160a01b038316611d465760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610a3b565b6001600160a01b038216611da75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610a3b565b6001600160a01b0383811660008181526009602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6000611e148484611848565b90506000198114611e7c5781811015611e6f5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610a3b565b611e7c8484848403611ce4565b50505050565b6001600160a01b038316611ee65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610a3b565b6001600160a01b038216611f485760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a3b565b6001600160a01b03831660009081526008602052604090205481811015611fc05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610a3b565b6001600160a01b03808516600090815260086020526040808220858503905591851681529081208054849290611ff7908490613dfe565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161204391815260200190565b60405180910390a3611e7c565b600080600061209e8761206288612745565b6040805160006020820152602181019390935260c09190911b6001600160c01b0319166041830152805160298184030181526049909201905290565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb10906120f5908b90309086908b908b9060040161405a565b6040805180830381865afa158015612111573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213591906140ae565b92509250509550959350505050565b600061215082826127cb565b905060ff811661216b5761216685858585612827565b610d43565b60ff81166001141561218357612166858585856128b7565b60405162461bcd60e51b815260206004820152601c60248201527f4f4654436f72653a20756e6b6e6f776e207061636b65742074797065000000006044820152606401610a3b565b60006121d987828481612ac5565b6121e285612b3f565b5090506121f188888884612b7f565b90506000811161223f5760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610a3b565b600061224e8761206284612745565b905061225e888287878734612bb1565b86896001600160a01b03168961ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a8560405161229f91815260200190565b60405180910390a450979650505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061231b896001846001600160401b038916612ac5565b61232487612b3f565b5090506123338a8a8a84612b7f565b9050600081116123815760405162461bcd60e51b815260206004820152601960248201527813d19510dbdc994e88185b5bdd5b9d081d1bdbc81cdb585b1b603a1b6044820152606401610a3b565b6000612398338a61239185612745565b8a8a612d57565b90506123a88a8287878734612bb1565b888b6001600160a01b03168b61ffff167fd81fc9b8523134ed613870ed029d6170cbb73aa6a6bc311b9a642689fb9df59a856040516123e991815260200190565b60405180910390a4509998505050505050505050565b60608161240d81601f613dfe565b101561244c5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610a3b565b6124568284613dfe565b8451101561249a5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610a3b565b6060821580156124b95760405191506000825260208201604052612503565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156124f25780518352602092830192016124da565b5050858452601f01601f1916604052505b50949350505050565b600080600061251f338a6123918b612745565b60405163040a7bb160e41b81529091506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612576908d90309086908b908b9060040161405a565b6040805180830381865afa158015612592573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125b691906140ae565b925092505097509795505050505050565b600033306001600160a01b038616148015906125f55750806001600160a01b0316856001600160a01b031614155b1561260557612605858285611e08565b612610858585611e82565b50909392505050565b6000606060008060008661ffff166001600160401b0381111561263e5761263e61383d565b6040519080825280601f01601f191660200182016040528015612668576020820181803683370190505b50905060008087516020890160008d8df191503d92508683111561268a578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff168152602001908152602001600020856040516126d491906140d2565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c9061273190879087908790879087906140ee565b60405180910390a15050505050565b505050565b6000806127727f000000000000000000000000000000000000000000000000000000000000000084614156565b90506001600160401b03811115610c295760405162461bcd60e51b815260206004820152601a60248201527f4f4654436f72653a20616d6f756e745344206f766572666c6f770000000000006044820152606401610a3b565b60006127d8826001613dfe565b8351101561281e5760405162461bcd60e51b8152602060048201526013602482015272746f55696e74385f6f75744f66426f756e647360681b6044820152606401610a3b565b50016001015190565b60008061283383612d98565b90925090506001600160a01b03821661284c5761dead91505b600061285782612e1d565b9050612864878483612e52565b9050826001600160a01b03168761ffff167fbf551ec93859b170f9b2141bd9298bf3f64322c6f7beb2543a0cb669834118bf836040516128a691815260200190565b60405180910390a350505050505050565b60008060008060006128c886612e65565b945094509450945094506000600760008b61ffff1661ffff168152602001908152602001600020896040516128fd91906140d2565b90815260408051602092819003830190206001600160401b038b166000908152925281205460ff16915061293085612e1d565b90508161299e576129428b3083612e52565b61ffff8c1660009081526007602052604090819020905191925060019161296a908d906140d2565b90815260408051602092819003830190206001600160401b038d16600090815292529020805460ff19169115159190911790555b6001600160a01b0386163b6129f5576040516001600160a01b03871681527f9aedf5fdba8716db3b6705ca00150643309995d4f818a249ed6dde6677e7792d9060200160405180910390a150505050505050611e7c565b8a8a8a8a8a8a868a60008a612a13578b6001600160401b0316612a15565b5a5b9050600080612a475a609663eaffd49a60e01b8e8e8e8d8d8d8d8d604051602401611c3998979695949392919061416a565b915091508115612aa0578751602089012060405161ffff8d16907fb8890edbfc1c74692f527444645f95489c3703cc2df42e4a366f5d06fa6cd88490612a92908e908e9086906141de565b60405180910390a250612aad565b612aad8b8b8b8b856126a3565b50505050505050505050505050505050505050505050565b60065460ff1615612ae157612adc84848484612f1c565b611e7c565b815115611e7c5760405162461bcd60e51b815260206004820152602660248201527f4f4654436f72653a205f61646170746572506172616d73206d7573742062652060448201526532b6b83a3c9760d11b6064820152608401610a3b565b600080612b6c7f00000000000000000000000000000000000000000000000000000000000000008461420c565b9050612b788184613ea3565b9150915091565b6000336001600160a01b0386168114612b9d57612b9d868285611e08565b612ba78684612ffb565b5090949350505050565b61ffff861660009081526001602052604081208054612bcf90613da3565b80601f0160208091040260200160405190810160405280929190818152602001828054612bfb90613da3565b8015612c485780601f10612c1d57610100808354040283529160200191612c48565b820191906000526020600020905b815481529060010190602001808311612c2b57829003601f168201915b50505050509050805160001415612cba5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610a3b565b612cc5878751613149565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490612d1c908b9086908c908c908c908c90600401614220565b6000604051808303818588803b158015612d3557600080fd5b505af1158015612d49573d6000803e3d6000fd5b505050505050505050505050565b6060600185856001600160a01b0389168587604051602001612d7e96959493929190614287565b604051602081830303815290604052905095945050505050565b60008080612da684826127cb565b60ff16148015612db7575082516029145b612dfe5760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610a3b565b612e0983600d6131b7565b9150612e1683602161321c565b9050915091565b6000610c297f00000000000000000000000000000000000000000000000000000000000000006001600160401b0384166142e8565b6000612e5e8383613279565b5092915050565b600080806060816001612e7887836127cb565b60ff1614612ec35760405162461bcd60e51b815260206004820152601860248201527713d19510dbdc994e881a5b9d985b1a59081c185e5b1bd85960421b6044820152606401610a3b565b612ece86600d6131b7565b9350612edb86602161321c565b9250612ee8866029613358565b9450612ef586604961321c565b9050612f116051808851612f099190613ea3565b8891906123ff565b915091939590929450565b6000612f27836133b6565b61ffff808716600090815260026020908152604080832093891683529290529081205491925090612f59908490613dfe565b905060008111612fab5760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610a3b565b8082101561109a5760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610a3b565b6001600160a01b03821661305b5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610a3b565b6001600160a01b038216600090815260086020526040902054818110156130cf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610a3b565b6001600160a01b03831660009081526008602052604081208383039055600a80548492906130fe908490613ea3565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b61ffff82166000908152600360205260409020548061316757506127105b808211156127405760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610a3b565b60006131c4826014613dfe565b8351101561320c5760405162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b6044820152606401610a3b565b500160200151600160601b900490565b6000613229826008613dfe565b835110156132705760405162461bcd60e51b8152602060048201526014602482015273746f55696e7436345f6f75744f66426f756e647360601b6044820152606401610a3b565b50016008015190565b6001600160a01b0382166132cf5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610a3b565b80600a60008282546132e19190613dfe565b90915550506001600160a01b0382166000908152600860205260408120805483929061330e908490613dfe565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6000613365826020613dfe565b835110156133ad5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610a3b565b50016020015190565b600060228251101561340a5760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610a3b565b506022015190565b82805461341e90613da3565b90600052602060002090601f0160209004810192826134405760008555613486565b82601f1061345957805160ff1916838001178555613486565b82800160010185558215613486579182015b8281111561348657825182559160200191906001019061346b565b5061349292915061350a565b5090565b8280546134a290613da3565b90600052602060002090601f0160209004810192826134c45760008555613486565b82601f106134dd5782800160ff19823516178555613486565b82800160010185558215613486579182015b828111156134865782358255916020019190600101906134ef565b5b80821115613492576000815560010161350b565b803561ffff8116811461353157600080fd5b919050565b60008083601f84011261354857600080fd5b5081356001600160401b0381111561355f57600080fd5b60208301915083602082850101111561357757600080fd5b9250929050565b80356001600160401b038116811461353157600080fd5b600080600080600080608087890312156135ae57600080fd5b6135b78761351f565b955060208701356001600160401b03808211156135d357600080fd5b6135df8a838b01613536565b90975095508591506135f360408a0161357e565b9450606089013591508082111561360957600080fd5b5061361689828a01613536565b979a9699509497509295939492505050565b60006020828403121561363a57600080fd5b81356001600160e01b03198116811461139957600080fd5b60005b8381101561366d578181015183820152602001613655565b83811115611e7c5750506000910152565b60008151808452613696816020860160208601613652565b601f01601f19169290920160200192915050565b602081526000611399602083018461367e565b6000602082840312156136cf57600080fd5b6113998261351f565b6001600160a01b0381168114611b5d57600080fd5b6000806040838503121561370057600080fd5b823561370b816136d8565b946020939093013593505050565b6000806040838503121561372c57600080fd5b61370b8361351f565b60008060006060848603121561374a57600080fd5b8335613755816136d8565b92506020840135613765816136d8565b929592945050506040919091013590565b8035801515811461353157600080fd5b60008060008060008060a0878903121561379f57600080fd5b6137a88761351f565b955060208701359450604087013593506137c460608801613776565b925060808701356001600160401b038111156137df57600080fd5b61361689828a01613536565b60008060006040848603121561380057600080fd5b6138098461351f565b925060208401356001600160401b0381111561382457600080fd5b61383086828701613536565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561387b5761387b61383d565b604052919050565b60006001600160401b0382111561389c5761389c61383d565b50601f01601f191660200190565b6000806000606084860312156138bf57600080fd5b6138c88461351f565b925060208401356001600160401b038111156138e357600080fd5b8401601f810186136138f457600080fd5b803561390761390282613883565b613853565b81815287602083850101111561391c57600080fd5b816020840160208301376000602083830101528094505050506139416040850161357e565b90509250925092565b60006060828403121561395c57600080fd5b50919050565b600080600080600060a0868803121561397a57600080fd5b8535613985816136d8565b94506139936020870161351f565b9350604086013592506060860135915060808601356001600160401b038111156139bc57600080fd5b6139c88882890161394a565b9150509295509295909350565b6000602082840312156139e757600080fd5b8135611399816136d8565b60008060008060008060008060e0898b031215613a0e57600080fd5b8835613a19816136d8565b9750613a2760208a0161351f565b9650604089013595506060890135945060808901356001600160401b0380821115613a5157600080fd5b613a5d8c838d01613536565b9096509450849150613a7160a08c0161357e565b935060c08b0135915080821115613a8757600080fd5b50613a948b828c0161394a565b9150509295985092959890939650565b60008060408385031215613ab757600080fd5b613ac08361351f565b9150613ace6020840161351f565b90509250929050565b600080600080600080600080600060e08a8c031215613af557600080fd5b613afe8a61351f565b985060208a0135975060408a0135965060608a01356001600160401b0380821115613b2857600080fd5b613b348d838e01613536565b9098509650869150613b4860808d0161357e565b9550613b5660a08d01613776565b945060c08c0135915080821115613b6c57600080fd5b50613b798c828d01613536565b915080935050809150509295985092959850929598565b600080600080600060808688031215613ba857600080fd5b613bb18661351f565b9450613bbf6020870161351f565b93506040860135925060608601356001600160401b03811115613be157600080fd5b613bed88828901613536565b969995985093965092949392505050565b60008060408385031215613c1157600080fd5b8235613c1c816136d8565b91506020830135613c2c816136d8565b809150509250929050565b600080600060608486031215613c4c57600080fd5b613c558461351f565b9250613c636020850161351f565b9150604084013590509250925092565b600060208284031215613c8557600080fd5b61139982613776565b6000806000806000806000806000806101008b8d031215613cae57600080fd5b613cb78b61351f565b995060208b01356001600160401b0380821115613cd357600080fd5b613cdf8e838f01613536565b909b509950899150613cf360408e0161357e565b985060608d0135975060808d01359150613d0c826136d8565b90955060a08c0135945060c08c01359080821115613d2957600080fd5b50613d368d828e01613536565b9150809450508092505060e08b013590509295989b9194979a5092959850565b60008060008060808587031215613d6c57600080fd5b613d758561351f565b9350613d836020860161351f565b92506040850135613d93816136d8565b9396929550929360600135925050565b600181811c90821680613db757607f821691505b6020821081141561395c57634e487b7160e01b600052602260045260246000fd5b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115613e1157613e11613de8565b500190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611c08604083018486613e16565b6000808335601e19843603018112613e7457600080fd5b8301803591506001600160401b03821115613e8e57600080fd5b60200191503681900382131561357757600080fd5b600082821015613eb557613eb5613de8565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152613f0e608083018486613e16565b979650505050505050565b61ffff86168152608060208201526000613f37608083018688613e16565b6001600160401b0394909416604083015250606001529392505050565b61ffff8916815260c060208201526000613f7260c08301898b613e16565b6001600160401b038816604084015286606084015285608084015282810360a0840152613fa0818587613e16565b9b9a5050505050505050505050565b600060208284031215613fc157600080fd5b81516001600160401b03811115613fd757600080fd5b8201601f81018413613fe857600080fd5b8051613ff661390282613883565b81815285602083850101111561400b57600080fd5b611c08826020830160208601613652565b61ffff85168152608060208201526000614039608083018661367e565b6001600160401b03851660408401528281036060840152613f0e818561367e565b61ffff861681526001600160a01b038516602082015260a0604082018190526000906140889083018661367e565b841515606084015282810360808401526140a2818561367e565b98975050505050505050565b600080604083850312156140c157600080fd5b505080516020909101519092909150565b600082516140e4818460208701613652565b9190910192915050565b61ffff8616815260a06020820152600061410b60a083018761367e565b6001600160401b0386166040840152828103606084015261412c818661367e565b905082810360808401526140a2818561367e565b634e487b7160e01b600052601260045260246000fd5b60008261416557614165614140565b500490565b600061010061ffff8b1683528060208401526141888184018b61367e565b6001600160401b038a166040850152606084018990526001600160a01b038816608085015260a0840187905283810360c085015290506141c8818661367e565b9150508260e08301529998505050505050505050565b6060815260006141f1606083018661367e565b6001600160401b039490941660208301525060400152919050565b60008261421b5761421b614140565b500690565b61ffff8716815260c06020820152600061423d60c083018861367e565b828103604084015261424f818861367e565b6001600160a01b0387811660608601528616608085015283810360a0850152905061427a818561367e565b9998505050505050505050565b60ff60f81b8760f81b16815285600182015260006001600160401b0360c01b808760c01b166021840152856029840152808560c01b1660498401525082516142d6816051850160208701613652565b91909101605101979650505050505050565b600081600019048311821515161561430257614302613de8565b50029056fea2646970667358221220bf7f7e103f5ce7dce346a4397c6be5e247cfbed76166cae1c0a27024fc4025c664736f6c634300080c0033", + "devdoc": { + "kind": "dev", + "methods": { + "allowance(address,address)": { + "details": "See {IERC20-allowance}." + }, + "approve(address,uint256)": { + "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." + }, + "balanceOf(address)": { + "details": "See {IERC20-balanceOf}." + }, + "circulatingSupply()": { + "details": "returns the circulating amount of tokens on current chain" + }, + "decimals()": { + "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." + }, + "decreaseAllowance(address,uint256)": { + "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." + }, + "estimateSendFee(uint16,bytes32,uint256,bool,bytes)": { + "details": "estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _amount - amount of the tokens to transfer _useZro - indicates to use zro to pay L0 fees _adapterParam - flexible bytes array to indicate messaging adapter services in L0" + }, + "increaseAllowance(address,uint256)": { + "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." + }, + "name()": { + "details": "Returns the name of the token." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "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." + }, + "sendFrom(address,uint16,bytes32,uint256,(address,address,bytes))": { + "details": "send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from` `_from` the owner of token `_dstChainId` the destination chain identifier `_toAddress` can be any size depending on the `dstChainId`. `_amount` the quantity of tokens in wei `_refundAddress` the address LayerZero refunds if too much message fee is sent `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services" + }, + "symbol()": { + "details": "Returns the symbol of the token, usually a shorter version of the name." + }, + "token()": { + "details": "returns the address of the ERC20 token" + }, + "totalSupply()": { + "details": "See {IERC20-totalSupply}." + }, + "transfer(address,uint256)": { + "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." + }, + "transferFrom(address,address,uint256)": { + "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "title": "A LayerZero OmnichainFungibleToken example of BasedOFT", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Use this contract only on the BASE CHAIN. It locks tokens on source, on outgoing send(), and unlocks tokens when receiving from other chains.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4047, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 14681, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "trustedRemoteLookup", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint16,t_bytes_storage)" + }, + { + "astId": 14687, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "minDstGasLookup", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))" + }, + { + "astId": 14691, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "payloadSizeLimitLookup", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 14693, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "precrime", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 15230, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "failedMessages", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" + }, + { + "astId": 20876, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "useCustomAdapterParams", + "offset": 0, + "slot": "6", + "type": "t_bool" + }, + { + "astId": 20884, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "creditedPackets", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bool)))" + }, + { + "astId": 5717, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "_balances", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 5723, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "_allowances", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 5725, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "_totalSupply", + "offset": 0, + "slot": "10", + "type": "t_uint256" + }, + { + "astId": 5727, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "_name", + "offset": 0, + "slot": "11", + "type": "t_string_storage" + }, + { + "astId": 5729, + "contract": "contracts/examples/ExampleOFTV2.sol:ExampleOFTV2", + "label": "_symbol", + "offset": 0, + "slot": "12", + "type": "t_string_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "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_bytes_memory_ptr,t_mapping(t_uint64,t_bool))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bool)" + }, + "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bytes32))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bytes32)" + }, + "t_mapping(t_uint16,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bool)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bool)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bool))" + }, + "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))" + }, + "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(uint16 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint16,t_uint256)" + }, + "t_mapping(t_uint16,t_uint256)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint64,t_bool)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_uint64,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/packages/verify-contract/test/__data__/deployments/fuji/ExampleUniversalONFT721.json b/packages/verify-contract/test/__data__/deployments/fuji/ExampleUniversalONFT721.json new file mode 100644 index 000000000..9349d449c --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/fuji/ExampleUniversalONFT721.json @@ -0,0 +1,1944 @@ +{ + "address": "0xFF7E5F0fAf0cbA105CDb875833b801355FA58aA0", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minGasToStore", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_layerZeroEndpoint", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_startMintId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_endMintId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "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": "bytes32", + "name": "_hashedPayload", + "type": "bytes32" + } + ], + "name": "CreditCleared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_hashedPayload", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "CreditStored", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "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": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "_toAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_dstChainIdToBatchLimit", + "type": "uint256" + } + ], + "name": "SetDstChainIdToBatchLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_dstChainIdToTransferGas", + "type": "uint256" + } + ], + "name": "SetDstChainIdToTransferGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "_minGasToTransferAndStore", + "type": "uint256" + } + ], + "name": "SetMinGasToTransferAndStore", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "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": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FUNCTION_TYPE_SEND", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "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": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "clearCredits", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "dstChainIdToBatchLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "dstChainIdToTransferGas", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendBatchFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "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": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "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": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maxMintId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minGasToTransferAndStore", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "mint", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextMintId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "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": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "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": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "sendBatchFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_dstChainIdToBatchLimit", + "type": "uint256" + } + ], + "name": "setDstChainIdToBatchLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_dstChainIdToTransferGas", + "type": "uint256" + } + ], + "name": "setDstChainIdToTransferGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minGasToTransferAndStore", + "type": "uint256" + } + ], + "name": "setMinGasToTransferAndStore", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "storedCredits", + "outputs": [ + { + "internalType": "uint16", + "name": "srcChainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "toAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "creditsRemain", + "type": "bool" + } + ], + "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": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "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": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x32e7006764c87b2df1a89734819267ebee0da8103e025d7a16cae8c44b8d7f81", + "receipt": { + "to": null, + "from": "0x28921b09dB1C7add63265e5ec79B008F0851D5DC", + "contractAddress": "0xFF7E5F0fAf0cbA105CDb875833b801355FA58aA0", + "transactionIndex": 1, + "gasUsed": "4093276", + "logsBloom": "0x00000000000000000000000000000000000000000000010000800000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000001000000000000000000000000000000004000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000400000000000000040000000000", + "blockHash": "0x634c5a5b33ae98ab333f8a976aca3b81205c6a72545bd8658d678a80da8c5af7", + "transactionHash": "0x32e7006764c87b2df1a89734819267ebee0da8103e025d7a16cae8c44b8d7f81", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 21781428, + "transactionHash": "0x32e7006764c87b2df1a89734819267ebee0da8103e025d7a16cae8c44b8d7f81", + "address": "0xFF7E5F0fAf0cbA105CDb875833b801355FA58aA0", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000028921b09db1c7add63265e5ec79b008f0851d5dc" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x634c5a5b33ae98ab333f8a976aca3b81205c6a72545bd8658d678a80da8c5af7" + } + ], + "blockNumber": 21781428, + "cumulativeGasUsed": "4114276", + "status": 1, + "byzantium": true + }, + "args": [150000, "0x93f54D755A063cE7bB9e6Ac47Eccc8e33411d706", 11, 20], + "numDeployments": 1, + "solcInputHash": "3a01e3542726d3d15daf75c843767ac5", + "metadata": "{\"compiler\":{\"version\":\"0.8.12+commit.f00d7308\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minGasToStore\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_layerZeroEndpoint\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_startMintId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_endMintId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"bytes32\",\"name\":\"_hashedPayload\",\"type\":\"bytes32\"}],\"name\":\"CreditCleared\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_hashedPayload\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"CreditStored\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"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\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_toAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_dstChainIdToBatchLimit\",\"type\":\"uint256\"}],\"name\":\"SetDstChainIdToBatchLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_dstChainIdToTransferGas\",\"type\":\"uint256\"}],\"name\":\"SetDstChainIdToTransferGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minGasToTransferAndStore\",\"type\":\"uint256\"}],\"name\":\"SetMinGasToTransferAndStore\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"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\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FUNCTION_TYPE_SEND\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"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\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"clearCredits\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"dstChainIdToBatchLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"dstChainIdToTransferGas\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendBatchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"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\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"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\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxMintId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minGasToTransferAndStore\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextMintId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"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\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"sendBatchFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainIdToBatchLimit\",\"type\":\"uint256\"}],\"name\":\"setDstChainIdToBatchLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_dstChainIdToTransferGas\",\"type\":\"uint256\"}],\"name\":\"setDstChainIdToTransferGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minGasToTransferAndStore\",\"type\":\"uint256\"}],\"name\":\"setMinGasToTransferAndStore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"storedCredits\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"toAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"creditsRemain\",\"type\":\"bool\"}],\"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\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"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\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"approve(address,uint256)\":{\"details\":\"See {IERC721-approve}.\"},\"balanceOf(address)\":{\"details\":\"See {IERC721-balanceOf}.\"},\"estimateSendBatchFee(uint16,bytes,uint256[],bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _tokenIds[] - token Ids to transfer _useZro - indicates to use zro to pay L0 fees _adapterParams - flexible bytes array to indicate messaging adapter services in L0\"},\"estimateSendFee(uint16,bytes,uint256,bool,bytes)\":{\"details\":\"estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _tokenId - token Id to transfer _useZro - indicates to use zro to pay L0 fees _adapterParams - flexible bytes array to indicate messaging adapter services in L0\"},\"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}.\"},\"sendBatchFrom(address,uint16,bytes,uint256[],address,address,bytes)\":{\"details\":\"send tokens `_tokenIds[]` to (`_dstChainId`, `_toAddress`) from `_from` `_toAddress` can be any size depending on the `dstChainId`. `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"sendFrom(address,uint16,bytes,uint256,address,address,bytes)\":{\"details\":\"send token `_tokenId` to (`_dstChainId`, `_toAddress`) from `_from` `_toAddress` can be any size depending on the `dstChainId`. `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC721-setApprovalForAll}.\"},\"symbol()\":{\"details\":\"See {IERC721Metadata-symbol}.\"},\"tokenURI(uint256)\":{\"details\":\"See {IERC721Metadata-tokenURI}.\"},\"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.\"}},\"title\":\"A LayerZero UniversalONFT example\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"mint()\":{\"notice\":\"Mint your ONFT\"}},\"notice\":\"You can use this to mint ONFT and send nftIds across chain. Each contract deployed to a chain should carefully set a `_startMintIndex` and a `_maxMint` value to set a range of allowed mintable nftIds (so that no two chains can mint the same id!)\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/examples/ExampleUniversalONFT721.sol\":\"ExampleUniversalONFT721\"},\"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/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/examples/ExampleUniversalONFT721.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Q&Rdq6qKDWQ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@QRXt<~'` ._^cag@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@k*, `!jQ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@U; ,}Q@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@g; 'w@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@i ~Q@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@L '*Ij}i~ :@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@k 7@@@@@@@D =@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@! k@@@@@@@@ `Q@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@; k@@@@@@@@ `Q@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@; k@@@@@@@@ `Q@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@t^^^^^^^^^^^^;~'` k@@@@@@@@ `Q@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@QUz+:'` k@@@@@@@@ '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@K?' k@@@@@@@@ X@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b; k@@@@@@@@ f@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Q; k@@@@@@@@ =Q@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Q' k@@@@@@@@ `;5Q@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@7 k@@@@@@@@ ,~|ZQ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@; k@@@@@@@@ `',;><<<<<<<<<<' `;}Q@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Rj7^,` `';iZWQ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Q#RdqAAKDWQ@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\\n\\nimport \\\"../token/onft/extension/UniversalONFT721.sol\\\";\\n\\n/// @title A LayerZero UniversalONFT example\\n/// @notice You can use this to mint ONFT and send nftIds across chain.\\n/// Each contract deployed to a chain should carefully set a `_startMintIndex` and a `_maxMint`\\n/// value to set a range of allowed mintable nftIds (so that no two chains can mint the same id!)\\ncontract ExampleUniversalONFT721 is UniversalONFT721 {\\n constructor(uint256 _minGasToStore, address _layerZeroEndpoint, uint _startMintId, uint _endMintId) UniversalONFT721(\\\"ExampleUniversalONFT721\\\", \\\"ONFT721\\\", _minGasToStore, _layerZeroEndpoint, _startMintId, _endMintId) {}\\n}\\n\",\"keccak256\":\"0x0c88a38f7e6ed22e8bf180a92460b87fccced220ad291ad37142c45f18f0f611\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xe9617a9f6db351b6ac4c9d5b1097798af59ad7f813e370e8cf69bb44addd8548\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0x909bf72002c91806f39a64172c12b4188219e8649deefbe8d862604d4f9d3faf\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xe3e50134e39aa3c0f916447d36367970c6e4df972d488b794227e0b052ce80d5\",\"license\":\"MIT\"},\"contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"../interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"../interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../util/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint constant public DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(_srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote), \\\"LzApp: invalid source sending contract\\\");\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams, uint _nativeFee) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(uint16 _dstChainId, uint16 _type, bytes memory _adapterParams, uint _extraGas) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type] + _extraGas;\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) { // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(uint16 _version, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = _path;\\n emit SetTrustedRemote(_remoteChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(uint16 _dstChainId, uint16 _packetType, uint _minGas) external onlyOwner {\\n require(_minGas > 0, \\\"LzApp: invalid minGas\\\");\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0xdcf824e4bd747296fa38dbce9f8250514ce24e53cff79909a785e0923274de4a\",\"license\":\"MIT\"},\"contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../util/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft(), 150, abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload));\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload, bytes memory _reason) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function retryMessage(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x2afd4980a5850f45f2c4d7ec44d77b292a51b80f847566479548f89572065311\",\"license\":\"MIT\"},\"contracts/token/onft/IONFT721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./IONFT721Core.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\n/**\\n * @dev Interface of the ONFT standard\\n */\\ninterface IONFT721 is IONFT721Core, IERC721 {\\n\\n}\\n\",\"keccak256\":\"0x4d8faa00c9a920d92ee269453f44e55485fb7c8001a406ef2af826525f433ecd\",\"license\":\"MIT\"},\"contracts/token/onft/IONFT721Core.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the ONFT Core standard\\n */\\ninterface IONFT721Core is IERC165 {\\n /**\\n * @dev Emitted when `_tokenIds[]` are moved from the `_sender` to (`_dstChainId`, `_toAddress`)\\n * `_nonce` is the outbound nonce from\\n */\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes indexed _toAddress, uint[] _tokenIds);\\n event ReceiveFromChain(uint16 indexed _srcChainId, bytes indexed _srcAddress, address indexed _toAddress, uint[] _tokenIds);\\n event SetMinGasToTransferAndStore(uint256 _minGasToTransferAndStore);\\n event SetDstChainIdToTransferGas(uint16 _dstChainId, uint256 _dstChainIdToTransferGas);\\n event SetDstChainIdToBatchLimit(uint16 _dstChainId, uint256 _dstChainIdToBatchLimit);\\n\\n /**\\n * @dev Emitted when `_payload` was received from lz, but not enough gas to deliver all tokenIds\\n */\\n event CreditStored(bytes32 _hashedPayload, bytes _payload);\\n /**\\n * @dev Emitted when `_hashedPayload` has been completely delivered\\n */\\n event CreditCleared(bytes32 _hashedPayload);\\n\\n /**\\n * @dev send token `_tokenId` to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n /**\\n * @dev send tokens `_tokenIds[]` to (`_dstChainId`, `_toAddress`) from `_from`\\n * `_toAddress` can be any size depending on the `dstChainId`.\\n * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)\\n * `_adapterParams` is a flexible bytes array to indicate messaging adapter services\\n */\\n function sendBatchFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint[] calldata _tokenIds, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _tokenId - token Id to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParams - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendFee(uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n /**\\n * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)\\n * _dstChainId - L0 defined chain id to send tokens too\\n * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n * _tokenIds[] - token Ids to transfer\\n * _useZro - indicates to use zro to pay L0 fees\\n * _adapterParams - flexible bytes array to indicate messaging adapter services in L0\\n */\\n function estimateSendBatchFee(uint16 _dstChainId, bytes calldata _toAddress, uint[] calldata _tokenIds, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n}\\n\",\"keccak256\":\"0x00d59d0ee2a17fdaa68511b1678fce4bcb46c074a9bbc5bbb51e08ec68d1b00e\",\"license\":\"MIT\"},\"contracts/token/onft/ONFT721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IONFT721.sol\\\";\\nimport \\\"./ONFT721Core.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/ERC721.sol\\\";\\n\\n// NOTE: this ONFT contract has no public minting logic.\\n// must implement your own minting logic in child classes\\ncontract ONFT721 is ONFT721Core, ERC721, IONFT721 {\\n constructor(string memory _name, string memory _symbol, uint256 _minGasToTransfer, address _lzEndpoint) ERC721(_name, _symbol) ONFT721Core(_minGasToTransfer, _lzEndpoint) {}\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ONFT721Core, ERC721, IERC165) returns (bool) {\\n return interfaceId == type(IONFT721).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function _debitFrom(address _from, uint16, bytes memory, uint _tokenId) internal virtual override {\\n require(_isApprovedOrOwner(_msgSender(), _tokenId), \\\"ONFT721: send caller is not owner nor approved\\\");\\n require(ERC721.ownerOf(_tokenId) == _from, \\\"ONFT721: send from incorrect owner\\\");\\n _transfer(_from, address(this), _tokenId);\\n }\\n\\n function _creditTo(uint16, address _toAddress, uint _tokenId) internal virtual override {\\n require(!_exists(_tokenId) || (_exists(_tokenId) && ERC721.ownerOf(_tokenId) == address(this)));\\n if (!_exists(_tokenId)) {\\n _safeMint(_toAddress, _tokenId);\\n } else {\\n _transfer(address(this), _toAddress, _tokenId);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe5ce63fcc4ab9f0c4b9a6b8274991b377914a8c48434532d3ac4df046f0195bf\",\"license\":\"MIT\"},\"contracts/token/onft/ONFT721Core.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IONFT721Core.sol\\\";\\nimport \\\"../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract ONFT721Core is NonblockingLzApp, ERC165, IONFT721Core {\\n uint16 public constant FUNCTION_TYPE_SEND = 1;\\n\\n struct StoredCredit {\\n uint16 srcChainId;\\n address toAddress;\\n uint256 index; // which index of the tokenIds remain\\n bool creditsRemain;\\n }\\n\\n uint256 public minGasToTransferAndStore; // min amount of gas required to transfer, and also store the payload\\n mapping(uint16 => uint256) public dstChainIdToBatchLimit;\\n mapping(uint16 => uint256) public dstChainIdToTransferGas; // per transfer amount of gas required to mint/transfer on the dst\\n mapping(bytes32 => StoredCredit) public storedCredits;\\n\\n constructor(uint256 _minGasToTransferAndStore, address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {\\n require(_minGasToTransferAndStore > 0, \\\"minGasToTransferAndStore must be > 0\\\");\\n minGasToTransferAndStore = _minGasToTransferAndStore;\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IONFT721Core).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, bool _useZro, bytes memory _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return estimateSendBatchFee(_dstChainId, _toAddress, _toSingletonArray(_tokenId), _useZro, _adapterParams);\\n }\\n\\n function estimateSendBatchFee(uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, bool _useZro, bytes memory _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {\\n bytes memory payload = abi.encode(_toAddress, _tokenIds);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function sendFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _toSingletonArray(_tokenId), _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function sendBatchFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) public payable virtual override {\\n _send(_from, _dstChainId, _toAddress, _tokenIds, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _send(address _from, uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual {\\n // allow 1 by default\\n require(_tokenIds.length > 0, \\\"tokenIds[] is empty\\\");\\n require(_tokenIds.length == 1 || _tokenIds.length <= dstChainIdToBatchLimit[_dstChainId], \\\"batch size exceeds dst batch limit\\\");\\n\\n for (uint i = 0; i < _tokenIds.length; i++) {\\n _debitFrom(_from, _dstChainId, _toAddress, _tokenIds[i]);\\n }\\n\\n bytes memory payload = abi.encode(_toAddress, _tokenIds);\\n\\n _checkGasLimit(_dstChainId, FUNCTION_TYPE_SEND, _adapterParams, dstChainIdToTransferGas[_dstChainId] * _tokenIds.length);\\n _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n emit SendToChain(_dstChainId, _from, _toAddress, _tokenIds);\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64, /*_nonce*/\\n bytes memory _payload\\n ) internal virtual override {\\n // decode and load the toAddress\\n (bytes memory toAddressBytes, uint[] memory tokenIds) = abi.decode(_payload, (bytes, uint[]));\\n\\n address toAddress;\\n assembly {\\n toAddress := mload(add(toAddressBytes, 20))\\n }\\n\\n uint nextIndex = _creditTill(_srcChainId, toAddress, 0, tokenIds);\\n if (nextIndex < tokenIds.length) {\\n // not enough gas to complete transfers, store to be cleared in another tx\\n bytes32 hashedPayload = keccak256(_payload);\\n storedCredits[hashedPayload] = StoredCredit(_srcChainId, toAddress, nextIndex, true);\\n emit CreditStored(hashedPayload, _payload);\\n }\\n\\n emit ReceiveFromChain(_srcChainId, _srcAddress, toAddress, tokenIds);\\n }\\n\\n // Public function for anyone to clear and deliver the remaining batch sent tokenIds\\n function clearCredits(bytes memory _payload) external virtual {\\n bytes32 hashedPayload = keccak256(_payload);\\n require(storedCredits[hashedPayload].creditsRemain, \\\"no credits stored\\\");\\n\\n (, uint[] memory tokenIds) = abi.decode(_payload, (bytes, uint[]));\\n\\n uint nextIndex = _creditTill(storedCredits[hashedPayload].srcChainId, storedCredits[hashedPayload].toAddress, storedCredits[hashedPayload].index, tokenIds);\\n require(nextIndex > storedCredits[hashedPayload].index, \\\"not enough gas to process credit transfer\\\");\\n\\n if (nextIndex == tokenIds.length) {\\n // cleared the credits, delete the element\\n delete storedCredits[hashedPayload];\\n emit CreditCleared(hashedPayload);\\n } else {\\n // store the next index to mint\\n storedCredits[hashedPayload] = StoredCredit(storedCredits[hashedPayload].srcChainId, storedCredits[hashedPayload].toAddress, nextIndex, true);\\n }\\n }\\n\\n // When a srcChain has the ability to transfer more chainIds in a single tx than the dst can do.\\n // Needs the ability to iterate and stop if the minGasToTransferAndStore is not met\\n function _creditTill(uint16 _srcChainId, address _toAddress, uint _startIndex, uint[] memory _tokenIds) internal returns (uint256){\\n uint i = _startIndex;\\n while (i < _tokenIds.length) {\\n // if not enough gas to process, store this index for next loop\\n if (gasleft() < minGasToTransferAndStore) break;\\n\\n _creditTo(_srcChainId, _toAddress, _tokenIds[i]);\\n i++;\\n }\\n\\n // indicates the next index to send of tokenIds,\\n // if i == tokenIds.length, we are finished\\n return i;\\n }\\n\\n function setMinGasToTransferAndStore(uint256 _minGasToTransferAndStore) external onlyOwner {\\n require(_minGasToTransferAndStore > 0, \\\"minGasToTransferAndStore must be > 0\\\");\\n minGasToTransferAndStore = _minGasToTransferAndStore;\\n emit SetMinGasToTransferAndStore(_minGasToTransferAndStore);\\n }\\n\\n // ensures enough gas in adapter params to handle batch transfer gas amounts on the dst\\n function setDstChainIdToTransferGas(uint16 _dstChainId, uint256 _dstChainIdToTransferGas) external onlyOwner {\\n require(_dstChainIdToTransferGas > 0, \\\"dstChainIdToTransferGas must be > 0\\\");\\n dstChainIdToTransferGas[_dstChainId] = _dstChainIdToTransferGas;\\n emit SetDstChainIdToTransferGas(_dstChainId, _dstChainIdToTransferGas);\\n }\\n\\n // limit on src the amount of tokens to batch send\\n function setDstChainIdToBatchLimit(uint16 _dstChainId, uint256 _dstChainIdToBatchLimit) external onlyOwner {\\n require(_dstChainIdToBatchLimit > 0, \\\"dstChainIdToBatchLimit must be > 0\\\");\\n dstChainIdToBatchLimit[_dstChainId] = _dstChainIdToBatchLimit;\\n emit SetDstChainIdToBatchLimit(_dstChainId, _dstChainIdToBatchLimit);\\n }\\n\\n function _debitFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId) internal virtual;\\n\\n function _creditTo(uint16 _srcChainId, address _toAddress, uint _tokenId) internal virtual;\\n\\n function _toSingletonArray(uint element) internal pure returns (uint[] memory) {\\n uint[] memory array = new uint[](1);\\n array[0] = element;\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x3fa25a2c80132be23d3b4dd10ada4dc05bf728ee971dfa87e06e89a32d2c3fc2\",\"license\":\"MIT\"},\"contracts/token/onft/extension/UniversalONFT721.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ONFT721.sol\\\";\\n\\n/// @title Interface of the UniversalONFT standard\\ncontract UniversalONFT721 is ONFT721 {\\n uint public nextMintId;\\n uint public maxMintId;\\n\\n /// @notice Constructor for the UniversalONFT\\n /// @param _name the name of the token\\n /// @param _symbol the token symbol\\n /// @param _layerZeroEndpoint handles message transmission across chains\\n /// @param _startMintId the starting mint number on this chain\\n /// @param _endMintId the max number of mints on this chain\\n constructor(string memory _name, string memory _symbol, uint256 _minGasToTransfer, address _layerZeroEndpoint, uint _startMintId, uint _endMintId) ONFT721(_name, _symbol, _minGasToTransfer, _layerZeroEndpoint) {\\n nextMintId = _startMintId;\\n maxMintId = _endMintId;\\n }\\n\\n /// @notice Mint your ONFT\\n function mint() external payable {\\n require(nextMintId <= maxMintId, \\\"UniversalONFT721: max mint limit reached\\\");\\n\\n uint newId = nextMintId;\\n nextMintId++;\\n\\n _safeMint(msg.sender, newId);\\n }\\n}\\n\",\"keccak256\":\"0xa8ab6c0dcbea62942cee60de1411047434141be267765155a3709a1fd64f68b5\",\"license\":\"BUSL-1.1\"},\"contracts/util/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\n\\nlibrary BytesLib {\\n function concat(\\n bytes memory _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1 , \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(\\n bytes storage _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n view\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x2255aadad70e87ed42b158776330175644b07fbbc7e77ed32cd6330974abbcee\",\"license\":\"Unlicense\"},\"contracts/util/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint256 constant LOW_28_MASK =\\n 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf)\\n internal\\n pure\\n {\\n require(_buf.length >= 4);\\n uint256 _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x23942250ddd277c443fa27c6b4ab51e6b3b5e654548b6b9e8d785a88ebec4dfe\",\"license\":\"MIT OR Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b50604051620049b7380380620049b7833981016040819052620000349162000265565b6040518060400160405280601781526020017f4578616d706c65556e6976657273616c4f4e4654373231000000000000000000815250604051806040016040528060078152602001664f4e465437323160c81b8152508585858585858585838383838080620000b2620000ac6200016b60201b60201c565b6200016f565b6001600160a01b031660805250816200011d5760405162461bcd60e51b8152602060048201526024808201527f6d696e476173546f5472616e73666572416e6453746f7265206d7573742062656044820152630203e20360e41b606482015260840160405180910390fd5b5060065581516200013690600a906020850190620001bf565b5080516200014c90600b906020840190620001bf565b50505060109590955550505060115550620002ef975050505050505050565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620001cd90620002b2565b90600052602060002090601f016020900481019282620001f157600085556200023c565b82601f106200020c57805160ff19168380011785556200023c565b828001600101855582156200023c579182015b828111156200023c5782518255916020019190600101906200021f565b506200024a9291506200024e565b5090565b5b808211156200024a57600081556001016200024f565b600080600080608085870312156200027c57600080fd5b845160208601519094506001600160a01b03811681146200029c57600080fd5b6040860151606090960151949790965092505050565b600181811c90821680620002c757607f821691505b60208210811415620002e957634e487b7160e01b600052602260045260246000fd5b50919050565b60805161467462000343600039600081816108cd01528181610ae701528181610deb015281816110700152818161128e01528181611b5e01528181611fe501528181612118015261315501526146746000f3fe6080604052600436106103345760003560e01c80638cfd8f5c116101ab578063baf3292d116100f7578063e1d4c87011610095578063f23536411161006f578063f235364114610a57578063f2fde38b14610a77578063f5ecbdbc14610a97578063fa25f9b614610ab757600080fd5b8063e1d4c870146109d8578063e985e9c5146109ee578063eb8d72b714610a3757600080fd5b8063cbed8b9c116100d1578063cbed8b9c14610965578063d12473a514610985578063d1deba1f146109a5578063df2a5b3b146109b857600080fd5b8063baf3292d1461090f578063c44618341461092f578063c87b56dd1461094557600080fd5b80639f38369a11610164578063ab3ffb931161013e578063ab3ffb9314610880578063af3fb21c14610893578063b353aaa7146108bb578063b88d4fde146108ef57600080fd5b80639f38369a14610820578063a22cb46514610840578063a6c3d1651461086057600080fd5b80638cfd8f5c146107555780638da5cb5b1461078d5780638ffa1f2a146107ab578063950c8a74146107cb57806395d89b41146107eb5780639ea5d6b11461080057600080fd5b80633d8b38f6116102855780635b8c41e6116102235780636aa99da3116101fd5780636aa99da3146106ea57806370a0823114610700578063715018a6146107205780637533d7881461073557600080fd5b80635b8c41e61461065b5780636352211e146106aa57806366ad5c8a146106ca57600080fd5b806342d65a8d1161025f57806342d65a8d146105e557806348288190146106055780634ac3f4ff1461061b578063519056361461064857600080fd5b80633d8b38f61461056a5780633f1f4fa41461058a57806342842e0e146105c557600080fd5b80630b4cad4c116102f25780631249c58b116102cc5780631249c58b1461048a57806322a3ecf91461049257806323b872dd146105155780632a205e3d1461053557600080fd5b80630b4cad4c1461042a5780630df374831461044a57806310ddb1371461046a57600080fd5b80621d35671461033957806301ffc9a71461035b57806306fdde031461039057806307e0db17146103b2578063081812fc146103d2578063095ea7b31461040a575b600080fd5b34801561034557600080fd5b506103596103543660046136ea565b610ae4565b005b34801561036757600080fd5b5061037b610376366004613793565b610d15565b60405190151581526020015b60405180910390f35b34801561039c57600080fd5b506103a5610d38565b6040516103879190613808565b3480156103be57600080fd5b506103596103cd36600461381b565b610dca565b3480156103de57600080fd5b506103f26103ed366004613836565b610e53565b6040516001600160a01b039091168152602001610387565b34801561041657600080fd5b5061035961042536600461386f565b610e7a565b34801561043657600080fd5b50610359610445366004613836565b610f90565b34801561045657600080fd5b5061035961046536600461389b565b611030565b34801561047657600080fd5b5061035961048536600461381b565b61104f565b6103596110a7565b34801561049e57600080fd5b506104e66104ad366004613836565b60096020526000908152604090208054600182015460029092015461ffff821692620100009092046001600160a01b0316919060ff1684565b6040805161ffff90951685526001600160a01b0390931660208501529183015215156060820152608001610387565b34801561052157600080fd5b506103596105303660046138b7565b611130565b34801561054157600080fd5b506105556105503660046139cb565b611162565b60408051928352602083019190915201610387565b34801561057657600080fd5b5061037b610585366004613a59565b611188565b34801561059657600080fd5b506105b76105a536600461381b565b60036020526000908152604090205481565b604051908152602001610387565b3480156105d157600080fd5b506103596105e03660046138b7565b611254565b3480156105f157600080fd5b50610359610600366004613a59565b61126f565b34801561061157600080fd5b506105b760065481565b34801561062757600080fd5b506105b761063636600461381b565b60076020526000908152604090205481565b610359610656366004613aab565b6112f5565b34801561066757600080fd5b506105b7610676366004613b64565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156106b657600080fd5b506103f26106c5366004613836565b61130c565b3480156106d657600080fd5b506103596106e53660046136ea565b61136c565b3480156106f657600080fd5b506105b760105481565b34801561070c57600080fd5b506105b761071b366004613bc1565b611448565b34801561072c57600080fd5b506103596114ce565b34801561074157600080fd5b506103a561075036600461381b565b6114e2565b34801561076157600080fd5b506105b7610770366004613bde565b600260209081526000928352604080842090915290825290205481565b34801561079957600080fd5b506000546001600160a01b03166103f2565b3480156107b757600080fd5b506103596107c6366004613c11565b61157c565b3480156107d757600080fd5b506004546103f2906001600160a01b031681565b3480156107f757600080fd5b506103a56117b6565b34801561080c57600080fd5b5061035961081b36600461389b565b6117c5565b34801561082c57600080fd5b506103a561083b36600461381b565b61187c565b34801561084c57600080fd5b5061035961085b366004613c45565b611993565b34801561086c57600080fd5b5061035961087b366004613a59565b6119a2565b61035961088e366004613cfa565b611a35565b34801561089f57600080fd5b506108a8600181565b60405161ffff9091168152602001610387565b3480156108c757600080fd5b506103f27f000000000000000000000000000000000000000000000000000000000000000081565b3480156108fb57600080fd5b5061035961090a366004613daf565b611a44565b34801561091b57600080fd5b5061035961092a366004613bc1565b611a76565b34801561093b57600080fd5b506105b761271081565b34801561095157600080fd5b506103a5610960366004613836565b611acc565b34801561097157600080fd5b50610359610980366004613e1a565b611b3f565b34801561099157600080fd5b506103596109a036600461389b565b611bd4565b6103596109b33660046136ea565b611c84565b3480156109c457600080fd5b506103596109d3366004613e88565b611e9a565b3480156109e457600080fd5b506105b760115481565b3480156109fa57600080fd5b5061037b610a09366004613ec4565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205460ff1690565b348015610a4357600080fd5b50610359610a52366004613a59565b611f4c565b348015610a6357600080fd5b50610555610a72366004613efd565b611fa6565b348015610a8357600080fd5b50610359610a92366004613bc1565b612071565b348015610aa357600080fd5b506103a5610ab2366004613f76565b6120e7565b348015610ac357600080fd5b506105b7610ad236600461381b565b60086020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b615760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610b7f90613fc3565b80601f0160208091040260200160405190810160405280929190818152602001828054610bab90613fc3565b8015610bf85780601f10610bcd57610100808354040283529160200191610bf8565b820191906000526020600020905b815481529060010190602001808311610bdb57829003601f168201915b50505050509050805186869050148015610c13575060008151115b8015610c3b575080516020820120604051610c319088908890613ffe565b6040518091039020145b610c965760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b6064820152608401610b58565b610d0c8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061219a92505050565b50505050505050565b60006001600160e01b031982161580610d325750610d3282612213565b92915050565b6060600a8054610d4790613fc3565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7390613fc3565b8015610dc05780601f10610d9557610100808354040283529160200191610dc0565b820191906000526020600020905b815481529060010190602001808311610da357829003601f168201915b5050505050905090565b610dd2612253565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610e3857600080fd5b505af1158015610e4c573d6000803e3d6000fd5b5050505050565b6000610e5e826122ad565b506000908152600e60205260409020546001600160a01b031690565b6000610e858261130c565b9050806001600160a01b0316836001600160a01b03161415610ef35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b58565b336001600160a01b0382161480610f0f5750610f0f8133610a09565b610f815760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610b58565b610f8b838361230c565b505050565b610f98612253565b60008111610ff45760405162461bcd60e51b8152602060048201526024808201527f6d696e476173546f5472616e73666572416e6453746f7265206d7573742062656044820152630203e20360e41b6064820152608401610b58565b60068190556040518181527ffebbc4f8bb9ec2313950c718d43123124b15778efda4c1f1d529de2995b4f34d906020015b60405180910390a150565b611038612253565b61ffff909116600090815260036020526040902055565b611057612253565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610e1e565b601154601054111561110c5760405162461bcd60e51b815260206004820152602860248201527f556e6976657273616c4f4e46543732313a206d6178206d696e74206c696d6974604482015267081c995858da195960c21b6064820152608401610b58565b60108054908190600061111e83614024565b919050555061112d338261237a565b50565b61113b335b82612394565b6111575760405162461bcd60e51b8152600401610b589061403f565b610f8b838383612412565b60008061117a8787611173886125ae565b8787611fa6565b915091509550959350505050565b61ffff8316600090815260016020526040812080548291906111a990613fc3565b80601f01602080910402602001604051908101604052809291908181526020018280546111d590613fc3565b80156112225780601f106111f757610100808354040283529160200191611222565b820191906000526020600020905b81548152906001019060200180831161120557829003601f168201915b505050505090508383604051611239929190613ffe565b60405180910390208180519060200120149150509392505050565b610f8b83838360405180602001604052806000815250611a44565b611277612253565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d906112c7908690869086906004016140b6565b600060405180830381600087803b1580156112e157600080fd5b505af1158015610d0c573d6000803e3d6000fd5b610d0c878787611304886125ae565b8787876125f9565b6000818152600c60205260408120546001600160a01b031680610d325760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610b58565b3330146113ca5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610b58565b6114408686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506127cd92505050565b505050505050565b60006001600160a01b0382166114b25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610b58565b506001600160a01b03166000908152600d602052604090205490565b6114d6612253565b6114e06000612924565b565b600160205260009081526040902080546114fb90613fc3565b80601f016020809104026020016040519081016040528092919081815260200182805461152790613fc3565b80156115745780601f1061154957610100808354040283529160200191611574565b820191906000526020600020905b81548152906001019060200180831161155757829003601f168201915b505050505081565b80516020808301919091206000818152600990925260409091206002015460ff166115dd5760405162461bcd60e51b81526020600482015260116024820152701b9bc818dc99591a5d1cc81cdd1bdc9959607a1b6044820152606401610b58565b6000828060200190518101906115f39190614119565b6000848152600960205260408120805460019091015492945090925061162f9161ffff8216916201000090046001600160a01b03169085612974565b60008481526009602052604090206001015490915081116116a45760405162461bcd60e51b815260206004820152602960248201527f6e6f7420656e6f7567682067617320746f2070726f6365737320637265646974604482015268103a3930b739b332b960b91b6064820152608401610b58565b815181141561171c5760008381526009602052604080822080546001600160b01b031916815560018101929092556002909101805460ff19169055517fd7be02b8dd0d27bd0517a9cb4d7469ce27df4313821ae5ec1ff69acc594ba2339061170f9085815260200190565b60405180910390a16117b0565b60408051608081018252600085815260096020818152848320805461ffff80821687526001600160a01b03620100008084048216868a019081529989018b8152600160608b01818152998f90529790965297519851169096026001600160b01b03199091169690951695909517939093178455915191830191909155516002909101805491151560ff199092169190911790555b50505050565b6060600b8054610d4790613fc3565b6117cd612253565b600081116118285760405162461bcd60e51b815260206004820152602260248201527f647374436861696e4964546f42617463684c696d6974206d757374206265203e604482015261020360f41b6064820152608401610b58565b61ffff8216600081815260076020908152604091829020849055815192835282018390527f7315f7654d594ead24a30160ed9ba2d23247f543016b918343591e93d7afdb6d91015b60405180910390a15050565b61ffff811660009081526001602052604081208054606092919061189f90613fc3565b80601f01602080910402602001604051908101604052809291908181526020018280546118cb90613fc3565b80156119185780601f106118ed57610100808354040283529160200191611918565b820191906000526020600020905b8154815290600101906020018083116118fb57829003601f168201915b505050505090508051600014156119715760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610b58565b61198c60006014835161198491906141d3565b8391906129c6565b9392505050565b61199e338383612ad3565b5050565b6119aa612253565b8181306040516020016119bf939291906141ea565b60408051601f1981840301815291815261ffff851660009081526001602090815291902082516119f493919290910190613567565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611a28939291906140b6565b60405180910390a1505050565b610d0c878787878787876125f9565b611a4e3383612394565b611a6a5760405162461bcd60e51b8152600401610b589061403f565b6117b084848484612ba2565b611a7e612253565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b90602001611025565b6060611ad7826122ad565b6000611aee60408051602081019091526000815290565b90506000815111611b0e576040518060200160405280600081525061198c565b80611b1884612bd5565b604051602001611b29929190614210565b6040516020818303038152906040529392505050565b611b47612253565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611b9b908890889088908890889060040161423f565b600060405180830381600087803b158015611bb557600080fd5b505af1158015611bc9573d6000803e3d6000fd5b505050505050505050565b611bdc612253565b60008111611c385760405162461bcd60e51b815260206004820152602360248201527f647374436861696e4964546f5472616e73666572476173206d7573742062652060448201526203e20360ec1b6064820152608401610b58565b61ffff8216600081815260086020908152604091829020849055815192835282018390527fc46df2983228ac2d9754e94a0d565e6671665dc8ad38602bc8e544f0685a29fb9101611870565b61ffff86166000908152600560205260408082209051611ca79088908890613ffe565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611d275760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610b58565b808383604051611d38929190613ffe565b604051809103902014611d975760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610b58565b61ffff87166000908152600560205260408082209051611dba9089908990613ffe565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611e52918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506127cd92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611e89959493929190614278565b60405180910390a150505050505050565b611ea2612253565b60008111611eea5760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b6044820152606401610b58565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611a28565b611f54612253565b61ffff83166000908152600160205260409020611f729083836135eb565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611a28939291906140b6565b60008060008686604051602001611fbe9291906142ee565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612022908b90309086908b908b9060040161431c565b6040805180830381865afa15801561203e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120629190614370565b92509250509550959350505050565b612079612253565b6001600160a01b0381166120de5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b58565b61112d81612924565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015612167573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261218f9190810190614394565b90505b949350505050565b6000806121fd5a60966366ad5c8a60e01b898989896040516024016121c294939291906143c8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612cd2565b9150915081611440576114408686868685612d5c565b60006001600160e01b031982166380ac58cd60e01b148061224457506001600160e01b03198216635b5e139f60e01b145b80610d325750610d3282612df9565b6000546001600160a01b031633146114e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6000818152600c60205260409020546001600160a01b031661112d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610b58565b6000818152600e6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906123418261130c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61199e828260405180602001604052806000815250612e2e565b6000806123a08361130c565b9050806001600160a01b0316846001600160a01b031614806123e757506001600160a01b038082166000908152600f602090815260408083209388168352929052205460ff165b806121925750836001600160a01b031661240084610e53565b6001600160a01b031614949350505050565b826001600160a01b03166124258261130c565b6001600160a01b0316146124895760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b58565b6001600160a01b0382166124eb5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b58565b6124f660008261230c565b6001600160a01b0383166000908152600d6020526040812080546001929061251f9084906141d3565b90915550506001600160a01b0382166000908152600d6020526040812080546001929061254d908490614406565b90915550506000818152600c602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106125e8576125e861441e565b602090810291909101015292915050565b60008451116126405760405162461bcd60e51b8152602060048201526013602482015272746f6b656e4964735b5d20697320656d70747960681b6044820152606401610b58565b835160011480612664575061ffff8616600090815260076020526040902054845111155b6126bb5760405162461bcd60e51b815260206004820152602260248201527f62617463682073697a65206578636565647320647374206261746368206c696d6044820152611a5d60f21b6064820152608401610b58565b60005b84518110156126fe576126ec8888888885815181106126df576126df61441e565b6020026020010151612e61565b806126f681614024565b9150506126be565b50600085856040516020016127149291906142ee565b6040516020818303038152906040529050612759876001848851600860008d61ffff1661ffff168152602001908152602001600020546127549190614434565b612f4c565b61276787828686863461302b565b856040516127759190614453565b6040518091039020886001600160a01b03168861ffff167fe1b87c47fdeb4f9cbadbca9df3af7aba453bb6e501075d0440d88125b711522a886040516127bb919061446f565b60405180910390a45050505050505050565b600080828060200190518101906127e49190614119565b6014820151919350915060006127fc88838386612974565b905082518110156128d05784516020808701919091206040805160808101825261ffff808d1682526001600160a01b0380881683870190815283850188815260016060860181815260008981526009909a529887902095518654935190941662010000026001600160b01b03199093169390941692909217178355519082015592516002909301805493151560ff199094169390931790925590517f10e0b70d256bccc84b7027506978bd8b68984a870788b93b479def144c839ad7906128c69083908990614482565b60405180910390a1505b816001600160a01b0316876040516128e89190614453565b60405180910390208961ffff167f5b821db8a46f8ecbe1941ba2f51cfeea9643268b56631f70d45e2a745d990265866040516127bb919061446f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000825b825181101561218f576006545a10156129905761218f565b6129b486868584815181106129a7576129a761441e565b60200260200101516131d1565b806129be81614024565b915050612978565b6060816129d481601f614406565b1015612a135760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610b58565b612a1d8284614406565b84511015612a615760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610b58565b606082158015612a805760405191506000825260208201604052612aca565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ab9578051835260209283019201612aa1565b5050858452601f01601f1916604052505b50949350505050565b816001600160a01b0316836001600160a01b03161415612b355760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b58565b6001600160a01b038381166000818152600f6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612bad848484612412565b612bb984848484613260565b6117b05760405162461bcd60e51b8152600401610b589061449b565b606081612bf95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612c235780612c0d81614024565b9150612c1c9050600a83614503565b9150612bfd565b6000816001600160401b03811115612c3d57612c3d6138f8565b6040519080825280601f01601f191660200182016040528015612c67576020820181803683370190505b5090505b841561219257612c7c6001836141d3565b9150612c89600a86614517565b612c94906030614406565b60f81b818381518110612ca957612ca961441e565b60200101906001600160f81b031916908160001a905350612ccb600a86614503565b9450612c6b565b6000606060008060008661ffff166001600160401b03811115612cf757612cf76138f8565b6040519080825280601f01601f191660200182016040528015612d21576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612d43578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051612d8d9190614453565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90612dea908790879087908790879061452b565b60405180910390a15050505050565b60006001600160e01b031982166322bac5d960e01b1480610d3257506301ffc9a760e01b6001600160e01b0319831614610d32565b612e38838361335b565b612e456000848484613260565b610f8b5760405162461bcd60e51b8152600401610b589061449b565b612e6a33611135565b612ecd5760405162461bcd60e51b815260206004820152602e60248201527f4f4e46543732313a2073656e642063616c6c6572206973206e6f74206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610b58565b836001600160a01b0316612ee08261130c565b6001600160a01b031614612f415760405162461bcd60e51b815260206004820152602260248201527f4f4e46543732313a2073656e642066726f6d20696e636f7272656374206f776e60448201526132b960f11b6064820152608401610b58565b6117b0843083612412565b6000612f578361349d565b61ffff808716600090815260026020908152604080832093891683529290529081205491925090612f89908490614406565b905060008111612fdb5760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610b58565b808210156114405760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610b58565b61ffff86166000908152600160205260408120805461304990613fc3565b80601f016020809104026020016040519081016040528092919081815260200182805461307590613fc3565b80156130c25780601f10613097576101008083540402835291602001916130c2565b820191906000526020600020905b8154815290600101906020018083116130a557829003601f168201915b505050505090508051600014156131345760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610b58565b61313f8787516134f9565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613196908b9086908c908c908c908c9060040161457d565b6000604051808303818588803b1580156131af57600080fd5b505af11580156131c3573d6000803e3d6000fd5b505050505050505050505050565b6000818152600c60205260409020546001600160a01b0316158061322657506000818152600c60205260409020546001600160a01b03161515801561322657503061321b8261130c565b6001600160a01b0316145b61322f57600080fd5b6000818152600c60205260409020546001600160a01b031661325557610f8b828261237a565b610f8b308383612412565b60006001600160a01b0384163b1561335357604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906132a49033908990889088906004016145e4565b6020604051808303816000875af19250505080156132df575060408051601f3d908101601f191682019092526132dc91810190614621565b60015b613339573d80801561330d576040519150601f19603f3d011682016040523d82523d6000602084013e613312565b606091505b5080516133315760405162461bcd60e51b8152600401610b589061449b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612192565b506001612192565b6001600160a01b0382166133b15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b58565b6000818152600c60205260409020546001600160a01b0316156134165760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b58565b6001600160a01b0382166000908152600d6020526040812080546001929061343f908490614406565b90915550506000818152600c602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006022825110156134f15760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610b58565b506022015190565b61ffff82166000908152600360205260409020548061351757506127105b80821115610f8b5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610b58565b82805461357390613fc3565b90600052602060002090601f01602090048101928261359557600085556135db565b82601f106135ae57805160ff19168380011785556135db565b828001600101855582156135db579182015b828111156135db5782518255916020019190600101906135c0565b506135e792915061365f565b5090565b8280546135f790613fc3565b90600052602060002090601f01602090048101928261361957600085556135db565b82601f106136325782800160ff198235161785556135db565b828001600101855582156135db579182015b828111156135db578235825591602001919060010190613644565b5b808211156135e75760008155600101613660565b803561ffff8116811461368657600080fd5b919050565b60008083601f84011261369d57600080fd5b5081356001600160401b038111156136b457600080fd5b6020830191508360208285010111156136cc57600080fd5b9250929050565b80356001600160401b038116811461368657600080fd5b6000806000806000806080878903121561370357600080fd5b61370c87613674565b955060208701356001600160401b038082111561372857600080fd5b6137348a838b0161368b565b909750955085915061374860408a016136d3565b9450606089013591508082111561375e57600080fd5b5061376b89828a0161368b565b979a9699509497509295939492505050565b6001600160e01b03198116811461112d57600080fd5b6000602082840312156137a557600080fd5b813561198c8161377d565b60005b838110156137cb5781810151838201526020016137b3565b838111156117b05750506000910152565b600081518084526137f48160208601602086016137b0565b601f01601f19169290920160200192915050565b60208152600061198c60208301846137dc565b60006020828403121561382d57600080fd5b61198c82613674565b60006020828403121561384857600080fd5b5035919050565b6001600160a01b038116811461112d57600080fd5b80356136868161384f565b6000806040838503121561388257600080fd5b823561388d8161384f565b946020939093013593505050565b600080604083850312156138ae57600080fd5b61388d83613674565b6000806000606084860312156138cc57600080fd5b83356138d78161384f565b925060208401356138e78161384f565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613936576139366138f8565b604052919050565b60006001600160401b03821115613957576139576138f8565b50601f01601f191660200190565b600082601f83011261397657600080fd5b81356139896139848261393e565b61390e565b81815284602083860101111561399e57600080fd5b816020850160208301376000918101602001919091529392505050565b8035801515811461368657600080fd5b600080600080600060a086880312156139e357600080fd5b6139ec86613674565b945060208601356001600160401b0380821115613a0857600080fd5b613a1489838a01613965565b955060408801359450613a29606089016139bb565b93506080880135915080821115613a3f57600080fd5b50613a4c88828901613965565b9150509295509295909350565b600080600060408486031215613a6e57600080fd5b613a7784613674565b925060208401356001600160401b03811115613a9257600080fd5b613a9e8682870161368b565b9497909650939450505050565b600080600080600080600060e0888a031215613ac657600080fd5b8735613ad18161384f565b9650613adf60208901613674565b955060408801356001600160401b0380821115613afb57600080fd5b613b078b838c01613965565b965060608a0135955060808a01359150613b208261384f565b90935060a089013590613b328261384f565b90925060c08901359080821115613b4857600080fd5b50613b558a828b01613965565b91505092959891949750929550565b600080600060608486031215613b7957600080fd5b613b8284613674565b925060208401356001600160401b03811115613b9d57600080fd5b613ba986828701613965565b925050613bb8604085016136d3565b90509250925092565b600060208284031215613bd357600080fd5b813561198c8161384f565b60008060408385031215613bf157600080fd5b613bfa83613674565b9150613c0860208401613674565b90509250929050565b600060208284031215613c2357600080fd5b81356001600160401b03811115613c3957600080fd5b61219284828501613965565b60008060408385031215613c5857600080fd5b8235613c638161384f565b9150613c08602084016139bb565b60006001600160401b03821115613c8a57613c8a6138f8565b5060051b60200190565b600082601f830112613ca557600080fd5b81356020613cb561398483613c71565b82815260059290921b84018101918181019086841115613cd457600080fd5b8286015b84811015613cef5780358352918301918301613cd8565b509695505050505050565b600080600080600080600060e0888a031215613d1557600080fd5b8735613d208161384f565b9650613d2e60208901613674565b955060408801356001600160401b0380821115613d4a57600080fd5b613d568b838c01613965565b965060608a0135915080821115613d6c57600080fd5b613d788b838c01613c94565b955060808a01359150613d8a8261384f565b819450613d9960a08b01613864565b935060c08a0135915080821115613b4857600080fd5b60008060008060808587031215613dc557600080fd5b8435613dd08161384f565b93506020850135613de08161384f565b92506040850135915060608501356001600160401b03811115613e0257600080fd5b613e0e87828801613965565b91505092959194509250565b600080600080600060808688031215613e3257600080fd5b613e3b86613674565b9450613e4960208701613674565b93506040860135925060608601356001600160401b03811115613e6b57600080fd5b613e778882890161368b565b969995985093965092949392505050565b600080600060608486031215613e9d57600080fd5b613ea684613674565b9250613eb460208501613674565b9150604084013590509250925092565b60008060408385031215613ed757600080fd5b8235613ee28161384f565b91506020830135613ef28161384f565b809150509250929050565b600080600080600060a08688031215613f1557600080fd5b613f1e86613674565b945060208601356001600160401b0380821115613f3a57600080fd5b613f4689838a01613965565b95506040880135915080821115613f5c57600080fd5b613f6889838a01613c94565b9450613a29606089016139bb565b60008060008060808587031215613f8c57600080fd5b613f9585613674565b9350613fa360208601613674565b92506040850135613fb38161384f565b9396929550929360600135925050565b600181811c90821680613fd757607f821691505b60208210811415613ff857634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156140385761403861400e565b5060010190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061218f60408301848661408d565b600082601f8301126140e557600080fd5b81516140f36139848261393e565b81815284602083860101111561410857600080fd5b6121928260208301602087016137b0565b6000806040838503121561412c57600080fd5b82516001600160401b038082111561414357600080fd5b61414f868387016140d4565b935060209150818501518181111561416657600080fd5b85019050601f8101861361417957600080fd5b805161418761398482613c71565b81815260059190911b820183019083810190888311156141a657600080fd5b928401925b828410156141c4578351825292840192908401906141ab565b80955050505050509250929050565b6000828210156141e5576141e561400e565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600083516142228184602088016137b0565b8351908301906142368183602088016137b0565b01949350505050565b600061ffff80881683528087166020840152508460408301526080606083015261426d60808301848661408d565b979650505050505050565b61ffff8616815260806020820152600061429660808301868861408d565b6001600160401b0394909416604083015250606001529392505050565b600081518084526020808501945080840160005b838110156142e3578151875295820195908201906001016142c7565b509495945050505050565b60408152600061430160408301856137dc565b828103602084015261431381856142b3565b95945050505050565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061434a908301866137dc565b8415156060840152828103608084015261436481856137dc565b98975050505050505050565b6000806040838503121561438357600080fd5b505080516020909101519092909150565b6000602082840312156143a657600080fd5b81516001600160401b038111156143bc57600080fd5b612192848285016140d4565b61ffff851681526080602082015260006143e560808301866137dc565b6001600160401b0385166040840152828103606084015261426d81856137dc565b600082198211156144195761441961400e565b500190565b634e487b7160e01b600052603260045260246000fd5b600081600019048311821515161561444e5761444e61400e565b500290565b600082516144658184602087016137b0565b9190910192915050565b60208152600061198c60208301846142b3565b82815260406020820152600061219260408301846137dc565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082614512576145126144ed565b500490565b600082614526576145266144ed565b500690565b61ffff8616815260a06020820152600061454860a08301876137dc565b6001600160401b0386166040840152828103606084015261456981866137dc565b9050828103608084015261436481856137dc565b61ffff8716815260c06020820152600061459a60c08301886137dc565b82810360408401526145ac81886137dc565b6001600160a01b0387811660608601528616608085015283810360a085015290506145d781856137dc565b9998505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614617908301846137dc565b9695505050505050565b60006020828403121561463357600080fd5b815161198c8161377d56fea2646970667358221220e9892a6f10dcfaf57020e2a20525eaff2422cfad451f8b6a882559e721fb872e64736f6c634300080c0033", + "deployedBytecode": "0x6080604052600436106103345760003560e01c80638cfd8f5c116101ab578063baf3292d116100f7578063e1d4c87011610095578063f23536411161006f578063f235364114610a57578063f2fde38b14610a77578063f5ecbdbc14610a97578063fa25f9b614610ab757600080fd5b8063e1d4c870146109d8578063e985e9c5146109ee578063eb8d72b714610a3757600080fd5b8063cbed8b9c116100d1578063cbed8b9c14610965578063d12473a514610985578063d1deba1f146109a5578063df2a5b3b146109b857600080fd5b8063baf3292d1461090f578063c44618341461092f578063c87b56dd1461094557600080fd5b80639f38369a11610164578063ab3ffb931161013e578063ab3ffb9314610880578063af3fb21c14610893578063b353aaa7146108bb578063b88d4fde146108ef57600080fd5b80639f38369a14610820578063a22cb46514610840578063a6c3d1651461086057600080fd5b80638cfd8f5c146107555780638da5cb5b1461078d5780638ffa1f2a146107ab578063950c8a74146107cb57806395d89b41146107eb5780639ea5d6b11461080057600080fd5b80633d8b38f6116102855780635b8c41e6116102235780636aa99da3116101fd5780636aa99da3146106ea57806370a0823114610700578063715018a6146107205780637533d7881461073557600080fd5b80635b8c41e61461065b5780636352211e146106aa57806366ad5c8a146106ca57600080fd5b806342d65a8d1161025f57806342d65a8d146105e557806348288190146106055780634ac3f4ff1461061b578063519056361461064857600080fd5b80633d8b38f61461056a5780633f1f4fa41461058a57806342842e0e146105c557600080fd5b80630b4cad4c116102f25780631249c58b116102cc5780631249c58b1461048a57806322a3ecf91461049257806323b872dd146105155780632a205e3d1461053557600080fd5b80630b4cad4c1461042a5780630df374831461044a57806310ddb1371461046a57600080fd5b80621d35671461033957806301ffc9a71461035b57806306fdde031461039057806307e0db17146103b2578063081812fc146103d2578063095ea7b31461040a575b600080fd5b34801561034557600080fd5b506103596103543660046136ea565b610ae4565b005b34801561036757600080fd5b5061037b610376366004613793565b610d15565b60405190151581526020015b60405180910390f35b34801561039c57600080fd5b506103a5610d38565b6040516103879190613808565b3480156103be57600080fd5b506103596103cd36600461381b565b610dca565b3480156103de57600080fd5b506103f26103ed366004613836565b610e53565b6040516001600160a01b039091168152602001610387565b34801561041657600080fd5b5061035961042536600461386f565b610e7a565b34801561043657600080fd5b50610359610445366004613836565b610f90565b34801561045657600080fd5b5061035961046536600461389b565b611030565b34801561047657600080fd5b5061035961048536600461381b565b61104f565b6103596110a7565b34801561049e57600080fd5b506104e66104ad366004613836565b60096020526000908152604090208054600182015460029092015461ffff821692620100009092046001600160a01b0316919060ff1684565b6040805161ffff90951685526001600160a01b0390931660208501529183015215156060820152608001610387565b34801561052157600080fd5b506103596105303660046138b7565b611130565b34801561054157600080fd5b506105556105503660046139cb565b611162565b60408051928352602083019190915201610387565b34801561057657600080fd5b5061037b610585366004613a59565b611188565b34801561059657600080fd5b506105b76105a536600461381b565b60036020526000908152604090205481565b604051908152602001610387565b3480156105d157600080fd5b506103596105e03660046138b7565b611254565b3480156105f157600080fd5b50610359610600366004613a59565b61126f565b34801561061157600080fd5b506105b760065481565b34801561062757600080fd5b506105b761063636600461381b565b60076020526000908152604090205481565b610359610656366004613aab565b6112f5565b34801561066757600080fd5b506105b7610676366004613b64565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156106b657600080fd5b506103f26106c5366004613836565b61130c565b3480156106d657600080fd5b506103596106e53660046136ea565b61136c565b3480156106f657600080fd5b506105b760105481565b34801561070c57600080fd5b506105b761071b366004613bc1565b611448565b34801561072c57600080fd5b506103596114ce565b34801561074157600080fd5b506103a561075036600461381b565b6114e2565b34801561076157600080fd5b506105b7610770366004613bde565b600260209081526000928352604080842090915290825290205481565b34801561079957600080fd5b506000546001600160a01b03166103f2565b3480156107b757600080fd5b506103596107c6366004613c11565b61157c565b3480156107d757600080fd5b506004546103f2906001600160a01b031681565b3480156107f757600080fd5b506103a56117b6565b34801561080c57600080fd5b5061035961081b36600461389b565b6117c5565b34801561082c57600080fd5b506103a561083b36600461381b565b61187c565b34801561084c57600080fd5b5061035961085b366004613c45565b611993565b34801561086c57600080fd5b5061035961087b366004613a59565b6119a2565b61035961088e366004613cfa565b611a35565b34801561089f57600080fd5b506108a8600181565b60405161ffff9091168152602001610387565b3480156108c757600080fd5b506103f27f000000000000000000000000000000000000000000000000000000000000000081565b3480156108fb57600080fd5b5061035961090a366004613daf565b611a44565b34801561091b57600080fd5b5061035961092a366004613bc1565b611a76565b34801561093b57600080fd5b506105b761271081565b34801561095157600080fd5b506103a5610960366004613836565b611acc565b34801561097157600080fd5b50610359610980366004613e1a565b611b3f565b34801561099157600080fd5b506103596109a036600461389b565b611bd4565b6103596109b33660046136ea565b611c84565b3480156109c457600080fd5b506103596109d3366004613e88565b611e9a565b3480156109e457600080fd5b506105b760115481565b3480156109fa57600080fd5b5061037b610a09366004613ec4565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205460ff1690565b348015610a4357600080fd5b50610359610a52366004613a59565b611f4c565b348015610a6357600080fd5b50610555610a72366004613efd565b611fa6565b348015610a8357600080fd5b50610359610a92366004613bc1565b612071565b348015610aa357600080fd5b506103a5610ab2366004613f76565b6120e7565b348015610ac357600080fd5b506105b7610ad236600461381b565b60086020526000908152604090205481565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610b615760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff861660009081526001602052604081208054610b7f90613fc3565b80601f0160208091040260200160405190810160405280929190818152602001828054610bab90613fc3565b8015610bf85780601f10610bcd57610100808354040283529160200191610bf8565b820191906000526020600020905b815481529060010190602001808311610bdb57829003601f168201915b50505050509050805186869050148015610c13575060008151115b8015610c3b575080516020820120604051610c319088908890613ffe565b6040518091039020145b610c965760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b6064820152608401610b58565b610d0c8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061219a92505050565b50505050505050565b60006001600160e01b031982161580610d325750610d3282612213565b92915050565b6060600a8054610d4790613fc3565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7390613fc3565b8015610dc05780601f10610d9557610100808354040283529160200191610dc0565b820191906000526020600020905b815481529060010190602001808311610da357829003601f168201915b5050505050905090565b610dd2612253565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610e3857600080fd5b505af1158015610e4c573d6000803e3d6000fd5b5050505050565b6000610e5e826122ad565b506000908152600e60205260409020546001600160a01b031690565b6000610e858261130c565b9050806001600160a01b0316836001600160a01b03161415610ef35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b58565b336001600160a01b0382161480610f0f5750610f0f8133610a09565b610f815760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610b58565b610f8b838361230c565b505050565b610f98612253565b60008111610ff45760405162461bcd60e51b8152602060048201526024808201527f6d696e476173546f5472616e73666572416e6453746f7265206d7573742062656044820152630203e20360e41b6064820152608401610b58565b60068190556040518181527ffebbc4f8bb9ec2313950c718d43123124b15778efda4c1f1d529de2995b4f34d906020015b60405180910390a150565b611038612253565b61ffff909116600090815260036020526040902055565b611057612253565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610e1e565b601154601054111561110c5760405162461bcd60e51b815260206004820152602860248201527f556e6976657273616c4f4e46543732313a206d6178206d696e74206c696d6974604482015267081c995858da195960c21b6064820152608401610b58565b60108054908190600061111e83614024565b919050555061112d338261237a565b50565b61113b335b82612394565b6111575760405162461bcd60e51b8152600401610b589061403f565b610f8b838383612412565b60008061117a8787611173886125ae565b8787611fa6565b915091509550959350505050565b61ffff8316600090815260016020526040812080548291906111a990613fc3565b80601f01602080910402602001604051908101604052809291908181526020018280546111d590613fc3565b80156112225780601f106111f757610100808354040283529160200191611222565b820191906000526020600020905b81548152906001019060200180831161120557829003601f168201915b505050505090508383604051611239929190613ffe565b60405180910390208180519060200120149150509392505050565b610f8b83838360405180602001604052806000815250611a44565b611277612253565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d906112c7908690869086906004016140b6565b600060405180830381600087803b1580156112e157600080fd5b505af1158015610d0c573d6000803e3d6000fd5b610d0c878787611304886125ae565b8787876125f9565b6000818152600c60205260408120546001600160a01b031680610d325760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610b58565b3330146113ca5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610b58565b6114408686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506127cd92505050565b505050505050565b60006001600160a01b0382166114b25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610b58565b506001600160a01b03166000908152600d602052604090205490565b6114d6612253565b6114e06000612924565b565b600160205260009081526040902080546114fb90613fc3565b80601f016020809104026020016040519081016040528092919081815260200182805461152790613fc3565b80156115745780601f1061154957610100808354040283529160200191611574565b820191906000526020600020905b81548152906001019060200180831161155757829003601f168201915b505050505081565b80516020808301919091206000818152600990925260409091206002015460ff166115dd5760405162461bcd60e51b81526020600482015260116024820152701b9bc818dc99591a5d1cc81cdd1bdc9959607a1b6044820152606401610b58565b6000828060200190518101906115f39190614119565b6000848152600960205260408120805460019091015492945090925061162f9161ffff8216916201000090046001600160a01b03169085612974565b60008481526009602052604090206001015490915081116116a45760405162461bcd60e51b815260206004820152602960248201527f6e6f7420656e6f7567682067617320746f2070726f6365737320637265646974604482015268103a3930b739b332b960b91b6064820152608401610b58565b815181141561171c5760008381526009602052604080822080546001600160b01b031916815560018101929092556002909101805460ff19169055517fd7be02b8dd0d27bd0517a9cb4d7469ce27df4313821ae5ec1ff69acc594ba2339061170f9085815260200190565b60405180910390a16117b0565b60408051608081018252600085815260096020818152848320805461ffff80821687526001600160a01b03620100008084048216868a019081529989018b8152600160608b01818152998f90529790965297519851169096026001600160b01b03199091169690951695909517939093178455915191830191909155516002909101805491151560ff199092169190911790555b50505050565b6060600b8054610d4790613fc3565b6117cd612253565b600081116118285760405162461bcd60e51b815260206004820152602260248201527f647374436861696e4964546f42617463684c696d6974206d757374206265203e604482015261020360f41b6064820152608401610b58565b61ffff8216600081815260076020908152604091829020849055815192835282018390527f7315f7654d594ead24a30160ed9ba2d23247f543016b918343591e93d7afdb6d91015b60405180910390a15050565b61ffff811660009081526001602052604081208054606092919061189f90613fc3565b80601f01602080910402602001604051908101604052809291908181526020018280546118cb90613fc3565b80156119185780601f106118ed57610100808354040283529160200191611918565b820191906000526020600020905b8154815290600101906020018083116118fb57829003601f168201915b505050505090508051600014156119715760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610b58565b61198c60006014835161198491906141d3565b8391906129c6565b9392505050565b61199e338383612ad3565b5050565b6119aa612253565b8181306040516020016119bf939291906141ea565b60408051601f1981840301815291815261ffff851660009081526001602090815291902082516119f493919290910190613567565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611a28939291906140b6565b60405180910390a1505050565b610d0c878787878787876125f9565b611a4e3383612394565b611a6a5760405162461bcd60e51b8152600401610b589061403f565b6117b084848484612ba2565b611a7e612253565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b90602001611025565b6060611ad7826122ad565b6000611aee60408051602081019091526000815290565b90506000815111611b0e576040518060200160405280600081525061198c565b80611b1884612bd5565b604051602001611b29929190614210565b6040516020818303038152906040529392505050565b611b47612253565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611b9b908890889088908890889060040161423f565b600060405180830381600087803b158015611bb557600080fd5b505af1158015611bc9573d6000803e3d6000fd5b505050505050505050565b611bdc612253565b60008111611c385760405162461bcd60e51b815260206004820152602360248201527f647374436861696e4964546f5472616e73666572476173206d7573742062652060448201526203e20360ec1b6064820152608401610b58565b61ffff8216600081815260086020908152604091829020849055815192835282018390527fc46df2983228ac2d9754e94a0d565e6671665dc8ad38602bc8e544f0685a29fb9101611870565b61ffff86166000908152600560205260408082209051611ca79088908890613ffe565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611d275760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610b58565b808383604051611d38929190613ffe565b604051809103902014611d975760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610b58565b61ffff87166000908152600560205260408082209051611dba9089908990613ffe565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611e52918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506127cd92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e58787878785604051611e89959493929190614278565b60405180910390a150505050505050565b611ea2612253565b60008111611eea5760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b6044820152606401610b58565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001611a28565b611f54612253565b61ffff83166000908152600160205260409020611f729083836135eb565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051611a28939291906140b6565b60008060008686604051602001611fbe9291906142ee565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090612022908b90309086908b908b9060040161431c565b6040805180830381865afa15801561203e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120629190614370565b92509250509550959350505050565b612079612253565b6001600160a01b0381166120de5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b58565b61112d81612924565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015612167573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261218f9190810190614394565b90505b949350505050565b6000806121fd5a60966366ad5c8a60e01b898989896040516024016121c294939291906143c8565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190612cd2565b9150915081611440576114408686868685612d5c565b60006001600160e01b031982166380ac58cd60e01b148061224457506001600160e01b03198216635b5e139f60e01b145b80610d325750610d3282612df9565b6000546001600160a01b031633146114e05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6000818152600c60205260409020546001600160a01b031661112d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610b58565b6000818152600e6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906123418261130c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61199e828260405180602001604052806000815250612e2e565b6000806123a08361130c565b9050806001600160a01b0316846001600160a01b031614806123e757506001600160a01b038082166000908152600f602090815260408083209388168352929052205460ff165b806121925750836001600160a01b031661240084610e53565b6001600160a01b031614949350505050565b826001600160a01b03166124258261130c565b6001600160a01b0316146124895760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b58565b6001600160a01b0382166124eb5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b58565b6124f660008261230c565b6001600160a01b0383166000908152600d6020526040812080546001929061251f9084906141d3565b90915550506001600160a01b0382166000908152600d6020526040812080546001929061254d908490614406565b90915550506000818152600c602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106125e8576125e861441e565b602090810291909101015292915050565b60008451116126405760405162461bcd60e51b8152602060048201526013602482015272746f6b656e4964735b5d20697320656d70747960681b6044820152606401610b58565b835160011480612664575061ffff8616600090815260076020526040902054845111155b6126bb5760405162461bcd60e51b815260206004820152602260248201527f62617463682073697a65206578636565647320647374206261746368206c696d6044820152611a5d60f21b6064820152608401610b58565b60005b84518110156126fe576126ec8888888885815181106126df576126df61441e565b6020026020010151612e61565b806126f681614024565b9150506126be565b50600085856040516020016127149291906142ee565b6040516020818303038152906040529050612759876001848851600860008d61ffff1661ffff168152602001908152602001600020546127549190614434565b612f4c565b61276787828686863461302b565b856040516127759190614453565b6040518091039020886001600160a01b03168861ffff167fe1b87c47fdeb4f9cbadbca9df3af7aba453bb6e501075d0440d88125b711522a886040516127bb919061446f565b60405180910390a45050505050505050565b600080828060200190518101906127e49190614119565b6014820151919350915060006127fc88838386612974565b905082518110156128d05784516020808701919091206040805160808101825261ffff808d1682526001600160a01b0380881683870190815283850188815260016060860181815260008981526009909a529887902095518654935190941662010000026001600160b01b03199093169390941692909217178355519082015592516002909301805493151560ff199094169390931790925590517f10e0b70d256bccc84b7027506978bd8b68984a870788b93b479def144c839ad7906128c69083908990614482565b60405180910390a1505b816001600160a01b0316876040516128e89190614453565b60405180910390208961ffff167f5b821db8a46f8ecbe1941ba2f51cfeea9643268b56631f70d45e2a745d990265866040516127bb919061446f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000825b825181101561218f576006545a10156129905761218f565b6129b486868584815181106129a7576129a761441e565b60200260200101516131d1565b806129be81614024565b915050612978565b6060816129d481601f614406565b1015612a135760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610b58565b612a1d8284614406565b84511015612a615760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610b58565b606082158015612a805760405191506000825260208201604052612aca565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ab9578051835260209283019201612aa1565b5050858452601f01601f1916604052505b50949350505050565b816001600160a01b0316836001600160a01b03161415612b355760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b58565b6001600160a01b038381166000818152600f6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612bad848484612412565b612bb984848484613260565b6117b05760405162461bcd60e51b8152600401610b589061449b565b606081612bf95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612c235780612c0d81614024565b9150612c1c9050600a83614503565b9150612bfd565b6000816001600160401b03811115612c3d57612c3d6138f8565b6040519080825280601f01601f191660200182016040528015612c67576020820181803683370190505b5090505b841561219257612c7c6001836141d3565b9150612c89600a86614517565b612c94906030614406565b60f81b818381518110612ca957612ca961441e565b60200101906001600160f81b031916908160001a905350612ccb600a86614503565b9450612c6b565b6000606060008060008661ffff166001600160401b03811115612cf757612cf76138f8565b6040519080825280601f01601f191660200182016040528015612d21576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115612d43578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051612d8d9190614453565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90612dea908790879087908790879061452b565b60405180910390a15050505050565b60006001600160e01b031982166322bac5d960e01b1480610d3257506301ffc9a760e01b6001600160e01b0319831614610d32565b612e38838361335b565b612e456000848484613260565b610f8b5760405162461bcd60e51b8152600401610b589061449b565b612e6a33611135565b612ecd5760405162461bcd60e51b815260206004820152602e60248201527f4f4e46543732313a2073656e642063616c6c6572206973206e6f74206f776e6560448201526d1c881b9bdc88185c1c1c9bdd995960921b6064820152608401610b58565b836001600160a01b0316612ee08261130c565b6001600160a01b031614612f415760405162461bcd60e51b815260206004820152602260248201527f4f4e46543732313a2073656e642066726f6d20696e636f7272656374206f776e60448201526132b960f11b6064820152608401610b58565b6117b0843083612412565b6000612f578361349d565b61ffff808716600090815260026020908152604080832093891683529290529081205491925090612f89908490614406565b905060008111612fdb5760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f74207365740000000000006044820152606401610b58565b808210156114405760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f7700000000006044820152606401610b58565b61ffff86166000908152600160205260408120805461304990613fc3565b80601f016020809104026020016040519081016040528092919081815260200182805461307590613fc3565b80156130c25780601f10613097576101008083540402835291602001916130c2565b820191906000526020600020905b8154815290600101906020018083116130a557829003601f168201915b505050505090508051600014156131345760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610b58565b61313f8787516134f9565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490613196908b9086908c908c908c908c9060040161457d565b6000604051808303818588803b1580156131af57600080fd5b505af11580156131c3573d6000803e3d6000fd5b505050505050505050505050565b6000818152600c60205260409020546001600160a01b0316158061322657506000818152600c60205260409020546001600160a01b03161515801561322657503061321b8261130c565b6001600160a01b0316145b61322f57600080fd5b6000818152600c60205260409020546001600160a01b031661325557610f8b828261237a565b610f8b308383612412565b60006001600160a01b0384163b1561335357604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906132a49033908990889088906004016145e4565b6020604051808303816000875af19250505080156132df575060408051601f3d908101601f191682019092526132dc91810190614621565b60015b613339573d80801561330d576040519150601f19603f3d011682016040523d82523d6000602084013e613312565b606091505b5080516133315760405162461bcd60e51b8152600401610b589061449b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612192565b506001612192565b6001600160a01b0382166133b15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b58565b6000818152600c60205260409020546001600160a01b0316156134165760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b58565b6001600160a01b0382166000908152600d6020526040812080546001929061343f908490614406565b90915550506000818152600c602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006022825110156134f15760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d73000000006044820152606401610b58565b506022015190565b61ffff82166000908152600360205260409020548061351757506127105b80821115610f8b5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c617267656044820152606401610b58565b82805461357390613fc3565b90600052602060002090601f01602090048101928261359557600085556135db565b82601f106135ae57805160ff19168380011785556135db565b828001600101855582156135db579182015b828111156135db5782518255916020019190600101906135c0565b506135e792915061365f565b5090565b8280546135f790613fc3565b90600052602060002090601f01602090048101928261361957600085556135db565b82601f106136325782800160ff198235161785556135db565b828001600101855582156135db579182015b828111156135db578235825591602001919060010190613644565b5b808211156135e75760008155600101613660565b803561ffff8116811461368657600080fd5b919050565b60008083601f84011261369d57600080fd5b5081356001600160401b038111156136b457600080fd5b6020830191508360208285010111156136cc57600080fd5b9250929050565b80356001600160401b038116811461368657600080fd5b6000806000806000806080878903121561370357600080fd5b61370c87613674565b955060208701356001600160401b038082111561372857600080fd5b6137348a838b0161368b565b909750955085915061374860408a016136d3565b9450606089013591508082111561375e57600080fd5b5061376b89828a0161368b565b979a9699509497509295939492505050565b6001600160e01b03198116811461112d57600080fd5b6000602082840312156137a557600080fd5b813561198c8161377d565b60005b838110156137cb5781810151838201526020016137b3565b838111156117b05750506000910152565b600081518084526137f48160208601602086016137b0565b601f01601f19169290920160200192915050565b60208152600061198c60208301846137dc565b60006020828403121561382d57600080fd5b61198c82613674565b60006020828403121561384857600080fd5b5035919050565b6001600160a01b038116811461112d57600080fd5b80356136868161384f565b6000806040838503121561388257600080fd5b823561388d8161384f565b946020939093013593505050565b600080604083850312156138ae57600080fd5b61388d83613674565b6000806000606084860312156138cc57600080fd5b83356138d78161384f565b925060208401356138e78161384f565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613936576139366138f8565b604052919050565b60006001600160401b03821115613957576139576138f8565b50601f01601f191660200190565b600082601f83011261397657600080fd5b81356139896139848261393e565b61390e565b81815284602083860101111561399e57600080fd5b816020850160208301376000918101602001919091529392505050565b8035801515811461368657600080fd5b600080600080600060a086880312156139e357600080fd5b6139ec86613674565b945060208601356001600160401b0380821115613a0857600080fd5b613a1489838a01613965565b955060408801359450613a29606089016139bb565b93506080880135915080821115613a3f57600080fd5b50613a4c88828901613965565b9150509295509295909350565b600080600060408486031215613a6e57600080fd5b613a7784613674565b925060208401356001600160401b03811115613a9257600080fd5b613a9e8682870161368b565b9497909650939450505050565b600080600080600080600060e0888a031215613ac657600080fd5b8735613ad18161384f565b9650613adf60208901613674565b955060408801356001600160401b0380821115613afb57600080fd5b613b078b838c01613965565b965060608a0135955060808a01359150613b208261384f565b90935060a089013590613b328261384f565b90925060c08901359080821115613b4857600080fd5b50613b558a828b01613965565b91505092959891949750929550565b600080600060608486031215613b7957600080fd5b613b8284613674565b925060208401356001600160401b03811115613b9d57600080fd5b613ba986828701613965565b925050613bb8604085016136d3565b90509250925092565b600060208284031215613bd357600080fd5b813561198c8161384f565b60008060408385031215613bf157600080fd5b613bfa83613674565b9150613c0860208401613674565b90509250929050565b600060208284031215613c2357600080fd5b81356001600160401b03811115613c3957600080fd5b61219284828501613965565b60008060408385031215613c5857600080fd5b8235613c638161384f565b9150613c08602084016139bb565b60006001600160401b03821115613c8a57613c8a6138f8565b5060051b60200190565b600082601f830112613ca557600080fd5b81356020613cb561398483613c71565b82815260059290921b84018101918181019086841115613cd457600080fd5b8286015b84811015613cef5780358352918301918301613cd8565b509695505050505050565b600080600080600080600060e0888a031215613d1557600080fd5b8735613d208161384f565b9650613d2e60208901613674565b955060408801356001600160401b0380821115613d4a57600080fd5b613d568b838c01613965565b965060608a0135915080821115613d6c57600080fd5b613d788b838c01613c94565b955060808a01359150613d8a8261384f565b819450613d9960a08b01613864565b935060c08a0135915080821115613b4857600080fd5b60008060008060808587031215613dc557600080fd5b8435613dd08161384f565b93506020850135613de08161384f565b92506040850135915060608501356001600160401b03811115613e0257600080fd5b613e0e87828801613965565b91505092959194509250565b600080600080600060808688031215613e3257600080fd5b613e3b86613674565b9450613e4960208701613674565b93506040860135925060608601356001600160401b03811115613e6b57600080fd5b613e778882890161368b565b969995985093965092949392505050565b600080600060608486031215613e9d57600080fd5b613ea684613674565b9250613eb460208501613674565b9150604084013590509250925092565b60008060408385031215613ed757600080fd5b8235613ee28161384f565b91506020830135613ef28161384f565b809150509250929050565b600080600080600060a08688031215613f1557600080fd5b613f1e86613674565b945060208601356001600160401b0380821115613f3a57600080fd5b613f4689838a01613965565b95506040880135915080821115613f5c57600080fd5b613f6889838a01613c94565b9450613a29606089016139bb565b60008060008060808587031215613f8c57600080fd5b613f9585613674565b9350613fa360208601613674565b92506040850135613fb38161384f565b9396929550929360600135925050565b600181811c90821680613fd757607f821691505b60208210811415613ff857634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b60006000198214156140385761403861400e565b5060010190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff8416815260406020820152600061218f60408301848661408d565b600082601f8301126140e557600080fd5b81516140f36139848261393e565b81815284602083860101111561410857600080fd5b6121928260208301602087016137b0565b6000806040838503121561412c57600080fd5b82516001600160401b038082111561414357600080fd5b61414f868387016140d4565b935060209150818501518181111561416657600080fd5b85019050601f8101861361417957600080fd5b805161418761398482613c71565b81815260059190911b820183019083810190888311156141a657600080fd5b928401925b828410156141c4578351825292840192908401906141ab565b80955050505050509250929050565b6000828210156141e5576141e561400e565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600083516142228184602088016137b0565b8351908301906142368183602088016137b0565b01949350505050565b600061ffff80881683528087166020840152508460408301526080606083015261426d60808301848661408d565b979650505050505050565b61ffff8616815260806020820152600061429660808301868861408d565b6001600160401b0394909416604083015250606001529392505050565b600081518084526020808501945080840160005b838110156142e3578151875295820195908201906001016142c7565b509495945050505050565b60408152600061430160408301856137dc565b828103602084015261431381856142b3565b95945050505050565b61ffff861681526001600160a01b038516602082015260a06040820181905260009061434a908301866137dc565b8415156060840152828103608084015261436481856137dc565b98975050505050505050565b6000806040838503121561438357600080fd5b505080516020909101519092909150565b6000602082840312156143a657600080fd5b81516001600160401b038111156143bc57600080fd5b612192848285016140d4565b61ffff851681526080602082015260006143e560808301866137dc565b6001600160401b0385166040840152828103606084015261426d81856137dc565b600082198211156144195761441961400e565b500190565b634e487b7160e01b600052603260045260246000fd5b600081600019048311821515161561444e5761444e61400e565b500290565b600082516144658184602087016137b0565b9190910192915050565b60208152600061198c60208301846142b3565b82815260406020820152600061219260408301846137dc565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082614512576145126144ed565b500490565b600082614526576145266144ed565b500690565b61ffff8616815260a06020820152600061454860a08301876137dc565b6001600160401b0386166040840152828103606084015261456981866137dc565b9050828103608084015261436481856137dc565b61ffff8716815260c06020820152600061459a60c08301886137dc565b82810360408401526145ac81886137dc565b6001600160a01b0387811660608601528616608085015283810360a085015290506145d781856137dc565b9998505050505050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614617908301846137dc565b9695505050505050565b60006020828403121561463357600080fd5b815161198c8161377d56fea2646970667358221220e9892a6f10dcfaf57020e2a20525eaff2422cfad451f8b6a882559e721fb872e64736f6c634300080c0033", + "devdoc": { + "kind": "dev", + "methods": { + "approve(address,uint256)": { + "details": "See {IERC721-approve}." + }, + "balanceOf(address)": { + "details": "See {IERC721-balanceOf}." + }, + "estimateSendBatchFee(uint16,bytes,uint256[],bool,bytes)": { + "details": "estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _tokenIds[] - token Ids to transfer _useZro - indicates to use zro to pay L0 fees _adapterParams - flexible bytes array to indicate messaging adapter services in L0" + }, + "estimateSendFee(uint16,bytes,uint256,bool,bytes)": { + "details": "estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) _dstChainId - L0 defined chain id to send tokens too _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain _tokenId - token Id to transfer _useZro - indicates to use zro to pay L0 fees _adapterParams - flexible bytes array to indicate messaging adapter services in L0" + }, + "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}." + }, + "sendBatchFrom(address,uint16,bytes,uint256[],address,address,bytes)": { + "details": "send tokens `_tokenIds[]` to (`_dstChainId`, `_toAddress`) from `_from` `_toAddress` can be any size depending on the `dstChainId`. `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services" + }, + "sendFrom(address,uint16,bytes,uint256,address,address,bytes)": { + "details": "send token `_tokenId` to (`_dstChainId`, `_toAddress`) from `_from` `_toAddress` can be any size depending on the `dstChainId`. `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) `_adapterParams` is a flexible bytes array to indicate messaging adapter services" + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC721-setApprovalForAll}." + }, + "symbol()": { + "details": "See {IERC721Metadata-symbol}." + }, + "tokenURI(uint256)": { + "details": "See {IERC721Metadata-tokenURI}." + }, + "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." + } + }, + "title": "A LayerZero UniversalONFT example", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "mint()": { + "notice": "Mint your ONFT" + } + }, + "notice": "You can use this to mint ONFT and send nftIds across chain. Each contract deployed to a chain should carefully set a `_startMintIndex` and a `_maxMint` value to set a range of allowed mintable nftIds (so that no two chains can mint the same id!)", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4047, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 14745, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "trustedRemoteLookup", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint16,t_bytes_storage)" + }, + { + "astId": 14751, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "minDstGasLookup", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))" + }, + { + "astId": 14755, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "payloadSizeLimitLookup", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 14757, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "precrime", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 15294, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "failedMessages", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" + }, + { + "astId": 24550, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "minGasToTransferAndStore", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 24554, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "dstChainIdToBatchLimit", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 24558, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "dstChainIdToTransferGas", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 24563, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "storedCredits", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_bytes32,t_struct(StoredCredit)24548_storage)" + }, + { + "astId": 6798, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "_name", + "offset": 0, + "slot": "10", + "type": "t_string_storage" + }, + { + "astId": 6800, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "_symbol", + "offset": 0, + "slot": "11", + "type": "t_string_storage" + }, + { + "astId": 6804, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "_owners", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 6808, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "_balances", + "offset": 0, + "slot": "13", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 6812, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "_tokenApprovals", + "offset": 0, + "slot": "14", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 6818, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "_operatorApprovals", + "offset": 0, + "slot": "15", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 26818, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "nextMintId", + "offset": 0, + "slot": "16", + "type": "t_uint256" + }, + { + "astId": 26820, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "maxMintId", + "offset": 0, + "slot": "17", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "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_bytes32,t_struct(StoredCredit)24548_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct ONFT721Core.StoredCredit)", + "numberOfBytes": "32", + "value": "t_struct(StoredCredit)24548_storage" + }, + "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bytes32))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bytes32)" + }, + "t_mapping(t_uint16,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))" + }, + "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(uint16 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint16,t_uint256)" + }, + "t_mapping(t_uint16,t_uint256)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_uint64,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(StoredCredit)24548_storage": { + "encoding": "inplace", + "label": "struct ONFT721Core.StoredCredit", + "members": [ + { + "astId": 24541, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "srcChainId", + "offset": 0, + "slot": "0", + "type": "t_uint16" + }, + { + "astId": 24543, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "toAddress", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 24545, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "index", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 24547, + "contract": "contracts/examples/ExampleUniversalONFT721.sol:ExampleUniversalONFT721", + "label": "creditsRemain", + "offset": 0, + "slot": "2", + "type": "t_bool" + } + ], + "numberOfBytes": "96" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/packages/verify-contract/test/__data__/deployments/fuji/GasDrop.json b/packages/verify-contract/test/__data__/deployments/fuji/GasDrop.json new file mode 100644 index 000000000..35adc524b --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/fuji/GasDrop.json @@ -0,0 +1,1110 @@ +{ + "address": "0xF8c171c01cC8B29Bec662876A840eDecA9831a36", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_endpoint", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "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": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveGasDrop", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendGasDrop", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dstGas", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16[]", + "name": "_dstChainId", + "type": "uint16[]" + }, + { + "internalType": "bytes[]", + "name": "_toAddress", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_amount", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + } + ], + "name": "gasDrop", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16[]", + "name": "_dstChainId", + "type": "uint16[]" + }, + { + "internalType": "bytes[]", + "name": "_toAddress", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_amount", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + } + ], + "name": "gasDrop", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_dstGas", + "type": "uint256" + } + ], + "name": "setDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x1b4fcf847964c812aaaeb9a86a6e9cace13f0dd9e2358c25ea3afd19e7fe3008", + "receipt": { + "to": null, + "from": "0x28921b09dB1C7add63265e5ec79B008F0851D5DC", + "contractAddress": "0xF8c171c01cC8B29Bec662876A840eDecA9831a36", + "transactionIndex": 2, + "gasUsed": "2599447", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000001000000000000000000000000000000000000020000000000000800000800000000800000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000400000000000000040000000000", + "blockHash": "0x08519a83102672b7319b4b4c1f78d08c494e7cb2c4beddefe791c4278895c41b", + "transactionHash": "0x1b4fcf847964c812aaaeb9a86a6e9cace13f0dd9e2358c25ea3afd19e7fe3008", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 21820017, + "transactionHash": "0x1b4fcf847964c812aaaeb9a86a6e9cace13f0dd9e2358c25ea3afd19e7fe3008", + "address": "0xF8c171c01cC8B29Bec662876A840eDecA9831a36", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000028921b09db1c7add63265e5ec79b008f0851d5dc" + ], + "data": "0x", + "logIndex": 9, + "blockHash": "0x08519a83102672b7319b4b4c1f78d08c494e7cb2c4beddefe791c4278895c41b" + } + ], + "blockNumber": 21820017, + "cumulativeGasUsed": "2923511", + "status": 1, + "byzantium": true + }, + "args": ["0x93f54D755A063cE7bB9e6Ac47Eccc8e33411d706"], + "numDeployments": 1, + "solcInputHash": "0b9d032c4641d4c04b36f0f0f21200c2", + "metadata": "{\"compiler\":{\"version\":\"0.8.12+commit.f00d7308\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_endpoint\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"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\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveGasDrop\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendGasDrop\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dstGas\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16[]\",\"name\":\"_dstChainId\",\"type\":\"uint16[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_toAddress\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amount\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"}],\"name\":\"gasDrop\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16[]\",\"name\":\"_dstChainId\",\"type\":\"uint16[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_toAddress\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amount\",\"type\":\"uint256[]\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"}],\"name\":\"gasDrop\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dstGas\",\"type\":\"uint256\"}],\"name\":\"setDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"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.\"},\"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/examples/GasDrop.sol\":\"GasDrop\"},\"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/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\"},\"contracts/examples/GasDrop.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../lzApp/NonblockingLzApp.sol\\\";\\n\\ncontract GasDrop is NonblockingLzApp {\\n uint16 public constant VERSION = 2;\\n uint public dstGas = 25000;\\n\\n event SendGasDrop(uint16 indexed _dstChainId, address indexed _from, bytes indexed _toAddress, uint _amount);\\n event ReceiveGasDrop(uint16 indexed _srcChainId, address indexed _from, bytes indexed _toAddress, uint _amount);\\n\\n constructor(address _endpoint) NonblockingLzApp(_endpoint) {}\\n\\n function estimateSendFee(uint16 _dstChainId, bytes memory _toAddress, uint _amount, bool _useZro) external view virtual returns (uint nativeFee, uint zroFee) {\\n bytes memory adapterParams = abi.encodePacked(VERSION, dstGas, _amount, _toAddress);\\n bytes memory payload = abi.encode(_amount, msg.sender, _toAddress);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, adapterParams);\\n }\\n\\n function estimateSendFee(uint16[] memory _dstChainId, bytes[] memory _toAddress, uint[] memory _amount, bool _useZro) external view virtual returns (uint nativeFee, uint zroFee) {\\n require(_dstChainId.length == _toAddress.length, \\\"_dstChainId and _toAddress must be same size\\\");\\n require(_toAddress.length == _amount.length, \\\"_dstChainId and _toAddress must be same size\\\");\\n for(uint i = 0; i < _dstChainId.length; i++) {\\n bytes memory adapterParams = abi.encodePacked(VERSION, dstGas, _amount[i], _toAddress[i]);\\n bytes memory payload = abi.encode(_amount[i], msg.sender, _toAddress[i]);\\n (uint native, uint zro) = lzEndpoint.estimateFees(_dstChainId[i], address(this), payload, _useZro, adapterParams);\\n nativeFee += native;\\n zroFee += zro;\\n }\\n }\\n\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory, uint64, bytes memory _payload) internal virtual override {\\n (uint amount, address fromAddress, bytes memory toAddress) = abi.decode(_payload, (uint, address, bytes));\\n emit ReceiveGasDrop(_srcChainId, fromAddress, toAddress, amount);\\n }\\n\\n function gasDrop(uint16 _dstChainId, bytes memory _toAddress, uint _amount, address payable _refundAddress, address _zroPaymentAddress) external payable virtual {\\n bytes memory adapterParams = abi.encodePacked(VERSION, dstGas, _amount, _toAddress);\\n bytes memory payload = abi.encode(_amount, msg.sender, _toAddress);\\n _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, adapterParams, msg.value);\\n emit SendGasDrop(_dstChainId, msg.sender, _toAddress, _amount);\\n }\\n\\n function gasDrop(uint16[] memory _dstChainId, bytes[] memory _toAddress, uint[] memory _amount, address payable _refundAddress, address _zroPaymentAddress) external payable virtual {\\n require(_dstChainId.length == _toAddress.length, \\\"_dstChainId and _toAddress must be same size\\\");\\n require(_toAddress.length == _amount.length, \\\"_dstChainId and _toAddress must be same size\\\");\\n for(uint i = 0; i < _dstChainId.length; i++) {\\n bytes memory adapterParams = abi.encodePacked(VERSION, dstGas, _amount[i], _toAddress[i]);\\n bytes memory payload = abi.encode(_amount[i], msg.sender, _toAddress[i]);\\n address payable refundAddress = (i == _dstChainId.length - 1) ? _refundAddress : payable(address(this));\\n _lzSend(_dstChainId[i], payload, refundAddress, _zroPaymentAddress, adapterParams, address(this).balance);\\n emit SendGasDrop(_dstChainId[i], msg.sender, _toAddress[i], _amount[i]);\\n }\\n }\\n\\n function setDstGas(uint _dstGas) external onlyOwner {\\n dstGas = _dstGas;\\n }\\n\\n // Needed for contract to accept ETH\\n receive() external payable {}\\n}\",\"keccak256\":\"0xeb6a6fb2a55f3ce7e5569d98a01d33d87e466223aa8a249208693d48b56fa4b1\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xe9617a9f6db351b6ac4c9d5b1097798af59ad7f813e370e8cf69bb44addd8548\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0x909bf72002c91806f39a64172c12b4188219e8649deefbe8d862604d4f9d3faf\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xe3e50134e39aa3c0f916447d36367970c6e4df972d488b794227e0b052ce80d5\",\"license\":\"MIT\"},\"contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"../interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"../interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../util/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint constant public DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(_srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote), \\\"LzApp: invalid source sending contract\\\");\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams, uint _nativeFee) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(uint16 _dstChainId, uint16 _type, bytes memory _adapterParams, uint _extraGas) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type] + _extraGas;\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) { // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(uint16 _version, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = _path;\\n emit SetTrustedRemote(_remoteChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(uint16 _dstChainId, uint16 _packetType, uint _minGas) external onlyOwner {\\n require(_minGas > 0, \\\"LzApp: invalid minGas\\\");\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0xdcf824e4bd747296fa38dbce9f8250514ce24e53cff79909a785e0923274de4a\",\"license\":\"MIT\"},\"contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../util/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft(), 150, abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload));\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload, bytes memory _reason) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function retryMessage(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x2afd4980a5850f45f2c4d7ec44d77b292a51b80f847566479548f89572065311\",\"license\":\"MIT\"},\"contracts/util/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\n\\nlibrary BytesLib {\\n function concat(\\n bytes memory _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1 , \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(\\n bytes storage _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n view\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x2255aadad70e87ed42b158776330175644b07fbbc7e77ed32cd6330974abbcee\",\"license\":\"Unlicense\"},\"contracts/util/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint256 constant LOW_28_MASK =\\n 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf)\\n internal\\n pure\\n {\\n require(_buf.length >= 4);\\n uint256 _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x23942250ddd277c443fa27c6b4ab51e6b3b5e654548b6b9e8d785a88ebec4dfe\",\"license\":\"MIT OR Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60a06040526161a86006553480156200001757600080fd5b5060405162002e6f38038062002e6f8339810160408190526200003a91620000ac565b808062000047336200005c565b6001600160a01b031660805250620000de9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000bf57600080fd5b81516001600160a01b0381168114620000d757600080fd5b9392505050565b608051612d36620001396000396000818161052201528181610678015281816108c70152818161096f01528181610a9e01528181610e5b0152818161137601528181611722015281816118b20152611b2f0152612d366000f3fe6080604052600436106101e65760003560e01c80638cfd8f5c11610102578063cbed8b9c11610095578063eb8d72b711610064578063eb8d72b7146105ed578063f2fde38b1461060d578063f5ecbdbc1461062d578063ffa1ad741461064d57600080fd5b8063cbed8b9c1461057a578063d1deba1f1461059a578063df2a5b3b146105ad578063e3ee7ed7146105cd57600080fd5b8063a6c3d165116100d1578063a6c3d165146104f0578063b353aaa714610510578063baf3292d14610544578063c44618341461056457600080fd5b80638cfd8f5c146104465780638da5cb5b1461047e578063950c8a74146104b05780639f38369a146104d057600080fd5b806342d65a8d1161017a578063715018a611610149578063715018a6146103bc5780637533d788146103d15780637eec463b146103fe57806389be3eb61461043357600080fd5b806342d65a8d1461031a5780634915937e1461033a5780635b8c41e61461034d57806366ad5c8a1461039c57600080fd5b80633b4592f2116101b65780633b4592f2146102745780633d8b38f6146102945780633e1be1f8146102c95780633f1f4fa4146102ed57600080fd5b80621d3567146101f257806307e0db17146102145780630df374831461023457806310ddb1371461025457600080fd5b366101ed57005b600080fd5b3480156101fe57600080fd5b5061021261020d36600461209a565b610675565b005b34801561022057600080fd5b5061021261022f36600461212d565b6108a6565b34801561024057600080fd5b5061021261024f366004612148565b61092f565b34801561026057600080fd5b5061021261026f36600461212d565b61094e565b34801561028057600080fd5b5061021261028f366004612172565b6109a6565b3480156102a057600080fd5b506102b46102af36600461218b565b6109b3565b60405190151581526020015b60405180910390f35b3480156102d557600080fd5b506102df60065481565b6040519081526020016102c0565b3480156102f957600080fd5b506102df61030836600461212d565b60036020526000908152604090205481565b34801561032657600080fd5b5061021261033536600461218b565b610a7f565b6102126103483660046122b5565b610b05565b34801561035957600080fd5b506102df610368366004612333565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156103a857600080fd5b506102126103b736600461209a565b610bc2565b3480156103c857600080fd5b50610212610c9e565b3480156103dd57600080fd5b506103f16103ec36600461212d565b610cb2565b6040516102c091906123ec565b34801561040a57600080fd5b5061041e610419366004612579565b610d4c565b604080519283526020830191909152016102c0565b610212610441366004612611565b610f44565b34801561045257600080fd5b506102df6104613660046126a2565b600260209081526000928352604080842090915290825290205481565b34801561048a57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016102c0565b3480156104bc57600080fd5b50600454610498906001600160a01b031681565b3480156104dc57600080fd5b506103f16104eb36600461212d565b611151565b3480156104fc57600080fd5b5061021261050b36600461218b565b611268565b34801561051c57600080fd5b506104987f000000000000000000000000000000000000000000000000000000000000000081565b34801561055057600080fd5b5061021261055f3660046126d5565b6112fb565b34801561057057600080fd5b506102df61271081565b34801561058657600080fd5b506102126105953660046126f2565b611357565b6102126105a836600461209a565b6113ec565b3480156105b957600080fd5b506102126105c8366004612760565b611602565b3480156105d957600080fd5b5061041e6105e836600461279c565b6116b4565b3480156105f957600080fd5b5061021261060836600461218b565b6117ae565b34801561061957600080fd5b506102126106283660046126d5565b611808565b34801561063957600080fd5b506103f16106483660046127f8565b611881565b34801561065957600080fd5b50610662600281565b60405161ffff90911681526020016102c0565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146106f25760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461071090612845565b80601f016020809104026020016040519081016040528092919081815260200182805461073c90612845565b80156107895780601f1061075e57610100808354040283529160200191610789565b820191906000526020600020905b81548152906001019060200180831161076c57829003601f168201915b505050505090508051868690501480156107a4575060008151115b80156107cc5750805160208201206040516107c29088908890612880565b6040518091039020145b6108275760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b60648201526084016106e9565b61089d8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061193292505050565b50505050505050565b6108ae6119ab565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b15801561091457600080fd5b505af1158015610928573d6000803e3d6000fd5b5050505050565b6109376119ab565b61ffff909116600090815260036020526040902055565b6109566119ab565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb137906024016108fa565b6109ae6119ab565b600655565b61ffff8316600090815260016020526040812080548291906109d490612845565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0090612845565b8015610a4d5780601f10610a2257610100808354040283529160200191610a4d565b820191906000526020600020905b815481529060010190602001808311610a3057829003601f168201915b505050505090508383604051610a64929190612880565b60405180910390208180519060200120149150509392505050565b610a876119ab565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610ad7908690869086906004016128b9565b600060405180830381600087803b158015610af157600080fd5b505af115801561089d573d6000803e3d6000fd5b600060026006548587604051602001610b2194939291906128d7565b60405160208183030381529060405290506000843387604051602001610b4993929190612915565b6040516020818303038152906040529050610b68878286868634611a05565b85604051610b76919061293f565b60405190819003812086825290339061ffff8a16907f61f260f3550ed2f4f577ac21fb33baf5257f44da023d19ce285b7139a65f239a906020015b60405180910390a450505050505050565b333014610c205760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b60648201526084016106e9565b610c968686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f890181900481028201810190925287815289935091508790879081908401838280828437600092019190915250611bab92505050565b505050505050565b610ca66119ab565b610cb06000611c20565b565b60016020526000908152604090208054610ccb90612845565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf790612845565b8015610d445780601f10610d1957610100808354040283529160200191610d44565b820191906000526020600020905b815481529060010190602001808311610d2757829003601f168201915b505050505081565b6000808451865114610d705760405162461bcd60e51b81526004016106e99061295b565b8351855114610d915760405162461bcd60e51b81526004016106e99061295b565b60005b8651811015610f3a5760006002600654878481518110610db657610db66129a7565b6020026020010151898581518110610dd057610dd06129a7565b6020026020010151604051602001610deb94939291906128d7565b60405160208183030381529060405290506000868381518110610e1057610e106129a7565b602002602001015133898581518110610e2b57610e2b6129a7565b6020026020010151604051602001610e4593929190612915565b60405160208183030381529060405290506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340a7bb108c8781518110610e9a57610e9a6129a7565b602002602001015130868c896040518663ffffffff1660e01b8152600401610ec69594939291906129bd565b6040805180830381865afa158015610ee2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f069190612a11565b9092509050610f158288612a4b565b9650610f218187612a4b565b9550505050508080610f3290612a63565b915050610d94565b5094509492505050565b8351855114610f655760405162461bcd60e51b81526004016106e99061295b565b8251845114610f865760405162461bcd60e51b81526004016106e99061295b565b60005b8551811015610c965760006002600654868481518110610fab57610fab6129a7565b6020026020010151888581518110610fc557610fc56129a7565b6020026020010151604051602001610fe094939291906128d7565b60405160208183030381529060405290506000858381518110611005576110056129a7565b602002602001015133888581518110611020576110206129a7565b602002602001015160405160200161103a93929190612915565b604051602081830303815290604052905060006001895161105b9190612a7e565b84146110675730611069565b855b9050611092898581518110611080576110806129a7565b60200260200101518383888747611a05565b8784815181106110a4576110a46129a7565b60200260200101516040516110b9919061293f565b6040518091039020336001600160a01b03168a86815181106110dd576110dd6129a7565b602002602001015161ffff167f61f260f3550ed2f4f577ac21fb33baf5257f44da023d19ce285b7139a65f239a8a888151811061111c5761111c6129a7565b602002602001015160405161113391815260200190565b60405180910390a4505050808061114990612a63565b915050610f89565b61ffff811660009081526001602052604081208054606092919061117490612845565b80601f01602080910402602001604051908101604052809291908181526020018280546111a090612845565b80156111ed5780601f106111c2576101008083540402835291602001916111ed565b820191906000526020600020905b8154815290600101906020018083116111d057829003601f168201915b505050505090508051600014156112465760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f726400000060448201526064016106e9565b6112616000601483516112599190612a7e565b839190611c70565b9392505050565b6112706119ab565b81813060405160200161128593929190612a95565b60408051601f1981840301815291815261ffff851660009081526001602090815291902082516112ba93919290910190611f17565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce8383836040516112ee939291906128b9565b60405180910390a1505050565b6113036119ab565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b61135f6119ab565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c906113b39088908890889088908890600401612abb565b600060405180830381600087803b1580156113cd57600080fd5b505af11580156113e1573d6000803e3d6000fd5b505050505050505050565b61ffff8616600090815260056020526040808220905161140f9088908890612880565b90815260408051602092819003830190206001600160401b0387166000908152925290205490508061148f5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b60648201526084016106e9565b8083836040516114a0929190612880565b6040518091039020146114ff5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b60648201526084016106e9565b61ffff871660009081526005602052604080822090516115229089908990612880565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f880182900482028301820190528682526115ba918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a935091508890889081908401838280828437600092019190915250611bab92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e587878787856040516115f1959493929190612af4565b60405180910390a150505050505050565b61160a6119ab565b600081116116525760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b60448201526064016106e9565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac0906060016112ee565b6000806000600260065486886040516020016116d394939291906128d7565b604051602081830303815290604052905060008533886040516020016116fb93929190612915565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb109061175f908b90309086908b9089906004016129bd565b6040805180830381865afa15801561177b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179f9190612a11565b93509350505094509492505050565b6117b66119ab565b61ffff831660009081526001602052604090206117d4908383611f9b565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab8383836040516112ee939291906128b9565b6118106119ab565b6001600160a01b0381166118755760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e9565b61187e81611c20565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611901573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119299190810190612b7c565b95945050505050565b6000806119955a60966366ad5c8a60e01b8989898960405160240161195a9493929190612bb0565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190611d7d565b9150915081610c9657610c968686868685611e07565b6000546001600160a01b03163314610cb05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e9565b61ffff861660009081526001602052604081208054611a2390612845565b80601f0160208091040260200160405190810160405280929190818152602001828054611a4f90612845565b8015611a9c5780601f10611a7157610100808354040283529160200191611a9c565b820191906000526020600020905b815481529060010190602001808311611a7f57829003601f168201915b50505050509050805160001415611b0e5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b60648201526084016106e9565b611b19878751611ea4565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490611b70908b9086908c908c908c908c90600401612bee565b6000604051808303818588803b158015611b8957600080fd5b505af1158015611b9d573d6000803e3d6000fd5b505050505050505050505050565b600080600083806020019051810190611bc49190612c55565b92509250925080604051611bd8919061293f565b6040518091039020826001600160a01b03168861ffff167f72b2a62c1045e48221f301d9352d5773acbb1f5e6d6e7657b2622fef3f00446b86604051610bb191815260200190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606081611c7e81601f612a4b565b1015611cbd5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016106e9565b611cc78284612a4b565b84511015611d0b5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016106e9565b606082158015611d2a5760405191506000825260208201604052611d74565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611d63578051835260209283019201611d4b565b5050858452601f01601f1916604052505b50949350505050565b6000606060008060008661ffff166001600160401b03811115611da257611da26121dd565b6040519080825280601f01601f191660200182016040528015611dcc576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115611dee578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051611e38919061293f565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90611e959087908790879087908790612cae565b60405180910390a15050505050565b61ffff821660009081526003602052604090205480611ec257506127105b80821115611f125760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c6172676560448201526064016106e9565b505050565b828054611f2390612845565b90600052602060002090601f016020900481019282611f455760008555611f8b565b82601f10611f5e57805160ff1916838001178555611f8b565b82800160010185558215611f8b579182015b82811115611f8b578251825591602001919060010190611f70565b50611f9792915061200f565b5090565b828054611fa790612845565b90600052602060002090601f016020900481019282611fc95760008555611f8b565b82601f10611fe25782800160ff19823516178555611f8b565b82800160010185558215611f8b579182015b82811115611f8b578235825591602001919060010190611ff4565b5b80821115611f975760008155600101612010565b803561ffff8116811461203657600080fd5b919050565b60008083601f84011261204d57600080fd5b5081356001600160401b0381111561206457600080fd5b60208301915083602082850101111561207c57600080fd5b9250929050565b80356001600160401b038116811461203657600080fd5b600080600080600080608087890312156120b357600080fd5b6120bc87612024565b955060208701356001600160401b03808211156120d857600080fd5b6120e48a838b0161203b565b90975095508591506120f860408a01612083565b9450606089013591508082111561210e57600080fd5b5061211b89828a0161203b565b979a9699509497509295939492505050565b60006020828403121561213f57600080fd5b61126182612024565b6000806040838503121561215b57600080fd5b61216483612024565b946020939093013593505050565b60006020828403121561218457600080fd5b5035919050565b6000806000604084860312156121a057600080fd5b6121a984612024565b925060208401356001600160401b038111156121c457600080fd5b6121d08682870161203b565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561221b5761221b6121dd565b604052919050565b60006001600160401b0382111561223c5761223c6121dd565b50601f01601f191660200190565b600082601f83011261225b57600080fd5b813561226e61226982612223565b6121f3565b81815284602083860101111561228357600080fd5b816020850160208301376000918101602001919091529392505050565b6001600160a01b038116811461187e57600080fd5b600080600080600060a086880312156122cd57600080fd5b6122d686612024565b945060208601356001600160401b038111156122f157600080fd5b6122fd8882890161224a565b945050604086013592506060860135612315816122a0565b91506080860135612325816122a0565b809150509295509295909350565b60008060006060848603121561234857600080fd5b61235184612024565b925060208401356001600160401b0381111561236c57600080fd5b6123788682870161224a565b92505061238760408501612083565b90509250925092565b60005b838110156123ab578181015183820152602001612393565b838111156123ba576000848401525b50505050565b600081518084526123d8816020860160208601612390565b601f01601f19169290920160200192915050565b60208152600061126160208301846123c0565b60006001600160401b03821115612418576124186121dd565b5060051b60200190565b600082601f83011261243357600080fd5b81356020612443612269836123ff565b82815260059290921b8401810191818101908684111561246257600080fd5b8286015b848110156124845761247781612024565b8352918301918301612466565b509695505050505050565b600082601f8301126124a057600080fd5b813560206124b0612269836123ff565b82815260059290921b840181019181810190868411156124cf57600080fd5b8286015b848110156124845780356001600160401b038111156124f25760008081fd5b6125008986838b010161224a565b8452509183019183016124d3565b600082601f83011261251f57600080fd5b8135602061252f612269836123ff565b82815260059290921b8401810191818101908684111561254e57600080fd5b8286015b848110156124845780358352918301918301612552565b8035801515811461203657600080fd5b6000806000806080858703121561258f57600080fd5b84356001600160401b03808211156125a657600080fd5b6125b288838901612422565b955060208701359150808211156125c857600080fd5b6125d48883890161248f565b945060408701359150808211156125ea57600080fd5b506125f78782880161250e565b92505061260660608601612569565b905092959194509250565b600080600080600060a0868803121561262957600080fd5b85356001600160401b038082111561264057600080fd5b61264c89838a01612422565b9650602088013591508082111561266257600080fd5b61266e89838a0161248f565b9550604088013591508082111561268457600080fd5b506126918882890161250e565b9350506060860135612315816122a0565b600080604083850312156126b557600080fd5b6126be83612024565b91506126cc60208401612024565b90509250929050565b6000602082840312156126e757600080fd5b8135611261816122a0565b60008060008060006080868803121561270a57600080fd5b61271386612024565b945061272160208701612024565b93506040860135925060608601356001600160401b0381111561274357600080fd5b61274f8882890161203b565b969995985093965092949392505050565b60008060006060848603121561277557600080fd5b61277e84612024565b925061278c60208501612024565b9150604084013590509250925092565b600080600080608085870312156127b257600080fd5b6127bb85612024565b935060208501356001600160401b038111156127d657600080fd5b6127e28782880161224a565b9350506040850135915061260660608601612569565b6000806000806080858703121561280e57600080fd5b61281785612024565b935061282560208601612024565b92506040850135612835816122a0565b9396929550929360600135925050565b600181811c9082168061285957607f821691505b6020821081141561287a57634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611929604083018486612890565b61ffff60f01b8560f01b16815283600282015282602282015260008251612905816042850160208701612390565b9190910160420195945050505050565b8381526001600160a01b0383166020820152606060408201819052600090611929908301846123c0565b60008251612951818460208701612390565b9190910192915050565b6020808252602c908201527f5f647374436861696e496420616e64205f746f41646472657373206d7573742060408201526b62652073616d652073697a6560a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b61ffff861681526001600160a01b038516602082015260a0604082018190526000906129eb908301866123c0565b84151560608401528281036080840152612a0581856123c0565b98975050505050505050565b60008060408385031215612a2457600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b60008219821115612a5e57612a5e612a35565b500190565b6000600019821415612a7757612a77612a35565b5060010190565b600082821015612a9057612a90612a35565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152612ae9608083018486612890565b979650505050505050565b61ffff86168152608060208201526000612b12608083018688612890565b6001600160401b0394909416604083015250606001529392505050565b600082601f830112612b4057600080fd5b8151612b4e61226982612223565b818152846020838601011115612b6357600080fd5b612b74826020830160208701612390565b949350505050565b600060208284031215612b8e57600080fd5b81516001600160401b03811115612ba457600080fd5b612b7484828501612b2f565b61ffff85168152608060208201526000612bcd60808301866123c0565b6001600160401b03851660408401528281036060840152612ae981856123c0565b61ffff8716815260c060208201526000612c0b60c08301886123c0565b8281036040840152612c1d81886123c0565b6001600160a01b0387811660608601528616608085015283810360a08501529050612c4881856123c0565b9998505050505050505050565b600080600060608486031215612c6a57600080fd5b835192506020840151612c7c816122a0565b60408501519092506001600160401b03811115612c9857600080fd5b612ca486828701612b2f565b9150509250925092565b61ffff8616815260a060208201526000612ccb60a08301876123c0565b6001600160401b03861660408401528281036060840152612cec81866123c0565b90508281036080840152612a0581856123c056fea264697066735822122026d37d6d6a3a14102000d267854dc055fac27a8ea3c87c2b01f711fcd1c86d4664736f6c634300080c0033", + "deployedBytecode": "0x6080604052600436106101e65760003560e01c80638cfd8f5c11610102578063cbed8b9c11610095578063eb8d72b711610064578063eb8d72b7146105ed578063f2fde38b1461060d578063f5ecbdbc1461062d578063ffa1ad741461064d57600080fd5b8063cbed8b9c1461057a578063d1deba1f1461059a578063df2a5b3b146105ad578063e3ee7ed7146105cd57600080fd5b8063a6c3d165116100d1578063a6c3d165146104f0578063b353aaa714610510578063baf3292d14610544578063c44618341461056457600080fd5b80638cfd8f5c146104465780638da5cb5b1461047e578063950c8a74146104b05780639f38369a146104d057600080fd5b806342d65a8d1161017a578063715018a611610149578063715018a6146103bc5780637533d788146103d15780637eec463b146103fe57806389be3eb61461043357600080fd5b806342d65a8d1461031a5780634915937e1461033a5780635b8c41e61461034d57806366ad5c8a1461039c57600080fd5b80633b4592f2116101b65780633b4592f2146102745780633d8b38f6146102945780633e1be1f8146102c95780633f1f4fa4146102ed57600080fd5b80621d3567146101f257806307e0db17146102145780630df374831461023457806310ddb1371461025457600080fd5b366101ed57005b600080fd5b3480156101fe57600080fd5b5061021261020d36600461209a565b610675565b005b34801561022057600080fd5b5061021261022f36600461212d565b6108a6565b34801561024057600080fd5b5061021261024f366004612148565b61092f565b34801561026057600080fd5b5061021261026f36600461212d565b61094e565b34801561028057600080fd5b5061021261028f366004612172565b6109a6565b3480156102a057600080fd5b506102b46102af36600461218b565b6109b3565b60405190151581526020015b60405180910390f35b3480156102d557600080fd5b506102df60065481565b6040519081526020016102c0565b3480156102f957600080fd5b506102df61030836600461212d565b60036020526000908152604090205481565b34801561032657600080fd5b5061021261033536600461218b565b610a7f565b6102126103483660046122b5565b610b05565b34801561035957600080fd5b506102df610368366004612333565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156103a857600080fd5b506102126103b736600461209a565b610bc2565b3480156103c857600080fd5b50610212610c9e565b3480156103dd57600080fd5b506103f16103ec36600461212d565b610cb2565b6040516102c091906123ec565b34801561040a57600080fd5b5061041e610419366004612579565b610d4c565b604080519283526020830191909152016102c0565b610212610441366004612611565b610f44565b34801561045257600080fd5b506102df6104613660046126a2565b600260209081526000928352604080842090915290825290205481565b34801561048a57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016102c0565b3480156104bc57600080fd5b50600454610498906001600160a01b031681565b3480156104dc57600080fd5b506103f16104eb36600461212d565b611151565b3480156104fc57600080fd5b5061021261050b36600461218b565b611268565b34801561051c57600080fd5b506104987f000000000000000000000000000000000000000000000000000000000000000081565b34801561055057600080fd5b5061021261055f3660046126d5565b6112fb565b34801561057057600080fd5b506102df61271081565b34801561058657600080fd5b506102126105953660046126f2565b611357565b6102126105a836600461209a565b6113ec565b3480156105b957600080fd5b506102126105c8366004612760565b611602565b3480156105d957600080fd5b5061041e6105e836600461279c565b6116b4565b3480156105f957600080fd5b5061021261060836600461218b565b6117ae565b34801561061957600080fd5b506102126106283660046126d5565b611808565b34801561063957600080fd5b506103f16106483660046127f8565b611881565b34801561065957600080fd5b50610662600281565b60405161ffff90911681526020016102c0565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146106f25760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461071090612845565b80601f016020809104026020016040519081016040528092919081815260200182805461073c90612845565b80156107895780601f1061075e57610100808354040283529160200191610789565b820191906000526020600020905b81548152906001019060200180831161076c57829003601f168201915b505050505090508051868690501480156107a4575060008151115b80156107cc5750805160208201206040516107c29088908890612880565b6040518091039020145b6108275760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b60648201526084016106e9565b61089d8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061193292505050565b50505050505050565b6108ae6119ab565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b15801561091457600080fd5b505af1158015610928573d6000803e3d6000fd5b5050505050565b6109376119ab565b61ffff909116600090815260036020526040902055565b6109566119ab565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb137906024016108fa565b6109ae6119ab565b600655565b61ffff8316600090815260016020526040812080548291906109d490612845565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0090612845565b8015610a4d5780601f10610a2257610100808354040283529160200191610a4d565b820191906000526020600020905b815481529060010190602001808311610a3057829003601f168201915b505050505090508383604051610a64929190612880565b60405180910390208180519060200120149150509392505050565b610a876119ab565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610ad7908690869086906004016128b9565b600060405180830381600087803b158015610af157600080fd5b505af115801561089d573d6000803e3d6000fd5b600060026006548587604051602001610b2194939291906128d7565b60405160208183030381529060405290506000843387604051602001610b4993929190612915565b6040516020818303038152906040529050610b68878286868634611a05565b85604051610b76919061293f565b60405190819003812086825290339061ffff8a16907f61f260f3550ed2f4f577ac21fb33baf5257f44da023d19ce285b7139a65f239a906020015b60405180910390a450505050505050565b333014610c205760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b60648201526084016106e9565b610c968686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f890181900481028201810190925287815289935091508790879081908401838280828437600092019190915250611bab92505050565b505050505050565b610ca66119ab565b610cb06000611c20565b565b60016020526000908152604090208054610ccb90612845565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf790612845565b8015610d445780601f10610d1957610100808354040283529160200191610d44565b820191906000526020600020905b815481529060010190602001808311610d2757829003601f168201915b505050505081565b6000808451865114610d705760405162461bcd60e51b81526004016106e99061295b565b8351855114610d915760405162461bcd60e51b81526004016106e99061295b565b60005b8651811015610f3a5760006002600654878481518110610db657610db66129a7565b6020026020010151898581518110610dd057610dd06129a7565b6020026020010151604051602001610deb94939291906128d7565b60405160208183030381529060405290506000868381518110610e1057610e106129a7565b602002602001015133898581518110610e2b57610e2b6129a7565b6020026020010151604051602001610e4593929190612915565b60405160208183030381529060405290506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340a7bb108c8781518110610e9a57610e9a6129a7565b602002602001015130868c896040518663ffffffff1660e01b8152600401610ec69594939291906129bd565b6040805180830381865afa158015610ee2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f069190612a11565b9092509050610f158288612a4b565b9650610f218187612a4b565b9550505050508080610f3290612a63565b915050610d94565b5094509492505050565b8351855114610f655760405162461bcd60e51b81526004016106e99061295b565b8251845114610f865760405162461bcd60e51b81526004016106e99061295b565b60005b8551811015610c965760006002600654868481518110610fab57610fab6129a7565b6020026020010151888581518110610fc557610fc56129a7565b6020026020010151604051602001610fe094939291906128d7565b60405160208183030381529060405290506000858381518110611005576110056129a7565b602002602001015133888581518110611020576110206129a7565b602002602001015160405160200161103a93929190612915565b604051602081830303815290604052905060006001895161105b9190612a7e565b84146110675730611069565b855b9050611092898581518110611080576110806129a7565b60200260200101518383888747611a05565b8784815181106110a4576110a46129a7565b60200260200101516040516110b9919061293f565b6040518091039020336001600160a01b03168a86815181106110dd576110dd6129a7565b602002602001015161ffff167f61f260f3550ed2f4f577ac21fb33baf5257f44da023d19ce285b7139a65f239a8a888151811061111c5761111c6129a7565b602002602001015160405161113391815260200190565b60405180910390a4505050808061114990612a63565b915050610f89565b61ffff811660009081526001602052604081208054606092919061117490612845565b80601f01602080910402602001604051908101604052809291908181526020018280546111a090612845565b80156111ed5780601f106111c2576101008083540402835291602001916111ed565b820191906000526020600020905b8154815290600101906020018083116111d057829003601f168201915b505050505090508051600014156112465760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f726400000060448201526064016106e9565b6112616000601483516112599190612a7e565b839190611c70565b9392505050565b6112706119ab565b81813060405160200161128593929190612a95565b60408051601f1981840301815291815261ffff851660009081526001602090815291902082516112ba93919290910190611f17565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce8383836040516112ee939291906128b9565b60405180910390a1505050565b6113036119ab565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b61135f6119ab565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c906113b39088908890889088908890600401612abb565b600060405180830381600087803b1580156113cd57600080fd5b505af11580156113e1573d6000803e3d6000fd5b505050505050505050565b61ffff8616600090815260056020526040808220905161140f9088908890612880565b90815260408051602092819003830190206001600160401b0387166000908152925290205490508061148f5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b60648201526084016106e9565b8083836040516114a0929190612880565b6040518091039020146114ff5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b60648201526084016106e9565b61ffff871660009081526005602052604080822090516115229089908990612880565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f880182900482028301820190528682526115ba918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a935091508890889081908401838280828437600092019190915250611bab92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e587878787856040516115f1959493929190612af4565b60405180910390a150505050505050565b61160a6119ab565b600081116116525760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b60448201526064016106e9565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac0906060016112ee565b6000806000600260065486886040516020016116d394939291906128d7565b604051602081830303815290604052905060008533886040516020016116fb93929190612915565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb109061175f908b90309086908b9089906004016129bd565b6040805180830381865afa15801561177b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179f9190612a11565b93509350505094509492505050565b6117b66119ab565b61ffff831660009081526001602052604090206117d4908383611f9b565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab8383836040516112ee939291906128b9565b6118106119ab565b6001600160a01b0381166118755760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e9565b61187e81611c20565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611901573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119299190810190612b7c565b95945050505050565b6000806119955a60966366ad5c8a60e01b8989898960405160240161195a9493929190612bb0565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190611d7d565b9150915081610c9657610c968686868685611e07565b6000546001600160a01b03163314610cb05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e9565b61ffff861660009081526001602052604081208054611a2390612845565b80601f0160208091040260200160405190810160405280929190818152602001828054611a4f90612845565b8015611a9c5780601f10611a7157610100808354040283529160200191611a9c565b820191906000526020600020905b815481529060010190602001808311611a7f57829003601f168201915b50505050509050805160001415611b0e5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b60648201526084016106e9565b611b19878751611ea4565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490611b70908b9086908c908c908c908c90600401612bee565b6000604051808303818588803b158015611b8957600080fd5b505af1158015611b9d573d6000803e3d6000fd5b505050505050505050505050565b600080600083806020019051810190611bc49190612c55565b92509250925080604051611bd8919061293f565b6040518091039020826001600160a01b03168861ffff167f72b2a62c1045e48221f301d9352d5773acbb1f5e6d6e7657b2622fef3f00446b86604051610bb191815260200190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606081611c7e81601f612a4b565b1015611cbd5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016106e9565b611cc78284612a4b565b84511015611d0b5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016106e9565b606082158015611d2a5760405191506000825260208201604052611d74565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611d63578051835260209283019201611d4b565b5050858452601f01601f1916604052505b50949350505050565b6000606060008060008661ffff166001600160401b03811115611da257611da26121dd565b6040519080825280601f01601f191660200182016040528015611dcc576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115611dee578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051611e38919061293f565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90611e959087908790879087908790612cae565b60405180910390a15050505050565b61ffff821660009081526003602052604090205480611ec257506127105b80821115611f125760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c6172676560448201526064016106e9565b505050565b828054611f2390612845565b90600052602060002090601f016020900481019282611f455760008555611f8b565b82601f10611f5e57805160ff1916838001178555611f8b565b82800160010185558215611f8b579182015b82811115611f8b578251825591602001919060010190611f70565b50611f9792915061200f565b5090565b828054611fa790612845565b90600052602060002090601f016020900481019282611fc95760008555611f8b565b82601f10611fe25782800160ff19823516178555611f8b565b82800160010185558215611f8b579182015b82811115611f8b578235825591602001919060010190611ff4565b5b80821115611f975760008155600101612010565b803561ffff8116811461203657600080fd5b919050565b60008083601f84011261204d57600080fd5b5081356001600160401b0381111561206457600080fd5b60208301915083602082850101111561207c57600080fd5b9250929050565b80356001600160401b038116811461203657600080fd5b600080600080600080608087890312156120b357600080fd5b6120bc87612024565b955060208701356001600160401b03808211156120d857600080fd5b6120e48a838b0161203b565b90975095508591506120f860408a01612083565b9450606089013591508082111561210e57600080fd5b5061211b89828a0161203b565b979a9699509497509295939492505050565b60006020828403121561213f57600080fd5b61126182612024565b6000806040838503121561215b57600080fd5b61216483612024565b946020939093013593505050565b60006020828403121561218457600080fd5b5035919050565b6000806000604084860312156121a057600080fd5b6121a984612024565b925060208401356001600160401b038111156121c457600080fd5b6121d08682870161203b565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561221b5761221b6121dd565b604052919050565b60006001600160401b0382111561223c5761223c6121dd565b50601f01601f191660200190565b600082601f83011261225b57600080fd5b813561226e61226982612223565b6121f3565b81815284602083860101111561228357600080fd5b816020850160208301376000918101602001919091529392505050565b6001600160a01b038116811461187e57600080fd5b600080600080600060a086880312156122cd57600080fd5b6122d686612024565b945060208601356001600160401b038111156122f157600080fd5b6122fd8882890161224a565b945050604086013592506060860135612315816122a0565b91506080860135612325816122a0565b809150509295509295909350565b60008060006060848603121561234857600080fd5b61235184612024565b925060208401356001600160401b0381111561236c57600080fd5b6123788682870161224a565b92505061238760408501612083565b90509250925092565b60005b838110156123ab578181015183820152602001612393565b838111156123ba576000848401525b50505050565b600081518084526123d8816020860160208601612390565b601f01601f19169290920160200192915050565b60208152600061126160208301846123c0565b60006001600160401b03821115612418576124186121dd565b5060051b60200190565b600082601f83011261243357600080fd5b81356020612443612269836123ff565b82815260059290921b8401810191818101908684111561246257600080fd5b8286015b848110156124845761247781612024565b8352918301918301612466565b509695505050505050565b600082601f8301126124a057600080fd5b813560206124b0612269836123ff565b82815260059290921b840181019181810190868411156124cf57600080fd5b8286015b848110156124845780356001600160401b038111156124f25760008081fd5b6125008986838b010161224a565b8452509183019183016124d3565b600082601f83011261251f57600080fd5b8135602061252f612269836123ff565b82815260059290921b8401810191818101908684111561254e57600080fd5b8286015b848110156124845780358352918301918301612552565b8035801515811461203657600080fd5b6000806000806080858703121561258f57600080fd5b84356001600160401b03808211156125a657600080fd5b6125b288838901612422565b955060208701359150808211156125c857600080fd5b6125d48883890161248f565b945060408701359150808211156125ea57600080fd5b506125f78782880161250e565b92505061260660608601612569565b905092959194509250565b600080600080600060a0868803121561262957600080fd5b85356001600160401b038082111561264057600080fd5b61264c89838a01612422565b9650602088013591508082111561266257600080fd5b61266e89838a0161248f565b9550604088013591508082111561268457600080fd5b506126918882890161250e565b9350506060860135612315816122a0565b600080604083850312156126b557600080fd5b6126be83612024565b91506126cc60208401612024565b90509250929050565b6000602082840312156126e757600080fd5b8135611261816122a0565b60008060008060006080868803121561270a57600080fd5b61271386612024565b945061272160208701612024565b93506040860135925060608601356001600160401b0381111561274357600080fd5b61274f8882890161203b565b969995985093965092949392505050565b60008060006060848603121561277557600080fd5b61277e84612024565b925061278c60208501612024565b9150604084013590509250925092565b600080600080608085870312156127b257600080fd5b6127bb85612024565b935060208501356001600160401b038111156127d657600080fd5b6127e28782880161224a565b9350506040850135915061260660608601612569565b6000806000806080858703121561280e57600080fd5b61281785612024565b935061282560208601612024565b92506040850135612835816122a0565b9396929550929360600135925050565b600181811c9082168061285957607f821691505b6020821081141561287a57634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611929604083018486612890565b61ffff60f01b8560f01b16815283600282015282602282015260008251612905816042850160208701612390565b9190910160420195945050505050565b8381526001600160a01b0383166020820152606060408201819052600090611929908301846123c0565b60008251612951818460208701612390565b9190910192915050565b6020808252602c908201527f5f647374436861696e496420616e64205f746f41646472657373206d7573742060408201526b62652073616d652073697a6560a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b61ffff861681526001600160a01b038516602082015260a0604082018190526000906129eb908301866123c0565b84151560608401528281036080840152612a0581856123c0565b98975050505050505050565b60008060408385031215612a2457600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b60008219821115612a5e57612a5e612a35565b500190565b6000600019821415612a7757612a77612a35565b5060010190565b600082821015612a9057612a90612a35565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152612ae9608083018486612890565b979650505050505050565b61ffff86168152608060208201526000612b12608083018688612890565b6001600160401b0394909416604083015250606001529392505050565b600082601f830112612b4057600080fd5b8151612b4e61226982612223565b818152846020838601011115612b6357600080fd5b612b74826020830160208701612390565b949350505050565b600060208284031215612b8e57600080fd5b81516001600160401b03811115612ba457600080fd5b612b7484828501612b2f565b61ffff85168152608060208201526000612bcd60808301866123c0565b6001600160401b03851660408401528281036060840152612ae981856123c0565b61ffff8716815260c060208201526000612c0b60c08301886123c0565b8281036040840152612c1d81886123c0565b6001600160a01b0387811660608601528616608085015283810360a08501529050612c4881856123c0565b9998505050505050505050565b600080600060608486031215612c6a57600080fd5b835192506020840151612c7c816122a0565b60408501519092506001600160401b03811115612c9857600080fd5b612ca486828701612b2f565b9150509250925092565b61ffff8616815260a060208201526000612ccb60a08301876123c0565b6001600160401b03861660408401528281036060840152612cec81866123c0565b90508281036080840152612a0581856123c056fea264697066735822122026d37d6d6a3a14102000d267854dc055fac27a8ea3c87c2b01f711fcd1c86d4664736f6c634300080c0033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "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." + }, + "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": 4047, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 15104, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "trustedRemoteLookup", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint16,t_bytes_storage)" + }, + { + "astId": 15110, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "minDstGasLookup", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))" + }, + { + "astId": 15114, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "payloadSizeLimitLookup", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 15116, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "precrime", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 15653, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "failedMessages", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" + }, + { + "astId": 13713, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "dstGas", + "offset": 0, + "slot": "6", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bytes32))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bytes32)" + }, + "t_mapping(t_uint16,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))" + }, + "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(uint16 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint16,t_uint256)" + }, + "t_mapping(t_uint16,t_uint256)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint64,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/packages/verify-contract/test/__data__/deployments/fuji/LayerZeroExampleERC1155.json b/packages/verify-contract/test/__data__/deployments/fuji/LayerZeroExampleERC1155.json new file mode 100644 index 000000000..5a32ae856 --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/fuji/LayerZeroExampleERC1155.json @@ -0,0 +1,594 @@ +{ + "address": "0xFc13c28024Ac57B0FbfF311FccFF2dA452B7Ff26", + "abi": [ + { + "inputs": [], + "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": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "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" + }, + { + "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": [ + { + "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": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "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": "mintBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "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": [ + { + "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": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x007ee8c987f155123f0a6a9af73044bb3a43b6f9f552e7dbb2a61a6f593226fe", + "receipt": { + "to": null, + "from": "0x28921b09dB1C7add63265e5ec79B008F0851D5DC", + "contractAddress": "0xFc13c28024Ac57B0FbfF311FccFF2dA452B7Ff26", + "transactionIndex": 4, + "gasUsed": "1786087", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000020000000000080000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000400000000000000040000000000", + "blockHash": "0x54403daddad3e00529cb0b415548e7dc4517157e90f1d9b3486014d8a7a52c6f", + "transactionHash": "0x007ee8c987f155123f0a6a9af73044bb3a43b6f9f552e7dbb2a61a6f593226fe", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 22247185, + "transactionHash": "0x007ee8c987f155123f0a6a9af73044bb3a43b6f9f552e7dbb2a61a6f593226fe", + "address": "0xFc13c28024Ac57B0FbfF311FccFF2dA452B7Ff26", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000028921b09db1c7add63265e5ec79b008f0851d5dc" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x54403daddad3e00529cb0b415548e7dc4517157e90f1d9b3486014d8a7a52c6f" + } + ], + "blockNumber": 22247185, + "cumulativeGasUsed": "2142004", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "339d1b9f3fa1541abe678a39e0d52515", + "metadata": "{\"compiler\":{\"version\":\"0.8.12+commit.f00d7308\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"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\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"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\"},{\"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\":[{\"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\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"mintBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"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\":[{\"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\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"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.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"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}.\"},\"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/examples/LayerZeroExampleERC1155.sol\":\"LayerZeroExampleERC1155\"},\"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/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/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/Base64.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides a set of functions to operate with Base64 strings.\\n *\\n * _Available since v4.5._\\n */\\nlibrary Base64 {\\n /**\\n * @dev Base64 Encoding/Decoding Table\\n */\\n string internal constant _TABLE = \\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\";\\n\\n /**\\n * @dev Converts a `bytes` to its Bytes64 `string` representation.\\n */\\n function encode(bytes memory data) internal pure returns (string memory) {\\n /**\\n * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\\n * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol\\n */\\n if (data.length == 0) return \\\"\\\";\\n\\n // Loads the table into memory\\n string memory table = _TABLE;\\n\\n // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter\\n // and split into 4 numbers of 6 bits.\\n // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up\\n // - `data.length + 2` -> Round up\\n // - `/ 3` -> Number of 3-bytes chunks\\n // - `4 *` -> 4 characters for each chunk\\n string memory result = new string(4 * ((data.length + 2) / 3));\\n\\n /// @solidity memory-safe-assembly\\n assembly {\\n // Prepare the lookup table (skip the first \\\"length\\\" byte)\\n let tablePtr := add(table, 1)\\n\\n // Prepare result pointer, jump over length\\n let resultPtr := add(result, 32)\\n\\n // Run over the input, 3 bytes at a time\\n for {\\n let dataPtr := data\\n let endPtr := add(data, mload(data))\\n } lt(dataPtr, endPtr) {\\n\\n } {\\n // Advance 3 bytes\\n dataPtr := add(dataPtr, 3)\\n let input := mload(dataPtr)\\n\\n // To write each character, shift the 3 bytes (18 bits) chunk\\n // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)\\n // and apply logical AND with 0x3F which is the number of\\n // the previous character in the ASCII table prior to the Base64 Table\\n // The result is then added to the table to get the character to write,\\n // and finally write it in the result pointer but with a left shift\\n // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits\\n\\n mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))\\n resultPtr := add(resultPtr, 1) // Advance\\n\\n mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))\\n resultPtr := add(resultPtr, 1) // Advance\\n\\n mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))\\n resultPtr := add(resultPtr, 1) // Advance\\n\\n mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))\\n resultPtr := add(resultPtr, 1) // Advance\\n }\\n\\n // When data `bytes` is not exactly 3 bytes long\\n // it is padded with `=` characters at the end\\n switch mod(mload(data), 3)\\n case 1 {\\n mstore8(sub(resultPtr, 1), 0x3d)\\n mstore8(sub(resultPtr, 2), 0x3d)\\n }\\n case 2 {\\n mstore8(sub(resultPtr, 1), 0x3d)\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x5f3461639fe20794cfb4db4a6d8477388a15b2e70a018043084b7c4bedfa8136\",\"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/examples/LayerZeroExampleERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.9;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Base64.sol\\\";\\n\\ncontract LayerZeroExampleERC1155 is ERC1155, Ownable {\\n using Strings for uint256;\\n\\n constructor() ERC1155(\\\"LZ1155\\\") {}\\n\\n function mint(address account, uint256 id, uint256 amount, bytes memory data)\\n public\\n {\\n _mint(account, id, amount, data);\\n }\\n\\n function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)\\n public\\n {\\n _mintBatch(to, ids, amounts, data);\\n }\\n\\n function uri(uint256 id) public view override returns (string memory) {\\n uint256 color = id % 256;\\n string memory colorString = Strings.toString(color);\\n\\n string memory rawSvg = Base64.encode(\\n bytes(\\n string(\\n abi.encodePacked(\\n '',\\n '',\\n ''\\n )\\n )\\n )\\n );\\n\\n string memory base64Svg = string(\\n abi.encodePacked('data:image/svg+xml;base64,', rawSvg)\\n );\\n\\n string memory rawJson = Base64.encode(\\n bytes(\\n string(\\n abi.encodePacked(\\n '{\\\"name\\\": \\\"LayerZero Example ERC1155 #',\\n Strings.toString(id),\\n '\\\", \\\"description\\\": \\\"An example ERC1155 token\\\", \\\"image\\\": \\\"',\\n base64Svg,\\n '\\\"}'\\n )\\n )\\n )\\n );\\n\\n string memory base64Json = string(abi.encodePacked('data:application/json;base64,', rawJson));\\n\\n return base64Json;\\n }\\n}\",\"keccak256\":\"0x3cf44ecce95ecfd0578ad57b3b42b5386bb77a9a628765400fb2aef5c6289d49\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b506040805180820190915260068152654c5a3131353560d01b60208201526200003a816200004c565b50620000463362000065565b6200019a565b805162000061906002906020840190620000b7565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000c5906200015d565b90600052602060002090601f016020900481019282620000e9576000855562000134565b82601f106200010457805160ff191683800117855562000134565b8280016001018555821562000134579182015b828111156200013457825182559160200191906001019062000117565b506200014292915062000146565b5090565b5b8082111562000142576000815560010162000147565b600181811c908216806200017257607f821691505b602082108114156200019457634e487b7160e01b600052602260045260246000fd5b50919050565b611e6680620001aa6000396000f3fe608060405234801561001057600080fd5b50600436106100ce5760003560e01c8063715018a61161008c578063a22cb46511610066578063a22cb465146101ba578063e985e9c5146101cd578063f242432a14610209578063f2fde38b1461021c57600080fd5b8063715018a614610184578063731133e91461018c5780638da5cb5b1461019f57600080fd5b8062fdd58e146100d357806301ffc9a7146100f95780630e89341c1461011c5780631f7fdffa1461013c5780632eb2c2d6146101515780634e1273f414610164575b600080fd5b6100e66100e13660046111a0565b61022f565b6040519081526020015b60405180910390f35b61010c6101073660046111e0565b6102c5565b60405190151581526020016100f0565b61012f61012a366004611204565b610317565b6040516100f09190611275565b61014f61014a3660046113d4565b6103db565b005b61014f61015f36600461146d565b6103ed565b610177610172366004611517565b610439565b6040516100f0919061161d565b61014f610563565b61014f61019a366004611630565b610577565b6003546040516001600160a01b0390911681526020016100f0565b61014f6101c8366004611685565b610583565b61010c6101db3660046116c1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61014f6102173660046116f4565b610592565b61014f61022a366004611759565b6105d7565b60006001600160a01b03831661029f5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b14806102f657506001600160e01b031982166303a24d0760e21b145b8061031157506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060006103276101008461178a565b9050600061033482610650565b905060006103648283846040516020016103509392919061179e565b604051602081830303815290604052610756565b905060008160405160200161037991906118b6565b604051602081830303815290604052905060006103aa61039888610650565b836040516020016103509291906118fb565b90506000816040516020016103bf91906119bf565b60408051601f1981840301815291905298975050505050505050565b6103e7848484846108aa565b50505050565b6001600160a01b038516331480610409575061040985336101db565b6104255760405162461bcd60e51b815260040161029690611a04565b61043285858585856109f5565b5050505050565b6060815183511461049e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610296565b6000835167ffffffffffffffff8111156104ba576104ba611288565b6040519080825280602002602001820160405280156104e3578160200160208202803683370190505b50905060005b845181101561055b5761052e85828151811061050757610507611a53565b602002602001015185838151811061052157610521611a53565b602002602001015161022f565b82828151811061054057610540611a53565b602090810291909101015261055481611a7f565b90506104e9565b509392505050565b61056b610b91565b6105756000610beb565b565b6103e784848484610c3d565b61058e338383610d17565b5050565b6001600160a01b0385163314806105ae57506105ae85336101db565b6105ca5760405162461bcd60e51b815260040161029690611a04565b6104328585858585610df8565b6105df610b91565b6001600160a01b0381166106445760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610296565b61064d81610beb565b50565b6060816106745750506040805180820190915260018152600360fc1b602082015290565b8160005b811561069e578061068881611a7f565b91506106979050600a83611a9a565b9150610678565b60008167ffffffffffffffff8111156106b9576106b9611288565b6040519080825280601f01601f1916602001820160405280156106e3576020820181803683370190505b5090505b841561074e576106f8600183611aae565b9150610705600a8661178a565b610710906030611ac5565b60f81b81838151811061072557610725611a53565b60200101906001600160f81b031916908160001a905350610747600a86611a9a565b94506106e7565b949350505050565b606081516000141561077657505060408051602081019091526000815290565b6000604051806060016040528060408152602001611df160409139905060006003845160026107a59190611ac5565b6107af9190611a9a565b6107ba906004611add565b67ffffffffffffffff8111156107d2576107d2611288565b6040519080825280601f01601f1916602001820160405280156107fc576020820181803683370190505b509050600182016020820185865187015b80821015610868576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f811685015184535060018301925061080d565b505060038651066001811461088457600281146108975761089f565b603d6001830353603d600283035361089f565b603d60018303535b509195945050505050565b6001600160a01b0384166108d05760405162461bcd60e51b815260040161029690611afc565b81518351146108f15760405162461bcd60e51b815260040161029690611b3d565b3360005b845181101561098d5783818151811061091057610910611a53565b602002602001015160008087848151811061092d5761092d611a53565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546109759190611ac5565b9091555081905061098581611a7f565b9150506108f5565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516109de929190611b85565b60405180910390a461043281600087878787610f22565b8151835114610a165760405162461bcd60e51b815260040161029690611b3d565b6001600160a01b038416610a3c5760405162461bcd60e51b815260040161029690611bb3565b3360005b8451811015610b23576000858281518110610a5d57610a5d611a53565b602002602001015190506000858381518110610a7b57610a7b611a53565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610acb5760405162461bcd60e51b815260040161029690611bf8565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b08908490611ac5565b9250508190555050505080610b1c90611a7f565b9050610a40565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b73929190611b85565b60405180910390a4610b89818787878787610f22565b505050505050565b6003546001600160a01b031633146105755760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610296565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416610c635760405162461bcd60e51b815260040161029690611afc565b336000610c6f8561107e565b90506000610c7c8561107e565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290610cae908490611ac5565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610d0e836000898989896110c9565b50505050505050565b816001600160a01b0316836001600160a01b03161415610d8b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610296565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610e1e5760405162461bcd60e51b815260040161029690611bb3565b336000610e2a8561107e565b90506000610e378561107e565b90506000868152602081815260408083206001600160a01b038c16845290915290205485811015610e7a5760405162461bcd60e51b815260040161029690611bf8565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290610eb7908490611ac5565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610f17848a8a8a8a8a6110c9565b505050505050505050565b6001600160a01b0384163b15610b895760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610f669089908990889088908890600401611c42565b6020604051808303816000875af1925050508015610fa1575060408051601f3d908101601f19168201909252610f9e91810190611ca0565b60015b61104e57610fad611cbd565b806308c379a01415610fe75750610fc2611cd9565b80610fcd5750610fe9565b8060405162461bcd60e51b81526004016102969190611275565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610296565b6001600160e01b0319811663bc197c8160e01b14610d0e5760405162461bcd60e51b815260040161029690611d63565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106110b8576110b8611a53565b602090810291909101015292915050565b6001600160a01b0384163b15610b895760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061110d9089908990889088908890600401611dab565b6020604051808303816000875af1925050508015611148575060408051601f3d908101601f1916820190925261114591810190611ca0565b60015b61115457610fad611cbd565b6001600160e01b0319811663f23a6e6160e01b14610d0e5760405162461bcd60e51b815260040161029690611d63565b80356001600160a01b038116811461119b57600080fd5b919050565b600080604083850312156111b357600080fd5b6111bc83611184565b946020939093013593505050565b6001600160e01b03198116811461064d57600080fd5b6000602082840312156111f257600080fd5b81356111fd816111ca565b9392505050565b60006020828403121561121657600080fd5b5035919050565b60005b83811015611238578181015183820152602001611220565b838111156103e75750506000910152565b6000815180845261126181602086016020860161121d565b601f01601f19169290920160200192915050565b6020815260006111fd6020830184611249565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156112c4576112c4611288565b6040525050565b600067ffffffffffffffff8211156112e5576112e5611288565b5060051b60200190565b600082601f83011261130057600080fd5b8135602061130d826112cb565b60405161131a828261129e565b83815260059390931b850182019282810191508684111561133a57600080fd5b8286015b84811015611355578035835291830191830161133e565b509695505050505050565b600082601f83011261137157600080fd5b813567ffffffffffffffff81111561138b5761138b611288565b6040516113a2601f8301601f19166020018261129e565b8181528460208386010111156113b757600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156113ea57600080fd5b6113f385611184565b9350602085013567ffffffffffffffff8082111561141057600080fd5b61141c888389016112ef565b9450604087013591508082111561143257600080fd5b61143e888389016112ef565b9350606087013591508082111561145457600080fd5b5061146187828801611360565b91505092959194509250565b600080600080600060a0868803121561148557600080fd5b61148e86611184565b945061149c60208701611184565b9350604086013567ffffffffffffffff808211156114b957600080fd5b6114c589838a016112ef565b945060608801359150808211156114db57600080fd5b6114e789838a016112ef565b935060808801359150808211156114fd57600080fd5b5061150a88828901611360565b9150509295509295909350565b6000806040838503121561152a57600080fd5b823567ffffffffffffffff8082111561154257600080fd5b818501915085601f83011261155657600080fd5b81356020611563826112cb565b604051611570828261129e565b83815260059390931b850182019282810191508984111561159057600080fd5b948201945b838610156115b5576115a686611184565b82529482019490820190611595565b965050860135925050808211156115cb57600080fd5b506115d8858286016112ef565b9150509250929050565b600081518084526020808501945080840160005b83811015611612578151875295820195908201906001016115f6565b509495945050505050565b6020815260006111fd60208301846115e2565b6000806000806080858703121561164657600080fd5b61164f85611184565b93506020850135925060408501359150606085013567ffffffffffffffff81111561167957600080fd5b61146187828801611360565b6000806040838503121561169857600080fd5b6116a183611184565b9150602083013580151581146116b657600080fd5b809150509250929050565b600080604083850312156116d457600080fd5b6116dd83611184565b91506116eb60208401611184565b90509250929050565b600080600080600060a0868803121561170c57600080fd5b61171586611184565b945061172360208701611184565b93506040860135925060608601359150608086013567ffffffffffffffff81111561174d57600080fd5b61150a88828901611360565b60006020828403121561176b57600080fd5b6111fd82611184565b634e487b7160e01b600052601260045260246000fd5b60008261179957611799611774565b500690565b7f3c7376672076696577426f783d2230203020312031222076657273696f6e3d2281527f312e312220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f3230602082015267181817b9bb33911f60c11b60408201527f3c726563742077696474683d223122206865696768743d223122207374796c6560488201526a07a44ccd2d8d874e4cec4560ab1b60688201526000845161184781607385016020890161121d565b8083019050600b60fa1b806073830152855161186a816074850160208a0161121d565b6074920191820152835161188581607584016020880161121d565b65149d9110179f60d11b91016075810191909152651e17b9bb339f60d11b607b820152608181019695505050505050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000008152600082516118ee81601a85016020870161121d565b91909101601a0192915050565b7f7b226e616d65223a20224c617965725a65726f204578616d706c652045524331815264313535202360d81b60208201526000835161194181602585016020880161121d565b7f222c20226465736372697074696f6e223a2022416e206578616d706c652045526025918401918201527f433131353520746f6b656e222c2022696d616765223a20220000000000000000604582015283516119a481605d84016020880161121d565b61227d60f01b605d9290910191820152605f01949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516119f781601d85016020870161121d565b91909101601d0192915050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611a9357611a93611a69565b5060010190565b600082611aa957611aa9611774565b500490565b600082821015611ac057611ac0611a69565b500390565b60008219821115611ad857611ad8611a69565b500190565b6000816000190483118215151615611af757611af7611a69565b500290565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b604081526000611b9860408301856115e2565b8281036020840152611baa81856115e2565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b0386811682528516602082015260a060408201819052600090611c6e908301866115e2565b8281036060840152611c8081866115e2565b90508281036080840152611c948185611249565b98975050505050505050565b600060208284031215611cb257600080fd5b81516111fd816111ca565b600060033d1115611cd65760046000803e5060005160e01c5b90565b600060443d1015611ce75790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611d1757505050505090565b8285019150815181811115611d2f5750505050505090565b843d8701016020828501011115611d495750505050505090565b611d586020828601018761129e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611de590830184611249565b97965050505050505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212205c40f2fea1e1599311dfe4647da50b26d47c49a870d8dad38501914e94f924b764736f6c634300080c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ce5760003560e01c8063715018a61161008c578063a22cb46511610066578063a22cb465146101ba578063e985e9c5146101cd578063f242432a14610209578063f2fde38b1461021c57600080fd5b8063715018a614610184578063731133e91461018c5780638da5cb5b1461019f57600080fd5b8062fdd58e146100d357806301ffc9a7146100f95780630e89341c1461011c5780631f7fdffa1461013c5780632eb2c2d6146101515780634e1273f414610164575b600080fd5b6100e66100e13660046111a0565b61022f565b6040519081526020015b60405180910390f35b61010c6101073660046111e0565b6102c5565b60405190151581526020016100f0565b61012f61012a366004611204565b610317565b6040516100f09190611275565b61014f61014a3660046113d4565b6103db565b005b61014f61015f36600461146d565b6103ed565b610177610172366004611517565b610439565b6040516100f0919061161d565b61014f610563565b61014f61019a366004611630565b610577565b6003546040516001600160a01b0390911681526020016100f0565b61014f6101c8366004611685565b610583565b61010c6101db3660046116c1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61014f6102173660046116f4565b610592565b61014f61022a366004611759565b6105d7565b60006001600160a01b03831661029f5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b14806102f657506001600160e01b031982166303a24d0760e21b145b8061031157506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060006103276101008461178a565b9050600061033482610650565b905060006103648283846040516020016103509392919061179e565b604051602081830303815290604052610756565b905060008160405160200161037991906118b6565b604051602081830303815290604052905060006103aa61039888610650565b836040516020016103509291906118fb565b90506000816040516020016103bf91906119bf565b60408051601f1981840301815291905298975050505050505050565b6103e7848484846108aa565b50505050565b6001600160a01b038516331480610409575061040985336101db565b6104255760405162461bcd60e51b815260040161029690611a04565b61043285858585856109f5565b5050505050565b6060815183511461049e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610296565b6000835167ffffffffffffffff8111156104ba576104ba611288565b6040519080825280602002602001820160405280156104e3578160200160208202803683370190505b50905060005b845181101561055b5761052e85828151811061050757610507611a53565b602002602001015185838151811061052157610521611a53565b602002602001015161022f565b82828151811061054057610540611a53565b602090810291909101015261055481611a7f565b90506104e9565b509392505050565b61056b610b91565b6105756000610beb565b565b6103e784848484610c3d565b61058e338383610d17565b5050565b6001600160a01b0385163314806105ae57506105ae85336101db565b6105ca5760405162461bcd60e51b815260040161029690611a04565b6104328585858585610df8565b6105df610b91565b6001600160a01b0381166106445760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610296565b61064d81610beb565b50565b6060816106745750506040805180820190915260018152600360fc1b602082015290565b8160005b811561069e578061068881611a7f565b91506106979050600a83611a9a565b9150610678565b60008167ffffffffffffffff8111156106b9576106b9611288565b6040519080825280601f01601f1916602001820160405280156106e3576020820181803683370190505b5090505b841561074e576106f8600183611aae565b9150610705600a8661178a565b610710906030611ac5565b60f81b81838151811061072557610725611a53565b60200101906001600160f81b031916908160001a905350610747600a86611a9a565b94506106e7565b949350505050565b606081516000141561077657505060408051602081019091526000815290565b6000604051806060016040528060408152602001611df160409139905060006003845160026107a59190611ac5565b6107af9190611a9a565b6107ba906004611add565b67ffffffffffffffff8111156107d2576107d2611288565b6040519080825280601f01601f1916602001820160405280156107fc576020820181803683370190505b509050600182016020820185865187015b80821015610868576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f811685015184535060018301925061080d565b505060038651066001811461088457600281146108975761089f565b603d6001830353603d600283035361089f565b603d60018303535b509195945050505050565b6001600160a01b0384166108d05760405162461bcd60e51b815260040161029690611afc565b81518351146108f15760405162461bcd60e51b815260040161029690611b3d565b3360005b845181101561098d5783818151811061091057610910611a53565b602002602001015160008087848151811061092d5761092d611a53565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546109759190611ac5565b9091555081905061098581611a7f565b9150506108f5565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516109de929190611b85565b60405180910390a461043281600087878787610f22565b8151835114610a165760405162461bcd60e51b815260040161029690611b3d565b6001600160a01b038416610a3c5760405162461bcd60e51b815260040161029690611bb3565b3360005b8451811015610b23576000858281518110610a5d57610a5d611a53565b602002602001015190506000858381518110610a7b57610a7b611a53565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610acb5760405162461bcd60e51b815260040161029690611bf8565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b08908490611ac5565b9250508190555050505080610b1c90611a7f565b9050610a40565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b73929190611b85565b60405180910390a4610b89818787878787610f22565b505050505050565b6003546001600160a01b031633146105755760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610296565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416610c635760405162461bcd60e51b815260040161029690611afc565b336000610c6f8561107e565b90506000610c7c8561107e565b90506000868152602081815260408083206001600160a01b038b16845290915281208054879290610cae908490611ac5565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610d0e836000898989896110c9565b50505050505050565b816001600160a01b0316836001600160a01b03161415610d8b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610296565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610e1e5760405162461bcd60e51b815260040161029690611bb3565b336000610e2a8561107e565b90506000610e378561107e565b90506000868152602081815260408083206001600160a01b038c16845290915290205485811015610e7a5760405162461bcd60e51b815260040161029690611bf8565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290610eb7908490611ac5565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610f17848a8a8a8a8a6110c9565b505050505050505050565b6001600160a01b0384163b15610b895760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610f669089908990889088908890600401611c42565b6020604051808303816000875af1925050508015610fa1575060408051601f3d908101601f19168201909252610f9e91810190611ca0565b60015b61104e57610fad611cbd565b806308c379a01415610fe75750610fc2611cd9565b80610fcd5750610fe9565b8060405162461bcd60e51b81526004016102969190611275565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610296565b6001600160e01b0319811663bc197c8160e01b14610d0e5760405162461bcd60e51b815260040161029690611d63565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106110b8576110b8611a53565b602090810291909101015292915050565b6001600160a01b0384163b15610b895760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061110d9089908990889088908890600401611dab565b6020604051808303816000875af1925050508015611148575060408051601f3d908101601f1916820190925261114591810190611ca0565b60015b61115457610fad611cbd565b6001600160e01b0319811663f23a6e6160e01b14610d0e5760405162461bcd60e51b815260040161029690611d63565b80356001600160a01b038116811461119b57600080fd5b919050565b600080604083850312156111b357600080fd5b6111bc83611184565b946020939093013593505050565b6001600160e01b03198116811461064d57600080fd5b6000602082840312156111f257600080fd5b81356111fd816111ca565b9392505050565b60006020828403121561121657600080fd5b5035919050565b60005b83811015611238578181015183820152602001611220565b838111156103e75750506000910152565b6000815180845261126181602086016020860161121d565b601f01601f19169290920160200192915050565b6020815260006111fd6020830184611249565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff811182821017156112c4576112c4611288565b6040525050565b600067ffffffffffffffff8211156112e5576112e5611288565b5060051b60200190565b600082601f83011261130057600080fd5b8135602061130d826112cb565b60405161131a828261129e565b83815260059390931b850182019282810191508684111561133a57600080fd5b8286015b84811015611355578035835291830191830161133e565b509695505050505050565b600082601f83011261137157600080fd5b813567ffffffffffffffff81111561138b5761138b611288565b6040516113a2601f8301601f19166020018261129e565b8181528460208386010111156113b757600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080608085870312156113ea57600080fd5b6113f385611184565b9350602085013567ffffffffffffffff8082111561141057600080fd5b61141c888389016112ef565b9450604087013591508082111561143257600080fd5b61143e888389016112ef565b9350606087013591508082111561145457600080fd5b5061146187828801611360565b91505092959194509250565b600080600080600060a0868803121561148557600080fd5b61148e86611184565b945061149c60208701611184565b9350604086013567ffffffffffffffff808211156114b957600080fd5b6114c589838a016112ef565b945060608801359150808211156114db57600080fd5b6114e789838a016112ef565b935060808801359150808211156114fd57600080fd5b5061150a88828901611360565b9150509295509295909350565b6000806040838503121561152a57600080fd5b823567ffffffffffffffff8082111561154257600080fd5b818501915085601f83011261155657600080fd5b81356020611563826112cb565b604051611570828261129e565b83815260059390931b850182019282810191508984111561159057600080fd5b948201945b838610156115b5576115a686611184565b82529482019490820190611595565b965050860135925050808211156115cb57600080fd5b506115d8858286016112ef565b9150509250929050565b600081518084526020808501945080840160005b83811015611612578151875295820195908201906001016115f6565b509495945050505050565b6020815260006111fd60208301846115e2565b6000806000806080858703121561164657600080fd5b61164f85611184565b93506020850135925060408501359150606085013567ffffffffffffffff81111561167957600080fd5b61146187828801611360565b6000806040838503121561169857600080fd5b6116a183611184565b9150602083013580151581146116b657600080fd5b809150509250929050565b600080604083850312156116d457600080fd5b6116dd83611184565b91506116eb60208401611184565b90509250929050565b600080600080600060a0868803121561170c57600080fd5b61171586611184565b945061172360208701611184565b93506040860135925060608601359150608086013567ffffffffffffffff81111561174d57600080fd5b61150a88828901611360565b60006020828403121561176b57600080fd5b6111fd82611184565b634e487b7160e01b600052601260045260246000fd5b60008261179957611799611774565b500690565b7f3c7376672076696577426f783d2230203020312031222076657273696f6e3d2281527f312e312220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f3230602082015267181817b9bb33911f60c11b60408201527f3c726563742077696474683d223122206865696768743d223122207374796c6560488201526a07a44ccd2d8d874e4cec4560ab1b60688201526000845161184781607385016020890161121d565b8083019050600b60fa1b806073830152855161186a816074850160208a0161121d565b6074920191820152835161188581607584016020880161121d565b65149d9110179f60d11b91016075810191909152651e17b9bb339f60d11b607b820152608181019695505050505050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000008152600082516118ee81601a85016020870161121d565b91909101601a0192915050565b7f7b226e616d65223a20224c617965725a65726f204578616d706c652045524331815264313535202360d81b60208201526000835161194181602585016020880161121d565b7f222c20226465736372697074696f6e223a2022416e206578616d706c652045526025918401918201527f433131353520746f6b656e222c2022696d616765223a20220000000000000000604582015283516119a481605d84016020880161121d565b61227d60f01b605d9290910191820152605f01949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516119f781601d85016020870161121d565b91909101601d0192915050565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611a9357611a93611a69565b5060010190565b600082611aa957611aa9611774565b500490565b600082821015611ac057611ac0611a69565b500390565b60008219821115611ad857611ad8611a69565b500190565b6000816000190483118215151615611af757611af7611a69565b500290565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b604081526000611b9860408301856115e2565b8281036020840152611baa81856115e2565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b0386811682528516602082015260a060408201819052600090611c6e908301866115e2565b8281036060840152611c8081866115e2565b90508281036080840152611c948185611249565b98975050505050505050565b600060208284031215611cb257600080fd5b81516111fd816111ca565b600060033d1115611cd65760046000803e5060005160e01c5b90565b600060443d1015611ce75790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611d1757505050505090565b8285019150815181811115611d2f5750505050505090565b843d8701016020828501011115611d495750505050505090565b611d586020828601018761129e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611de590830184611249565b97965050505050505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212205c40f2fea1e1599311dfe4647da50b26d47c49a870d8dad38501914e94f924b764736f6c634300080c0033", + "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." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC1155-isApprovedForAll}." + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "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}." + }, + "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": 4326, + "contract": "contracts/examples/LayerZeroExampleERC1155.sol:LayerZeroExampleERC1155", + "label": "_balances", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))" + }, + { + "astId": 4332, + "contract": "contracts/examples/LayerZeroExampleERC1155.sol:LayerZeroExampleERC1155", + "label": "_operatorApprovals", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 4334, + "contract": "contracts/examples/LayerZeroExampleERC1155.sol:LayerZeroExampleERC1155", + "label": "_uri", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 4047, + "contract": "contracts/examples/LayerZeroExampleERC1155.sol:LayerZeroExampleERC1155", + "label": "_owner", + "offset": 0, + "slot": "3", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "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_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_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} diff --git a/packages/verify-contract/test/__data__/deployments/fuji/OmniCounter.json b/packages/verify-contract/test/__data__/deployments/fuji/OmniCounter.json new file mode 100644 index 000000000..037ba2999 --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/fuji/OmniCounter.json @@ -0,0 +1,914 @@ +{ + "address": "0xC856bb89D7388Fc17baa2C5bC18Cfd23E71D7087", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_lzEndpoint", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "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": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "inputs": [], + "name": "PAYLOAD", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "counter", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "remoteChainId", + "type": "uint16" + } + ], + "name": "getOracle", + "outputs": [ + { + "internalType": "address", + "name": "_oracle", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + } + ], + "name": "incrementCounter", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "dstChainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "oracle", + "type": "address" + } + ], + "name": "setOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x2bf1500d7f22d7b1cf1c689f1d80c1e919a3eadf9b397b322544838fda00c26d", + "receipt": { + "to": null, + "from": "0x28921b09dB1C7add63265e5ec79B008F0851D5DC", + "contractAddress": "0xC856bb89D7388Fc17baa2C5bC18Cfd23E71D7087", + "transactionIndex": 0, + "gasUsed": "2105637", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000101000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000400000000000000040000000000", + "blockHash": "0xcd3ef5949a1a3f3de7d4c82443646ad42f9ecfbb9309c9de4183c2012b2956b7", + "transactionHash": "0x2bf1500d7f22d7b1cf1c689f1d80c1e919a3eadf9b397b322544838fda00c26d", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 18732073, + "transactionHash": "0x2bf1500d7f22d7b1cf1c689f1d80c1e919a3eadf9b397b322544838fda00c26d", + "address": "0xC856bb89D7388Fc17baa2C5bC18Cfd23E71D7087", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000028921b09db1c7add63265e5ec79b008f0851d5dc" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xcd3ef5949a1a3f3de7d4c82443646ad42f9ecfbb9309c9de4183c2012b2956b7" + } + ], + "blockNumber": 18732073, + "cumulativeGasUsed": "2105637", + "status": 1, + "byzantium": true + }, + "args": ["0x93f54D755A063cE7bB9e6Ac47Eccc8e33411d706"], + "numDeployments": 1, + "solcInputHash": "90b41211ea546a5df0a303f04a038b52", + "metadata": "{\"compiler\":{\"version\":\"0.8.12+commit.f00d7308\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_lzEndpoint\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"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\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"PAYLOAD\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"counter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"_oracle\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"}],\"name\":\"incrementCounter\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"oracle\",\"type\":\"address\"}],\"name\":\"setOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"A LayerZero example sending a cross chain message from a source chain to a destination chain to increment a counter\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/examples/OmniCounter.sol\":\"OmniCounter\"},\"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/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\"},\"contracts/examples/OmniCounter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\npragma abicoder v2;\\n\\nimport \\\"../lzApp/NonblockingLzApp.sol\\\";\\n\\n/// @title A LayerZero example sending a cross chain message from a source chain to a destination chain to increment a counter\\ncontract OmniCounter is NonblockingLzApp {\\n bytes public constant PAYLOAD = \\\"\\\\x01\\\\x02\\\\x03\\\\x04\\\";\\n uint public counter;\\n\\n constructor(address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {}\\n\\n function _nonblockingLzReceive(uint16, bytes memory, uint64, bytes memory) internal override {\\n counter += 1;\\n }\\n\\n function estimateFee(uint16 _dstChainId, bool _useZro, bytes calldata _adapterParams) public view returns (uint nativeFee, uint zroFee) {\\n return lzEndpoint.estimateFees(_dstChainId, address(this), PAYLOAD, _useZro, _adapterParams);\\n }\\n\\n function incrementCounter(uint16 _dstChainId) public payable {\\n _lzSend(_dstChainId, PAYLOAD, payable(msg.sender), address(0x0), bytes(\\\"\\\"), msg.value);\\n }\\n\\n function setOracle(uint16 dstChainId, address oracle) external onlyOwner {\\n uint TYPE_ORACLE = 6;\\n // set the Oracle\\n lzEndpoint.setConfig(lzEndpoint.getSendVersion(address(this)), dstChainId, TYPE_ORACLE, abi.encode(oracle));\\n }\\n\\n function getOracle(uint16 remoteChainId) external view returns (address _oracle) {\\n bytes memory bytesOracle = lzEndpoint.getConfig(lzEndpoint.getSendVersion(address(this)), remoteChainId, address(this), 6);\\n assembly {\\n _oracle := mload(add(bytesOracle, 32))\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc07615127c23de0aba9fd16e7ff483c2c902cf010995cca94f1eda3079ed0a87\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xe9617a9f6db351b6ac4c9d5b1097798af59ad7f813e370e8cf69bb44addd8548\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0x909bf72002c91806f39a64172c12b4188219e8649deefbe8d862604d4f9d3faf\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xe3e50134e39aa3c0f916447d36367970c6e4df972d488b794227e0b052ce80d5\",\"license\":\"MIT\"},\"contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"../interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"../interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../util/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(_srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote), \\\"LzApp: invalid source sending contract\\\");\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams, uint _nativeFee) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(uint16 _dstChainId, uint16 _type, bytes memory _adapterParams, uint _extraGas) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type] + _extraGas;\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(uint16 _version, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _srcChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_srcChainId] = _path;\\n emit SetTrustedRemote(_srcChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(uint16 _dstChainId, uint16 _packetType, uint _minGas) external onlyOwner {\\n require(_minGas > 0, \\\"LzApp: invalid minGas\\\");\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0x9f057e6b7c9006828f7711122743dd068225d3d331989a6660a8f964b5977a1e\",\"license\":\"MIT\"},\"contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../util/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft(), 150, abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload));\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload, bytes memory _reason) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function retryMessage(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x2afd4980a5850f45f2c4d7ec44d77b292a51b80f847566479548f89572065311\",\"license\":\"MIT\"},\"contracts/util/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\n\\nlibrary BytesLib {\\n function concat(\\n bytes memory _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1 , \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(\\n bytes storage _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n view\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x2255aadad70e87ed42b158776330175644b07fbbc7e77ed32cd6330974abbcee\",\"license\":\"Unlicense\"},\"contracts/util/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint256 constant LOW_28_MASK =\\n 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf)\\n internal\\n pure\\n {\\n require(_buf.length >= 4);\\n uint256 _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x23942250ddd277c443fa27c6b4ab51e6b3b5e654548b6b9e8d785a88ebec4dfe\",\"license\":\"MIT OR Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b50604051620025e9380380620025e98339810160408190526200003491620000a6565b8080620000413362000056565b6001600160a01b031660805250620000d89050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000b957600080fd5b81516001600160a01b0381168114620000d157600080fd5b9392505050565b6080516124af6200013a60003960008181610489015281816105d601528181610825015281816108ae015281816109d001528181610a5701528181610f03015281816111c4015281816113200152818161151b01526117fb01526124af6000f3fe6080604052600436106101b65760003560e01c8063950c8a74116100ec578063d1deba1f1161008a578063e2f2882411610064578063e2f2882414610553578063eb8d72b714610573578063f2fde38b14610593578063f5ecbdbc146105b357600080fd5b8063d1deba1f146104eb578063d46fb188146104fe578063df2a5b3b1461053357600080fd5b8063a6c3d165116100c6578063a6c3d16514610457578063b353aaa714610477578063baf3292d146104ab578063cbed8b9c146104cb57600080fd5b8063950c8a74146104045780639917565c146104245780639f38369a1461043757600080fd5b80635b8c41e611610159578063715018a611610133578063715018a6146103655780637533d7881461037a5780638cfd8f5c1461039a5780638da5cb5b146103d257600080fd5b80635b8c41e6146102d257806361bc221a1461032f57806366ad5c8a1461034557600080fd5b8063268e878d11610195578063268e878d1461021d5780633d8b38f61461026257806342d65a8d14610292578063492e527e146102b257600080fd5b80621d3567146101bb57806307e0db17146101dd57806310ddb137146101fd575b600080fd5b3480156101c757600080fd5b506101db6101d6366004611c2c565b6105d3565b005b3480156101e957600080fd5b506101db6101f8366004611cc1565b610804565b34801561020957600080fd5b506101db610218366004611cc1565b61088d565b34801561022957600080fd5b5061024c604051806040016040528060048152602001624080c160e21b81525081565b6040516102599190611d3a565b60405180910390f35b34801561026e57600080fd5b5061028261027d366004611d4d565b6108e5565b6040519015158152602001610259565b34801561029e57600080fd5b506101db6102ad366004611d4d565b6109b1565b3480156102be57600080fd5b506101db6102cd366004611db8565b610a37565b3480156102de57600080fd5b506103216102ed366004611e5a565b6004602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b604051908152602001610259565b34801561033b57600080fd5b5061032160055481565b34801561035157600080fd5b506101db610360366004611c2c565b610b18565b34801561037157600080fd5b506101db610bf4565b34801561038657600080fd5b5061024c610395366004611cc1565b610c08565b3480156103a657600080fd5b506103216103b5366004611efc565b600260209081526000928352604080842090915290825290205481565b3480156103de57600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610259565b34801561041057600080fd5b506003546103ec906001600160a01b031681565b6101db610432366004611cc1565b610ca2565b34801561044357600080fd5b5061024c610452366004611cc1565b610cde565b34801561046357600080fd5b506101db610472366004611d4d565b610df5565b34801561048357600080fd5b506103ec7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b757600080fd5b506101db6104c6366004611f35565b610e88565b3480156104d757600080fd5b506101db6104e6366004611f50565b610ee4565b6101db6104f9366004611c2c565b610f79565b34801561050a57600080fd5b5061051e610519366004611fc2565b61118f565b60408051928352602083019190915201610259565b34801561053f57600080fd5b506101db61054e36600461202b565b61124c565b34801561055f57600080fd5b506103ec61056e366004611cc1565b6112fe565b34801561057f57600080fd5b506101db61058e366004611d4d565b61141a565b34801561059f57600080fd5b506101db6105ae366004611f35565b611474565b3480156105bf57600080fd5b5061024c6105ce36600461206c565b6114ea565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146106505760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461066e906120bb565b80601f016020809104026020016040519081016040528092919081815260200182805461069a906120bb565b80156106e75780601f106106bc576101008083540402835291602001916106e7565b820191906000526020600020905b8154815290600101906020018083116106ca57829003601f168201915b50505050509050805186869050148015610702575060008151115b801561072a57508051602082012060405161072090889088906120f6565b6040518091039020145b6107855760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b6064820152608401610647565b6107fb8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061159b92505050565b50505050505050565b61080c611614565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b15801561087257600080fd5b505af1158015610886573d6000803e3d6000fd5b5050505050565b610895611614565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610858565b61ffff831660009081526001602052604081208054829190610906906120bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610932906120bb565b801561097f5780601f106109545761010080835404028352916020019161097f565b820191906000526020600020905b81548152906001019060200180831161096257829003601f168201915b5050505050905083836040516109969291906120f6565b60405180910390208180519060200120149150509392505050565b6109b9611614565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610a099086908690869060040161212f565b600060405180830381600087803b158015610a2357600080fd5b505af11580156107fb573d6000803e3d6000fd5b610a3f611614565b6040516304b2b47b60e11b81523060048201526006907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cbed8b9c90829063096568f690602401602060405180830381865afa158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad2919061214d565b604080516001600160a01b038716602082015287918691016040516020818303038152906040526040518563ffffffff1660e01b8152600401610a09949392919061216a565b333014610b765760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610647565b610bec8686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061166e92505050565b505050505050565b610bfc611614565b610c06600061168c565b565b60016020526000908152604090208054610c21906120bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4d906120bb565b8015610c9a5780601f10610c6f57610100808354040283529160200191610c9a565b820191906000526020600020905b815481529060010190602001808311610c7d57829003601f168201915b505050505081565b610cdb81604051806040016040528060048152602001624080c160e21b81525033600060405180602001604052806000815250346116dc565b50565b61ffff8116600090815260016020526040812080546060929190610d01906120bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2d906120bb565b8015610d7a5780601f10610d4f57610100808354040283529160200191610d7a565b820191906000526020600020905b815481529060010190602001808311610d5d57829003601f168201915b50505050509050805160001415610dd35760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610647565b610dee600060148351610de691906121b7565b839190611877565b9392505050565b610dfd611614565b818130604051602001610e12939291906121ce565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251610e4793919290910190611aab565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051610e7b9392919061212f565b60405180910390a1505050565b610e90611614565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b610eec611614565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90610f4090889088908890889088906004016121f4565b600060405180830381600087803b158015610f5a57600080fd5b505af1158015610f6e573d6000803e3d6000fd5b505050505050505050565b61ffff86166000908152600460205260408082209051610f9c90889088906120f6565b90815260408051602092819003830190206001600160401b0387166000908152925290205490508061101c5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610647565b80838360405161102d9291906120f6565b60405180910390201461108c5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610647565b61ffff871660009081526004602052604080822090516110af90899089906120f6565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611147918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061166e92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e5878787878560405161117e95949392919061222d565b60405180910390a150505050505050565b6040805180820182526004808252624080c160e21b6020830152915163040a7bb160e41b815260009283926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016926340a7bb10926111ff928b9230928c918c918c9101612268565b6040805180830381865afa15801561121b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123f91906122be565b9150915094509492505050565b611254611614565b6000811161129c5760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b6044820152606401610647565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001610e7b565b6040516304b2b47b60e11b815230600482015260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f5ecbdbc90829063096568f690602401602060405180830381865afa15801561136f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611393919061214d565b6040516001600160e01b031960e084901b16815261ffff9182166004820152908616602482015230604482015260066064820152608401600060405180830381865afa1580156113e7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261140f91908101906122e2565b602001519392505050565b611422611614565b61ffff83166000908152600160205260409020611440908383611b2f565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051610e7b9392919061212f565b61147c611614565b6001600160a01b0381166114e15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610647565b610cdb8161168c565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561156a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261159291908101906122e2565b95945050505050565b6000806115fe5a60966366ad5c8a60e01b898989896040516024016115c3949392919061234f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190611984565b9150915081610bec57610bec8686868685611a0e565b6000546001600160a01b03163314610c065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610647565b600160056000828254611681919061238d565b909155505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61ffff8616600090815260016020526040812080546116fa906120bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611726906120bb565b80156117735780601f1061174857610100808354040283529160200191611773565b820191906000526020600020905b81548152906001019060200180831161175657829003601f168201915b505050505090508051600014156117e55760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610647565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c580310090849061183c908b9086908c908c908c908c906004016123a5565b6000604051808303818588803b15801561185557600080fd5b505af1158015611869573d6000803e3d6000fd5b505050505050505050505050565b60608161188581601f61238d565b10156118c45760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610647565b6118ce828461238d565b845110156119125760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610647565b606082158015611931576040519150600082526020820160405261197b565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561196a578051835260209283019201611952565b5050858452601f01601f1916604052505b50949350505050565b6000606060008060008661ffff166001600160401b038111156119a9576119a9611ded565b6040519080825280601f01601f1916602001820160405280156119d3576020820181803683370190505b50905060008087516020890160008d8df191503d9250868311156119f5578692505b828152826000602083013e909890975095505050505050565b8180519060200120600460008761ffff1661ffff16815260200190815260200160002085604051611a3f91906123ff565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90611a9c908790879087908790879061241b565b60405180910390a15050505050565b828054611ab7906120bb565b90600052602060002090601f016020900481019282611ad95760008555611b1f565b82601f10611af257805160ff1916838001178555611b1f565b82800160010185558215611b1f579182015b82811115611b1f578251825591602001919060010190611b04565b50611b2b929150611ba3565b5090565b828054611b3b906120bb565b90600052602060002090601f016020900481019282611b5d5760008555611b1f565b82601f10611b765782800160ff19823516178555611b1f565b82800160010185558215611b1f579182015b82811115611b1f578235825591602001919060010190611b88565b5b80821115611b2b5760008155600101611ba4565b61ffff81168114610cdb57600080fd5b60008083601f840112611bda57600080fd5b5081356001600160401b03811115611bf157600080fd5b602083019150836020828501011115611c0957600080fd5b9250929050565b80356001600160401b0381168114611c2757600080fd5b919050565b60008060008060008060808789031215611c4557600080fd5b8635611c5081611bb8565b955060208701356001600160401b0380821115611c6c57600080fd5b611c788a838b01611bc8565b9097509550859150611c8c60408a01611c10565b94506060890135915080821115611ca257600080fd5b50611caf89828a01611bc8565b979a9699509497509295939492505050565b600060208284031215611cd357600080fd5b8135610dee81611bb8565b60005b83811015611cf9578181015183820152602001611ce1565b83811115611d08576000848401525b50505050565b60008151808452611d26816020860160208601611cde565b601f01601f19169290920160200192915050565b602081526000610dee6020830184611d0e565b600080600060408486031215611d6257600080fd5b8335611d6d81611bb8565b925060208401356001600160401b03811115611d8857600080fd5b611d9486828701611bc8565b9497909650939450505050565b80356001600160a01b0381168114611c2757600080fd5b60008060408385031215611dcb57600080fd5b8235611dd681611bb8565b9150611de460208401611da1565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611e2b57611e2b611ded565b604052919050565b60006001600160401b03821115611e4c57611e4c611ded565b50601f01601f191660200190565b600080600060608486031215611e6f57600080fd5b8335611e7a81611bb8565b925060208401356001600160401b03811115611e9557600080fd5b8401601f81018613611ea657600080fd5b8035611eb9611eb482611e33565b611e03565b818152876020838501011115611ece57600080fd5b81602084016020830137600060208383010152809450505050611ef360408501611c10565b90509250925092565b60008060408385031215611f0f57600080fd5b8235611f1a81611bb8565b91506020830135611f2a81611bb8565b809150509250929050565b600060208284031215611f4757600080fd5b610dee82611da1565b600080600080600060808688031215611f6857600080fd5b8535611f7381611bb8565b94506020860135611f8381611bb8565b93506040860135925060608601356001600160401b03811115611fa557600080fd5b611fb188828901611bc8565b969995985093965092949392505050565b60008060008060608587031215611fd857600080fd5b8435611fe381611bb8565b935060208501358015158114611ff857600080fd5b925060408501356001600160401b0381111561201357600080fd5b61201f87828801611bc8565b95989497509550505050565b60008060006060848603121561204057600080fd5b833561204b81611bb8565b9250602084013561205b81611bb8565b929592945050506040919091013590565b6000806000806080858703121561208257600080fd5b843561208d81611bb8565b9350602085013561209d81611bb8565b92506120ab60408601611da1565b9396929550929360600135925050565b600181811c908216806120cf57607f821691505b602082108114156120f057634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611592604083018486612106565b60006020828403121561215f57600080fd5b8151610dee81611bb8565b600061ffff8087168352808616602084015250836040830152608060608301526121976080830184611d0e565b9695505050505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156121c9576121c96121a1565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152612222608083018486612106565b979650505050505050565b61ffff8616815260806020820152600061224b608083018688612106565b6001600160401b0394909416604083015250606001529392505050565b61ffff871681526001600160a01b038616602082015260a06040820181905260009061229690830187611d0e565b851515606084015282810360808401526122b1818587612106565b9998505050505050505050565b600080604083850312156122d157600080fd5b505080516020909101519092909150565b6000602082840312156122f457600080fd5b81516001600160401b0381111561230a57600080fd5b8201601f8101841361231b57600080fd5b8051612329611eb482611e33565b81815285602083850101111561233e57600080fd5b611592826020830160208601611cde565b61ffff8516815260806020820152600061236c6080830186611d0e565b6001600160401b038516604084015282810360608401526122228185611d0e565b600082198211156123a0576123a06121a1565b500190565b61ffff8716815260c0602082015260006123c260c0830188611d0e565b82810360408401526123d48188611d0e565b6001600160a01b0387811660608601528616608085015283810360a085015290506122b18185611d0e565b60008251612411818460208701611cde565b9190910192915050565b61ffff8616815260a06020820152600061243860a0830187611d0e565b6001600160401b038616604084015282810360608401526124598186611d0e565b9050828103608084015261246d8185611d0e565b9897505050505050505056fea2646970667358221220227d20c5b929975b70c5772054c7976297eb8bf2f22ed0c160ae25578c277ef664736f6c634300080c0033", + "deployedBytecode": "0x6080604052600436106101b65760003560e01c8063950c8a74116100ec578063d1deba1f1161008a578063e2f2882411610064578063e2f2882414610553578063eb8d72b714610573578063f2fde38b14610593578063f5ecbdbc146105b357600080fd5b8063d1deba1f146104eb578063d46fb188146104fe578063df2a5b3b1461053357600080fd5b8063a6c3d165116100c6578063a6c3d16514610457578063b353aaa714610477578063baf3292d146104ab578063cbed8b9c146104cb57600080fd5b8063950c8a74146104045780639917565c146104245780639f38369a1461043757600080fd5b80635b8c41e611610159578063715018a611610133578063715018a6146103655780637533d7881461037a5780638cfd8f5c1461039a5780638da5cb5b146103d257600080fd5b80635b8c41e6146102d257806361bc221a1461032f57806366ad5c8a1461034557600080fd5b8063268e878d11610195578063268e878d1461021d5780633d8b38f61461026257806342d65a8d14610292578063492e527e146102b257600080fd5b80621d3567146101bb57806307e0db17146101dd57806310ddb137146101fd575b600080fd5b3480156101c757600080fd5b506101db6101d6366004611c2c565b6105d3565b005b3480156101e957600080fd5b506101db6101f8366004611cc1565b610804565b34801561020957600080fd5b506101db610218366004611cc1565b61088d565b34801561022957600080fd5b5061024c604051806040016040528060048152602001624080c160e21b81525081565b6040516102599190611d3a565b60405180910390f35b34801561026e57600080fd5b5061028261027d366004611d4d565b6108e5565b6040519015158152602001610259565b34801561029e57600080fd5b506101db6102ad366004611d4d565b6109b1565b3480156102be57600080fd5b506101db6102cd366004611db8565b610a37565b3480156102de57600080fd5b506103216102ed366004611e5a565b6004602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b604051908152602001610259565b34801561033b57600080fd5b5061032160055481565b34801561035157600080fd5b506101db610360366004611c2c565b610b18565b34801561037157600080fd5b506101db610bf4565b34801561038657600080fd5b5061024c610395366004611cc1565b610c08565b3480156103a657600080fd5b506103216103b5366004611efc565b600260209081526000928352604080842090915290825290205481565b3480156103de57600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610259565b34801561041057600080fd5b506003546103ec906001600160a01b031681565b6101db610432366004611cc1565b610ca2565b34801561044357600080fd5b5061024c610452366004611cc1565b610cde565b34801561046357600080fd5b506101db610472366004611d4d565b610df5565b34801561048357600080fd5b506103ec7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104b757600080fd5b506101db6104c6366004611f35565b610e88565b3480156104d757600080fd5b506101db6104e6366004611f50565b610ee4565b6101db6104f9366004611c2c565b610f79565b34801561050a57600080fd5b5061051e610519366004611fc2565b61118f565b60408051928352602083019190915201610259565b34801561053f57600080fd5b506101db61054e36600461202b565b61124c565b34801561055f57600080fd5b506103ec61056e366004611cc1565b6112fe565b34801561057f57600080fd5b506101db61058e366004611d4d565b61141a565b34801561059f57600080fd5b506101db6105ae366004611f35565b611474565b3480156105bf57600080fd5b5061024c6105ce36600461206c565b6114ea565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146106505760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461066e906120bb565b80601f016020809104026020016040519081016040528092919081815260200182805461069a906120bb565b80156106e75780601f106106bc576101008083540402835291602001916106e7565b820191906000526020600020905b8154815290600101906020018083116106ca57829003601f168201915b50505050509050805186869050148015610702575060008151115b801561072a57508051602082012060405161072090889088906120f6565b6040518091039020145b6107855760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b6064820152608401610647565b6107fb8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061159b92505050565b50505050505050565b61080c611614565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b15801561087257600080fd5b505af1158015610886573d6000803e3d6000fd5b5050505050565b610895611614565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610858565b61ffff831660009081526001602052604081208054829190610906906120bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610932906120bb565b801561097f5780601f106109545761010080835404028352916020019161097f565b820191906000526020600020905b81548152906001019060200180831161096257829003601f168201915b5050505050905083836040516109969291906120f6565b60405180910390208180519060200120149150509392505050565b6109b9611614565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610a099086908690869060040161212f565b600060405180830381600087803b158015610a2357600080fd5b505af11580156107fb573d6000803e3d6000fd5b610a3f611614565b6040516304b2b47b60e11b81523060048201526006907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cbed8b9c90829063096568f690602401602060405180830381865afa158015610aae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad2919061214d565b604080516001600160a01b038716602082015287918691016040516020818303038152906040526040518563ffffffff1660e01b8152600401610a09949392919061216a565b333014610b765760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b6064820152608401610647565b610bec8686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f89018190048102820181019092528781528993509150879087908190840183828082843760009201919091525061166e92505050565b505050505050565b610bfc611614565b610c06600061168c565b565b60016020526000908152604090208054610c21906120bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610c4d906120bb565b8015610c9a5780601f10610c6f57610100808354040283529160200191610c9a565b820191906000526020600020905b815481529060010190602001808311610c7d57829003601f168201915b505050505081565b610cdb81604051806040016040528060048152602001624080c160e21b81525033600060405180602001604052806000815250346116dc565b50565b61ffff8116600090815260016020526040812080546060929190610d01906120bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2d906120bb565b8015610d7a5780601f10610d4f57610100808354040283529160200191610d7a565b820191906000526020600020905b815481529060010190602001808311610d5d57829003601f168201915b50505050509050805160001415610dd35760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f72640000006044820152606401610647565b610dee600060148351610de691906121b7565b839190611877565b9392505050565b610dfd611614565b818130604051602001610e12939291906121ce565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251610e4793919290910190611aab565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051610e7b9392919061212f565b60405180910390a1505050565b610e90611614565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b610eec611614565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90610f4090889088908890889088906004016121f4565b600060405180830381600087803b158015610f5a57600080fd5b505af1158015610f6e573d6000803e3d6000fd5b505050505050505050565b61ffff86166000908152600460205260408082209051610f9c90889088906120f6565b90815260408051602092819003830190206001600160401b0387166000908152925290205490508061101c5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b6064820152608401610647565b80838360405161102d9291906120f6565b60405180910390201461108c5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b6064820152608401610647565b61ffff871660009081526004602052604080822090516110af90899089906120f6565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f88018290048202830182019052868252611147918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061166e92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e5878787878560405161117e95949392919061222d565b60405180910390a150505050505050565b6040805180820182526004808252624080c160e21b6020830152915163040a7bb160e41b815260009283926001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016926340a7bb10926111ff928b9230928c918c918c9101612268565b6040805180830381865afa15801561121b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123f91906122be565b9150915094509492505050565b611254611614565b6000811161129c5760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b6044820152606401610647565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001610e7b565b6040516304b2b47b60e11b815230600482015260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f5ecbdbc90829063096568f690602401602060405180830381865afa15801561136f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611393919061214d565b6040516001600160e01b031960e084901b16815261ffff9182166004820152908616602482015230604482015260066064820152608401600060405180830381865afa1580156113e7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261140f91908101906122e2565b602001519392505050565b611422611614565b61ffff83166000908152600160205260409020611440908383611b2f565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051610e7b9392919061212f565b61147c611614565b6001600160a01b0381166114e15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610647565b610cdb8161168c565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa15801561156a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261159291908101906122e2565b95945050505050565b6000806115fe5a60966366ad5c8a60e01b898989896040516024016115c3949392919061234f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190611984565b9150915081610bec57610bec8686868685611a0e565b6000546001600160a01b03163314610c065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610647565b600160056000828254611681919061238d565b909155505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61ffff8616600090815260016020526040812080546116fa906120bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611726906120bb565b80156117735780601f1061174857610100808354040283529160200191611773565b820191906000526020600020905b81548152906001019060200180831161175657829003601f168201915b505050505090508051600014156117e55760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b6064820152608401610647565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c580310090849061183c908b9086908c908c908c908c906004016123a5565b6000604051808303818588803b15801561185557600080fd5b505af1158015611869573d6000803e3d6000fd5b505050505050505050505050565b60608161188581601f61238d565b10156118c45760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610647565b6118ce828461238d565b845110156119125760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610647565b606082158015611931576040519150600082526020820160405261197b565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561196a578051835260209283019201611952565b5050858452601f01601f1916604052505b50949350505050565b6000606060008060008661ffff166001600160401b038111156119a9576119a9611ded565b6040519080825280601f01601f1916602001820160405280156119d3576020820181803683370190505b50905060008087516020890160008d8df191503d9250868311156119f5578692505b828152826000602083013e909890975095505050505050565b8180519060200120600460008761ffff1661ffff16815260200190815260200160002085604051611a3f91906123ff565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90611a9c908790879087908790879061241b565b60405180910390a15050505050565b828054611ab7906120bb565b90600052602060002090601f016020900481019282611ad95760008555611b1f565b82601f10611af257805160ff1916838001178555611b1f565b82800160010185558215611b1f579182015b82811115611b1f578251825591602001919060010190611b04565b50611b2b929150611ba3565b5090565b828054611b3b906120bb565b90600052602060002090601f016020900481019282611b5d5760008555611b1f565b82601f10611b765782800160ff19823516178555611b1f565b82800160010185558215611b1f579182015b82811115611b1f578235825591602001919060010190611b88565b5b80821115611b2b5760008155600101611ba4565b61ffff81168114610cdb57600080fd5b60008083601f840112611bda57600080fd5b5081356001600160401b03811115611bf157600080fd5b602083019150836020828501011115611c0957600080fd5b9250929050565b80356001600160401b0381168114611c2757600080fd5b919050565b60008060008060008060808789031215611c4557600080fd5b8635611c5081611bb8565b955060208701356001600160401b0380821115611c6c57600080fd5b611c788a838b01611bc8565b9097509550859150611c8c60408a01611c10565b94506060890135915080821115611ca257600080fd5b50611caf89828a01611bc8565b979a9699509497509295939492505050565b600060208284031215611cd357600080fd5b8135610dee81611bb8565b60005b83811015611cf9578181015183820152602001611ce1565b83811115611d08576000848401525b50505050565b60008151808452611d26816020860160208601611cde565b601f01601f19169290920160200192915050565b602081526000610dee6020830184611d0e565b600080600060408486031215611d6257600080fd5b8335611d6d81611bb8565b925060208401356001600160401b03811115611d8857600080fd5b611d9486828701611bc8565b9497909650939450505050565b80356001600160a01b0381168114611c2757600080fd5b60008060408385031215611dcb57600080fd5b8235611dd681611bb8565b9150611de460208401611da1565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715611e2b57611e2b611ded565b604052919050565b60006001600160401b03821115611e4c57611e4c611ded565b50601f01601f191660200190565b600080600060608486031215611e6f57600080fd5b8335611e7a81611bb8565b925060208401356001600160401b03811115611e9557600080fd5b8401601f81018613611ea657600080fd5b8035611eb9611eb482611e33565b611e03565b818152876020838501011115611ece57600080fd5b81602084016020830137600060208383010152809450505050611ef360408501611c10565b90509250925092565b60008060408385031215611f0f57600080fd5b8235611f1a81611bb8565b91506020830135611f2a81611bb8565b809150509250929050565b600060208284031215611f4757600080fd5b610dee82611da1565b600080600080600060808688031215611f6857600080fd5b8535611f7381611bb8565b94506020860135611f8381611bb8565b93506040860135925060608601356001600160401b03811115611fa557600080fd5b611fb188828901611bc8565b969995985093965092949392505050565b60008060008060608587031215611fd857600080fd5b8435611fe381611bb8565b935060208501358015158114611ff857600080fd5b925060408501356001600160401b0381111561201357600080fd5b61201f87828801611bc8565b95989497509550505050565b60008060006060848603121561204057600080fd5b833561204b81611bb8565b9250602084013561205b81611bb8565b929592945050506040919091013590565b6000806000806080858703121561208257600080fd5b843561208d81611bb8565b9350602085013561209d81611bb8565b92506120ab60408601611da1565b9396929550929360600135925050565b600181811c908216806120cf57607f821691505b602082108114156120f057634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611592604083018486612106565b60006020828403121561215f57600080fd5b8151610dee81611bb8565b600061ffff8087168352808616602084015250836040830152608060608301526121976080830184611d0e565b9695505050505050565b634e487b7160e01b600052601160045260246000fd5b6000828210156121c9576121c96121a1565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152612222608083018486612106565b979650505050505050565b61ffff8616815260806020820152600061224b608083018688612106565b6001600160401b0394909416604083015250606001529392505050565b61ffff871681526001600160a01b038616602082015260a06040820181905260009061229690830187611d0e565b851515606084015282810360808401526122b1818587612106565b9998505050505050505050565b600080604083850312156122d157600080fd5b505080516020909101519092909150565b6000602082840312156122f457600080fd5b81516001600160401b0381111561230a57600080fd5b8201601f8101841361231b57600080fd5b8051612329611eb482611e33565b81815285602083850101111561233e57600080fd5b611592826020830160208601611cde565b61ffff8516815260806020820152600061236c6080830186611d0e565b6001600160401b038516604084015282810360608401526122228185611d0e565b600082198211156123a0576123a06121a1565b500190565b61ffff8716815260c0602082015260006123c260c0830188611d0e565b82810360408401526123d48188611d0e565b6001600160a01b0387811660608601528616608085015283810360a085015290506122b18185611d0e565b60008251612411818460208701611cde565b9190910192915050565b61ffff8616815260a06020820152600061243860a0830187611d0e565b6001600160401b038616604084015282810360608401526124598186611d0e565b9050828103608084015261246d8185611d0e565b9897505050505050505056fea2646970667358221220227d20c5b929975b70c5772054c7976297eb8bf2f22ed0c160ae25578c277ef664736f6c634300080c0033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "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." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "title": "A LayerZero example sending a cross chain message from a source chain to a destination chain to increment a counter", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 2624, + "contract": "contracts/examples/OmniCounter.sol:OmniCounter", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 11462, + "contract": "contracts/examples/OmniCounter.sol:OmniCounter", + "label": "trustedRemoteLookup", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint16,t_bytes_storage)" + }, + { + "astId": 11468, + "contract": "contracts/examples/OmniCounter.sol:OmniCounter", + "label": "minDstGasLookup", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))" + }, + { + "astId": 11470, + "contract": "contracts/examples/OmniCounter.sol:OmniCounter", + "label": "precrime", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 11955, + "contract": "contracts/examples/OmniCounter.sol:OmniCounter", + "label": "failedMessages", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" + }, + { + "astId": 10498, + "contract": "contracts/examples/OmniCounter.sol:OmniCounter", + "label": "counter", + "offset": 0, + "slot": "5", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bytes32))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bytes32)" + }, + "t_mapping(t_uint16,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))" + }, + "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(uint16 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint16,t_uint256)" + }, + "t_mapping(t_uint16,t_uint256)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint64,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/packages/verify-contract/test/__data__/deployments/fuji/ProxyONFT1155.json b/packages/verify-contract/test/__data__/deployments/fuji/ProxyONFT1155.json new file mode 100644 index 000000000..eef86d6e4 --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/fuji/ProxyONFT1155.json @@ -0,0 +1,1404 @@ +{ + "address": "0xeBc2aFc3DE72a17f42962E912d03DbA5ee8af898", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_lzEndpoint", + "type": "address" + }, + { + "internalType": "address", + "name": "_proxyToken", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "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": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "_toAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "ReceiveBatchFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": true, + "internalType": "address", + "name": "_toAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveFromChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + } + ], + "name": "SendBatchToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendToChain", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "_useCustomAdapterParams", + "type": "bool" + } + ], + "name": "SetUseCustomAdapterParams", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FUNCTION_TYPE_SEND", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FUNCTION_TYPE_SEND_BATCH", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NO_EXTRA_GAS", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendBatchFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155BatchReceived", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "_tokenIds", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_amounts", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "sendBatchFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_adapterParams", + "type": "bytes" + } + ], + "name": "sendFrom", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_useCustomAdapterParams", + "type": "bool" + } + ], + "name": "setUseCustomAdapterParams", + "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": "token", + "outputs": [ + { + "internalType": "contract IERC1155", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "useCustomAdapterParams", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x28e94c7b7b5fa54ee996389cdbad1605a8bde0a1f808cf76f935409de729126f", + "receipt": { + "to": null, + "from": "0x28921b09dB1C7add63265e5ec79B008F0851D5DC", + "contractAddress": "0xeBc2aFc3DE72a17f42962E912d03DbA5ee8af898", + "transactionIndex": 0, + "gasUsed": "2949741", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000080000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000010000000000400000000000000040000000000", + "blockHash": "0xe14518eb5709aa561e0660c4bc668f77f427aa6c7ccc87ba6e53200ae1d2673c", + "transactionHash": "0x28e94c7b7b5fa54ee996389cdbad1605a8bde0a1f808cf76f935409de729126f", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 22247215, + "transactionHash": "0x28e94c7b7b5fa54ee996389cdbad1605a8bde0a1f808cf76f935409de729126f", + "address": "0xeBc2aFc3DE72a17f42962E912d03DbA5ee8af898", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000028921b09db1c7add63265e5ec79b008f0851d5dc" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0xe14518eb5709aa561e0660c4bc668f77f427aa6c7ccc87ba6e53200ae1d2673c" + } + ], + "blockNumber": 22247215, + "cumulativeGasUsed": "2949741", + "status": 1, + "byzantium": true + }, + "args": [ + "0x93f54D755A063cE7bB9e6Ac47Eccc8e33411d706", + "0xFc13c28024Ac57B0FbfF311FccFF2dA452B7Ff26" + ], + "numDeployments": 1, + "solcInputHash": "339d1b9f3fa1541abe678a39e0d52515", + "metadata": "{\"compiler\":{\"version\":\"0.8.12+commit.f00d7308\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_lzEndpoint\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_proxyToken\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"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\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_toAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"ReceiveBatchFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_toAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveFromChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"SendBatchToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendToChain\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"_useCustomAdapterParams\",\"type\":\"bool\"}],\"name\":\"SetUseCustomAdapterParams\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FUNCTION_TYPE_SEND\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FUNCTION_TYPE_SEND_BATCH\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NO_EXTRA_GAS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendBatchFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"_tokenIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"sendBatchFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_adapterParams\",\"type\":\"bytes\"}],\"name\":\"sendFrom\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_useCustomAdapterParams\",\"type\":\"bool\"}],\"name\":\"setUseCustomAdapterParams\",\"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\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC1155\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"useCustomAdapterParams\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"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.\"},\"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/token/onft/extension/ProxyONFT1155.sol\":\"ProxyONFT1155\"},\"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/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/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/ERC165Checker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.1) (utils/introspection/ERC165Checker.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Library used to query support of an interface declared via {IERC165}.\\n *\\n * Note that these functions return the actual result of the query: they do not\\n * `revert` if an interface is not supported. It is up to the caller to decide\\n * what to do in these cases.\\n */\\nlibrary ERC165Checker {\\n // As per the EIP-165 spec, no interface should ever match 0xffffffff\\n bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;\\n\\n /**\\n * @dev Returns true if `account` supports the {IERC165} interface,\\n */\\n function supportsERC165(address account) internal view returns (bool) {\\n // Any contract that implements ERC165 must explicitly indicate support of\\n // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid\\n return\\n _supportsERC165Interface(account, type(IERC165).interfaceId) &&\\n !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);\\n }\\n\\n /**\\n * @dev Returns true if `account` supports the interface defined by\\n * `interfaceId`. Support for {IERC165} itself is queried automatically.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {\\n // query support of both ERC165 as per the spec and support of _interfaceId\\n return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);\\n }\\n\\n /**\\n * @dev Returns a boolean array where each value corresponds to the\\n * interfaces passed in and whether they're supported or not. This allows\\n * you to batch check interfaces for a contract where your expectation\\n * is that some interfaces may not be supported.\\n *\\n * See {IERC165-supportsInterface}.\\n *\\n * _Available since v3.4._\\n */\\n function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)\\n internal\\n view\\n returns (bool[] memory)\\n {\\n // an array of booleans corresponding to interfaceIds and whether they're supported or not\\n bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);\\n\\n // query support of ERC165 itself\\n if (supportsERC165(account)) {\\n // query support of each interface in interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);\\n }\\n }\\n\\n return interfaceIdsSupported;\\n }\\n\\n /**\\n * @dev Returns true if `account` supports all the interfaces defined in\\n * `interfaceIds`. Support for {IERC165} itself is queried automatically.\\n *\\n * Batch-querying can lead to gas savings by skipping repeated checks for\\n * {IERC165} support.\\n *\\n * See {IERC165-supportsInterface}.\\n */\\n function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {\\n // query support of ERC165 itself\\n if (!supportsERC165(account)) {\\n return false;\\n }\\n\\n // query support of each interface in _interfaceIds\\n for (uint256 i = 0; i < interfaceIds.length; i++) {\\n if (!_supportsERC165Interface(account, interfaceIds[i])) {\\n return false;\\n }\\n }\\n\\n // all interfaces supported\\n return true;\\n }\\n\\n /**\\n * @notice Query if a contract implements an interface, does not check ERC165 support\\n * @param account The address of the contract to query for support of an interface\\n * @param interfaceId The interface identifier, as specified in ERC-165\\n * @return true if the contract at account indicates support of the interface with\\n * identifier interfaceId, false otherwise\\n * @dev Assumes that account contains a contract that supports ERC165, otherwise\\n * the behavior of this method is undefined. This precondition can be checked\\n * with {supportsERC165}.\\n * Interface identification is specified in ERC-165.\\n */\\n function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {\\n bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);\\n (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams);\\n if (result.length < 32) return false;\\n return success && abi.decode(result, (uint256)) > 0;\\n }\\n}\\n\",\"keccak256\":\"0x5d97a3df6fdf90912920a24b782da05f9b08b11392bf49e315d0ab5f645a4c7a\",\"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/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xe9617a9f6db351b6ac4c9d5b1097798af59ad7f813e370e8cf69bb44addd8548\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0x909bf72002c91806f39a64172c12b4188219e8649deefbe8d862604d4f9d3faf\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xe3e50134e39aa3c0f916447d36367970c6e4df972d488b794227e0b052ce80d5\",\"license\":\"MIT\"},\"contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"../interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"../interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../util/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint constant public DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(_srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote), \\\"LzApp: invalid source sending contract\\\");\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams, uint _nativeFee) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(uint16 _dstChainId, uint16 _type, bytes memory _adapterParams, uint _extraGas) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type] + _extraGas;\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) { // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(uint16 _version, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = _path;\\n emit SetTrustedRemote(_remoteChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(uint16 _dstChainId, uint16 _packetType, uint _minGas) external onlyOwner {\\n require(_minGas > 0, \\\"LzApp: invalid minGas\\\");\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0xdcf824e4bd747296fa38dbce9f8250514ce24e53cff79909a785e0923274de4a\",\"license\":\"MIT\"},\"contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../util/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft(), 150, abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload));\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload, bytes memory _reason) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function retryMessage(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x2afd4980a5850f45f2c4d7ec44d77b292a51b80f847566479548f89572065311\",\"license\":\"MIT\"},\"contracts/token/onft/IONFT1155Core.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Interface of the ONFT Core standard\\n */\\ninterface IONFT1155Core is IERC165 {\\n event SendToChain(uint16 indexed _dstChainId, address indexed _from, bytes indexed _toAddress, uint _tokenId, uint _amount);\\n event SendBatchToChain(uint16 indexed _dstChainId, address indexed _from, bytes indexed _toAddress, uint[] _tokenIds, uint[] _amounts);\\n event ReceiveFromChain(uint16 indexed _srcChainId, bytes indexed _srcAddress, address indexed _toAddress, uint _tokenId, uint _amount);\\n event ReceiveBatchFromChain(uint16 indexed _srcChainId, bytes indexed _srcAddress, address indexed _toAddress, uint[] _tokenIds, uint[] _amounts);\\n\\n // _from - address where tokens should be deducted from on behalf of\\n // _dstChainId - L0 defined chain id to send tokens too\\n // _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n // _tokenId - token Id to transfer\\n // _amount - amount of the tokens to transfer\\n // _refundAddress - address on src that will receive refund for any overpayment of L0 fees\\n // _zroPaymentAddress - if paying in zro, pass the address to use. using 0x0 indicates not paying fees in zro\\n // _adapterParams - flexible bytes array to indicate messaging adapter services in L0\\n function sendFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, uint _amount, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n // _from - address where tokens should be deducted from on behalf of\\n // _dstChainId - L0 defined chain id to send tokens too\\n // _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n // _tokenIds - token Ids to transfer\\n // _amounts - amounts of the tokens to transfer\\n // _refundAddress - address on src that will receive refund for any overpayment of L0 fees\\n // _zroPaymentAddress - if paying in zro, pass the address to use. using 0x0 indicates not paying fees in zro\\n // _adapterParams - flexible bytes array to indicate messaging adapter services in L0\\n function sendBatchFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint[] calldata _tokenIds, uint[] calldata _amounts, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n // _dstChainId - L0 defined chain id to send tokens too\\n // _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n // _tokenId - token Id to transfer\\n // _amount - amount of the tokens to transfer\\n // _useZro - indicates to use zro to pay L0 fees\\n // _adapterParams - flexible bytes array to indicate messaging adapter services in L0\\n function estimateSendFee(uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n\\n // _dstChainId - L0 defined chain id to send tokens too\\n // _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain\\n // _tokenIds - tokens Id to transfer\\n // _amounts - amounts of the tokens to transfer\\n // _useZro - indicates to use zro to pay L0 fees\\n // _adapterParams - flexible bytes array to indicate messaging adapter services in L0\\n function estimateSendBatchFee(uint16 _dstChainId, bytes calldata _toAddress, uint[] calldata _tokenIds, uint[] calldata _amounts, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);\\n}\\n\",\"keccak256\":\"0xd0ad86ee3af561596d4294d078d2f926fc581e5dbfb09b0836e331cc6fab6e84\",\"license\":\"MIT\"},\"contracts/token/onft/ONFT1155Core.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IONFT1155Core.sol\\\";\\nimport \\\"../../lzApp/NonblockingLzApp.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract ONFT1155Core is NonblockingLzApp, ERC165, IONFT1155Core {\\n uint public constant NO_EXTRA_GAS = 0;\\n uint16 public constant FUNCTION_TYPE_SEND = 1;\\n uint16 public constant FUNCTION_TYPE_SEND_BATCH = 2;\\n bool public useCustomAdapterParams;\\n\\n event SetUseCustomAdapterParams(bool _useCustomAdapterParams);\\n\\n constructor(address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {}\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return interfaceId == type(IONFT1155Core).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function estimateSendFee(uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, uint _amount, bool _useZro, bytes memory _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {\\n return estimateSendBatchFee(_dstChainId, _toAddress, _toSingletonArray(_tokenId), _toSingletonArray(_amount), _useZro, _adapterParams);\\n }\\n\\n function estimateSendBatchFee(uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, uint[] memory _amounts, bool _useZro, bytes memory _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {\\n bytes memory payload = abi.encode(_toAddress, _tokenIds, _amounts);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);\\n }\\n\\n function sendFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, uint _amount, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) public payable virtual override {\\n _sendBatch(_from, _dstChainId, _toAddress, _toSingletonArray(_tokenId), _toSingletonArray(_amount), _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function sendBatchFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, uint[] memory _amounts, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) public payable virtual override {\\n _sendBatch(_from, _dstChainId, _toAddress, _tokenIds, _amounts, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _sendBatch(address _from, uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, uint[] memory _amounts, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual {\\n _debitFrom(_from, _dstChainId, _toAddress, _tokenIds, _amounts);\\n bytes memory payload = abi.encode(_toAddress, _tokenIds, _amounts);\\n if (_tokenIds.length == 1) {\\n if (useCustomAdapterParams) {\\n _checkGasLimit(_dstChainId, FUNCTION_TYPE_SEND, _adapterParams, NO_EXTRA_GAS);\\n } else {\\n require(_adapterParams.length == 0, \\\"LzApp: _adapterParams must be empty.\\\");\\n }\\n _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n emit SendToChain(_dstChainId, _from, _toAddress, _tokenIds[0], _amounts[0]);\\n } else if (_tokenIds.length > 1) {\\n if (useCustomAdapterParams) {\\n _checkGasLimit(_dstChainId, FUNCTION_TYPE_SEND_BATCH, _adapterParams, NO_EXTRA_GAS);\\n } else {\\n require(_adapterParams.length == 0, \\\"LzApp: _adapterParams must be empty.\\\");\\n }\\n _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams, msg.value);\\n emit SendBatchToChain(_dstChainId, _from, _toAddress, _tokenIds, _amounts);\\n }\\n }\\n\\n function _nonblockingLzReceive(\\n uint16 _srcChainId,\\n bytes memory _srcAddress,\\n uint64, /*_nonce*/\\n bytes memory _payload\\n ) internal virtual override {\\n // decode and load the toAddress\\n (bytes memory toAddressBytes, uint[] memory tokenIds, uint[] memory amounts) = abi.decode(_payload, (bytes, uint[], uint[]));\\n address toAddress;\\n assembly {\\n toAddress := mload(add(toAddressBytes, 20))\\n }\\n\\n _creditTo(_srcChainId, toAddress, tokenIds, amounts);\\n\\n if (tokenIds.length == 1) {\\n emit ReceiveFromChain(_srcChainId, _srcAddress, toAddress, tokenIds[0], amounts[0]);\\n } else if (tokenIds.length > 1) {\\n emit ReceiveBatchFromChain(_srcChainId, _srcAddress, toAddress, tokenIds, amounts);\\n }\\n }\\n\\n function setUseCustomAdapterParams(bool _useCustomAdapterParams) external onlyOwner {\\n useCustomAdapterParams = _useCustomAdapterParams;\\n emit SetUseCustomAdapterParams(_useCustomAdapterParams);\\n }\\n\\n function _debitFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint[] memory _tokenIds, uint[] memory _amounts) internal virtual;\\n\\n function _creditTo(uint16 _srcChainId, address _toAddress, uint[] memory _tokenIds, uint[] memory _amounts) internal virtual;\\n\\n function _toSingletonArray(uint element) internal pure returns (uint[] memory) {\\n uint[] memory array = new uint[](1);\\n array[0] = element;\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0xb7f159735e9b44350c2c31496c22bc4b475db804e5a06fea14fcf791a60381ef\",\"license\":\"MIT\"},\"contracts/token/onft/extension/ProxyONFT1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ONFT1155Core.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165Checker.sol\\\";\\n\\ncontract ProxyONFT1155 is ONFT1155Core, IERC1155Receiver {\\n using ERC165Checker for address;\\n\\n IERC1155 public immutable token;\\n\\n constructor(address _lzEndpoint, address _proxyToken) ONFT1155Core(_lzEndpoint) {\\n require(_proxyToken.supportsInterface(type(IERC1155).interfaceId), \\\"ProxyONFT1155: invalid ERC1155 token\\\");\\n token = IERC1155(_proxyToken);\\n }\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ONFT1155Core, IERC165) returns (bool) {\\n return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n function _debitFrom(address _from, uint16, bytes memory, uint[] memory _tokenIds, uint[] memory _amounts) internal virtual override {\\n require(_from == _msgSender(), \\\"ProxyONFT1155: owner is not send caller\\\");\\n token.safeBatchTransferFrom(_from, address(this), _tokenIds, _amounts, \\\"\\\");\\n }\\n\\n function _creditTo(uint16, address _toAddress, uint[] memory _tokenIds, uint[] memory _amounts) internal virtual override {\\n token.safeBatchTransferFrom(address(this), _toAddress, _tokenIds, _amounts, \\\"\\\");\\n }\\n\\n function onERC1155Received(address _operator, address, uint, uint, bytes memory) public virtual override returns (bytes4) {\\n // only allow `this` to tranfser token from others\\n if (_operator != address(this)) return bytes4(0);\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(address _operator, address, uint[] memory, uint[] memory, bytes memory) public virtual override returns (bytes4) {\\n // only allow `this` to tranfser token from others\\n if (_operator != address(this)) return bytes4(0);\\n return this.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x45060a125201675eba3451216fa394a10966bdbf99501688492aa758e04ee796\",\"license\":\"MIT\"},\"contracts/util/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\n\\nlibrary BytesLib {\\n function concat(\\n bytes memory _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1 , \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(\\n bytes storage _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n view\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x2255aadad70e87ed42b158776330175644b07fbbc7e77ed32cd6330974abbcee\",\"license\":\"Unlicense\"},\"contracts/util/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint256 constant LOW_28_MASK =\\n 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf)\\n internal\\n pure\\n {\\n require(_buf.length >= 4);\\n uint256 _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x23942250ddd277c443fa27c6b4ab51e6b3b5e654548b6b9e8d785a88ebec4dfe\",\"license\":\"MIT OR Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60c06040523480156200001157600080fd5b506040516200374d3803806200374d8339810160408190526200003491620002a9565b8180806200004233620000e4565b6001600160a01b0390811660805262000074925083169050636cdb3d1360e11b62000134602090811b6200167817901c565b620000d15760405162461bcd60e51b8152602060048201526024808201527f50726f78794f4e4654313135353a20696e76616c69642045524331313535207460448201526337b5b2b760e11b606482015260840160405180910390fd5b6001600160a01b031660a0525062000339565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600062000141836200015e565b801562000155575062000155838362000196565b90505b92915050565b600062000173826301ffc9a760e01b62000196565b80156200015857506200018f826001600160e01b031962000196565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090620001ff908690620002e1565b6000604051808303818686fa925050503d80600081146200023d576040519150601f19603f3d011682016040523d82523d6000602084013e62000242565b606091505b50915091506020815110156200025f576000935050505062000158565b8180156200028257506000818060200190518101906200028091906200031f565b115b9695505050505050565b80516001600160a01b0381168114620002a457600080fd5b919050565b60008060408385031215620002bd57600080fd5b620002c8836200028c565b9150620002d8602084016200028c565b90509250929050565b6000825160005b81811015620003045760208186018101518583015201620002e8565b8181111562000314576000828501525b509190910192915050565b6000602082840312156200033257600080fd5b5051919050565b60805160a0516133a8620003a56000396000818161076501528181611f4001526122170152600081816105b50152818161078a01528181610a0401528181610aac01528181610bce015281816110140152818161114a01528181611601015261218401526133a86000f3fe6080604052600436106102245760003560e01c8063950c8a7411610123578063cbed8b9c116100ab578063ed629c5c1161006f578063ed629c5c146106d9578063f23a6e61146106f3578063f2fde38b14610713578063f5ecbdbc14610733578063fc0c546a1461075357600080fd5b8063cbed8b9c14610646578063d1deba1f14610666578063df2a5b3b14610679578063eab45d9c14610699578063eb8d72b7146106b957600080fd5b8063b2535663116100f2578063b253566314610583578063b353aaa7146105a3578063baf3292d146105d7578063bc197c81146105f7578063c44618341461063057600080fd5b8063950c8a741461050e5780639f38369a1461052e578063a6c3d1651461054e578063af3fb21c1461056e57600080fd5b806344770515116101b1578063715018a611610175578063715018a61461042d5780637533d788146104425780638608e5f81461046f5780638cfd8f5c146104a45780638da5cb5b146104dc57600080fd5b806344770515146103835780634ab4e687146103985780634db8226a146103ab5780635b8c41e6146103be57806366ad5c8a1461040d57600080fd5b806310ddb137116101f857806310ddb137146102c0578063149e3e1f146102e05780633d8b38f6146103085780633f1f4fa41461032857806342d65a8d1461036357600080fd5b80621d35671461022957806301ffc9a71461024b57806307e0db17146102805780630df37483146102a0575b600080fd5b34801561023557600080fd5b506102496102443660046124d2565b610787565b005b34801561025757600080fd5b5061026b610266366004612565565b6109b8565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b5061024961029b36600461258f565b6109e3565b3480156102ac57600080fd5b506102496102bb3660046125aa565b610a6c565b3480156102cc57600080fd5b506102496102db36600461258f565b610a8b565b3480156102ec57600080fd5b506102f5600281565b60405161ffff9091168152602001610277565b34801561031457600080fd5b5061026b6103233660046125d4565b610ae3565b34801561033457600080fd5b5061035561034336600461258f565b60036020526000908152604090205481565b604051908152602001610277565b34801561036f57600080fd5b5061024961037e3660046125d4565b610baf565b34801561038f57600080fd5b50610355600081565b6102496103a6366004612792565b610c35565b6102496103b9366004612881565b610c4f565b3480156103ca57600080fd5b506103556103d9366004612927565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561041957600080fd5b506102496104283660046124d2565b610c6f565b34801561043957600080fd5b50610249610d4b565b34801561044e57600080fd5b5061046261045d36600461258f565b610d5f565b60405161027791906129e0565b34801561047b57600080fd5b5061048f61048a366004612a03565b610df9565b60408051928352602083019190915201610277565b3480156104b057600080fd5b506103556104bf366004612a99565b600260209081526000928352604080842090915290825290205481565b3480156104e857600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610277565b34801561051a57600080fd5b506004546104f6906001600160a01b031681565b34801561053a57600080fd5b5061046261054936600461258f565b610e29565b34801561055a57600080fd5b506102496105693660046125d4565b610f40565b34801561057a57600080fd5b506102f5600181565b34801561058f57600080fd5b5061048f61059e366004612acc565b610fd3565b3480156105af57600080fd5b506104f67f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e357600080fd5b506102496105f2366004612b68565b6110a1565b34801561060357600080fd5b50610617610612366004612b85565b6110fe565b6040516001600160e01b03199091168152602001610277565b34801561063c57600080fd5b5061035561271081565b34801561065257600080fd5b50610249610661366004612c32565b61112b565b6102496106743660046124d2565b6111c0565b34801561068557600080fd5b50610249610694366004612ca0565b6113d6565b3480156106a557600080fd5b506102496106b4366004612cdc565b611488565b3480156106c557600080fd5b506102496106d43660046125d4565b6114d1565b3480156106e557600080fd5b5060065461026b9060ff1681565b3480156106ff57600080fd5b5061061761070e366004612cf7565b61152b565b34801561071f57600080fd5b5061024961072e366004612b68565b611557565b34801561073f57600080fd5b5061046261074e366004612d5f565b6115d0565b34801561075f57600080fd5b506104f67f000000000000000000000000000000000000000000000000000000000000000081565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146108045760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461082290612dac565b80601f016020809104026020016040519081016040528092919081815260200182805461084e90612dac565b801561089b5780601f106108705761010080835404028352916020019161089b565b820191906000526020600020905b81548152906001019060200180831161087e57829003601f168201915b505050505090508051868690501480156108b6575060008151115b80156108de5750805160208201206040516108d49088908890612de7565b6040518091039020145b6109395760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b60648201526084016107fb565b6109af8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061169492505050565b50505050505050565b60006001600160e01b03198216630271189760e51b14806109dd57506109dd8261170d565b92915050565b6109eb611742565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610a5157600080fd5b505af1158015610a65573d6000803e3d6000fd5b5050505050565b610a74611742565b61ffff909116600090815260036020526040902055565b610a93611742565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610a37565b61ffff831660009081526001602052604081208054829190610b0490612dac565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3090612dac565b8015610b7d5780601f10610b5257610100808354040283529160200191610b7d565b820191906000526020600020905b815481529060010190602001808311610b6057829003601f168201915b505050505090508383604051610b94929190612de7565b60405180910390208180519060200120149150509392505050565b610bb7611742565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610c0790869086908690600401612e20565b600060405180830381600087803b158015610c2157600080fd5b505af11580156109af573d6000803e3d6000fd5b610c45888888888888888861179c565b5050505050505050565b610c45888888610c5e89611984565b610c6789611984565b88888861179c565b333014610ccd5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b60648201526084016107fb565b610d438686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506119cf92505050565b505050505050565b610d53611742565b610d5d6000611b1d565b565b60016020526000908152604090208054610d7890612dac565b80601f0160208091040260200160405190810160405280929190818152602001828054610da490612dac565b8015610df15780601f10610dc657610100808354040283529160200191610df1565b820191906000526020600020905b815481529060010190602001808311610dd457829003601f168201915b505050505081565b600080610e1a8888610e0a89611984565b610e1389611984565b8888610fd3565b91509150965096945050505050565b61ffff8116600090815260016020526040812080546060929190610e4c90612dac565b80601f0160208091040260200160405190810160405280929190818152602001828054610e7890612dac565b8015610ec55780601f10610e9a57610100808354040283529160200191610ec5565b820191906000526020600020905b815481529060010190602001808311610ea857829003601f168201915b50505050509050805160001415610f1e5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f726400000060448201526064016107fb565b610f39600060148351610f319190612e54565b839190611b6d565b9392505050565b610f48611742565b818130604051602001610f5d93929190612e6b565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251610f929391929091019061234f565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051610fc693929190612e20565b60405180910390a1505050565b6000806000878787604051602001610fed93929190612ecc565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090611051908c90309086908b908b90600401612f05565b6040805180830381865afa15801561106d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110919190612f59565b9250925050965096945050505050565b6110a9611742565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020015b60405180910390a150565b60006001600160a01b038616301461111857506000611122565b5063bc197c8160e01b5b95945050505050565b611133611742565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c906111879088908890889088908890600401612f7d565b600060405180830381600087803b1580156111a157600080fd5b505af11580156111b5573d6000803e3d6000fd5b505050505050505050565b61ffff861660009081526005602052604080822090516111e39088908890612de7565b90815260408051602092819003830190206001600160401b038716600090815292529020549050806112635760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b60648201526084016107fb565b808383604051611274929190612de7565b6040518091039020146112d35760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b60648201526084016107fb565b61ffff871660009081526005602052604080822090516112f69089908990612de7565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f8801829004820283018201905286825261138e918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506119cf92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e587878787856040516113c5959493929190612fb6565b60405180910390a150505050505050565b6113de611742565b600081116114265760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b60448201526064016107fb565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001610fc6565b611490611742565b6006805460ff19168215159081179091556040519081527f1584ad594a70cbe1e6515592e1272a987d922b097ead875069cebe8b40c004a4906020016110f3565b6114d9611742565b61ffff831660009081526001602052604090206114f79083836123d3565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051610fc693929190612e20565b60006001600160a01b038616301461154557506000611122565b5063f23a6e6160e01b95945050505050565b61155f611742565b6001600160a01b0381166115c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107fb565b6115cd81611b1d565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611650573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611122919081019061303e565b600061168383611c7a565b8015610f395750610f398383611cad565b6000806116f75a60966366ad5c8a60e01b898989896040516024016116bc9493929190613072565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190611d9a565b9150915081610d4357610d438686868685611e24565b60006001600160e01b031982166319abbbbb60e11b14806109dd57506301ffc9a760e01b6001600160e01b03198316146109dd565b6000546001600160a01b03163314610d5d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107fb565b6117a98888888888611ec1565b60008686866040516020016117c093929190612ecc565b60405160208183030381529060405290508551600114156118c65760065460ff16156117f9576117f4886001846000611f7b565b611818565b8151156118185760405162461bcd60e51b81526004016107fb906130b0565b61182688828686863461205a565b8660405161183491906130f4565b6040518091039020896001600160a01b03168961ffff167f968b0d61ebcf43e5d76ed87bd2c4ee2f22b4969b9f4ca49e3373c025eddd5eeb8960008151811061187f5761187f613110565b60200260200101518960008151811061189a5761189a613110565b60200260200101516040516118b9929190918252602082015260400190565b60405180910390a46111b5565b6001865111156111b55760065460ff16156118ee576118e9886002846000611f7b565b61190d565b81511561190d5760405162461bcd60e51b81526004016107fb906130b0565b61191b88828686863461205a565b8660405161192991906130f4565b6040518091039020896001600160a01b03168961ffff167fddd15f7cfbd674ac2096d598f1650367f8a8bd72b4e3abd85591099ea3b57e338989604051611971929190613126565b60405180910390a4505050505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106119be576119be613110565b602090810291909101015292915050565b6000806000838060200190518101906119e891906131a6565b60148301519295509093509150611a0188828585612200565b825160011415611aab57806001600160a01b031687604051611a2391906130f4565b60405180910390208961ffff167f1bf64e58d19fc43de4c44b3d1bb1fae313979af831a7a39f3297564294329f0f86600081518110611a6457611a64613110565b602002602001015186600081518110611a7f57611a7f613110565b6020026020010151604051611a9e929190918252602082015260400190565b60405180910390a4610c45565b600183511115610c4557806001600160a01b031687604051611acd91906130f4565b60405180910390208961ffff167f1ae08edbbcd7baa8d064835de8593ce16b313414525ac89534e349f4da7926e48686604051611b0b929190613126565b60405180910390a45050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606081611b7b81601f61322d565b1015611bba5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016107fb565b611bc4828461322d565b84511015611c085760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016107fb565b606082158015611c275760405191506000825260208201604052611c71565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611c60578051835260209283019201611c48565b5050858452601f01601f1916604052505b50949350505050565b6000611c8d826301ffc9a760e01b611cad565b80156109dd5750611ca6826001600160e01b0319611cad565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090611d149086906130f4565b6000604051808303818686fa925050503d8060008114611d50576040519150601f19603f3d011682016040523d82523d6000602084013e611d55565b606091505b5091509150602081511015611d7057600093505050506109dd565b818015611d905750600081806020019051810190611d8e9190613245565b115b9695505050505050565b6000606060008060008661ffff166001600160401b03811115611dbf57611dbf612646565b6040519080825280601f01601f191660200182016040528015611de9576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115611e0b578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051611e5591906130f4565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90611eb2908790879087908790879061325e565b60405180910390a15050505050565b6001600160a01b0385163314611f295760405162461bcd60e51b815260206004820152602760248201527f50726f78794f4e4654313135353a206f776e6572206973206e6f742073656e646044820152661031b0b63632b960c91b60648201526084016107fb565b604051631759616b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632eb2c2d6906111879088903090879087906004016132b0565b6000611f8683612280565b61ffff808716600090815260026020908152604080832093891683529290529081205491925090611fb890849061322d565b90506000811161200a5760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f742073657400000000000060448201526064016107fb565b80821015610d435760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f77000000000060448201526064016107fb565b61ffff86166000908152600160205260408120805461207890612dac565b80601f01602080910402602001604051908101604052809291908181526020018280546120a490612dac565b80156120f15780601f106120c6576101008083540402835291602001916120f1565b820191906000526020600020905b8154815290600101906020018083116120d457829003601f168201915b505050505090508051600014156121635760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b60648201526084016107fb565b61216e8787516122dc565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c58031009084906121c5908b9086908c908c908c908c9060040161330b565b6000604051808303818588803b1580156121de57600080fd5b505af11580156121f2573d6000803e3d6000fd5b505050505050505050505050565b604051631759616b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632eb2c2d6906122529030908790879087906004016132b0565b600060405180830381600087803b15801561226c57600080fd5b505af1158015610c45573d6000803e3d6000fd5b60006022825110156122d45760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d730000000060448201526064016107fb565b506022015190565b61ffff8216600090815260036020526040902054806122fa57506127105b8082111561234a5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c6172676560448201526064016107fb565b505050565b82805461235b90612dac565b90600052602060002090601f01602090048101928261237d57600085556123c3565b82601f1061239657805160ff19168380011785556123c3565b828001600101855582156123c3579182015b828111156123c35782518255916020019190600101906123a8565b506123cf929150612447565b5090565b8280546123df90612dac565b90600052602060002090601f01602090048101928261240157600085556123c3565b82601f1061241a5782800160ff198235161785556123c3565b828001600101855582156123c3579182015b828111156123c357823582559160200191906001019061242c565b5b808211156123cf5760008155600101612448565b803561ffff8116811461246e57600080fd5b919050565b60008083601f84011261248557600080fd5b5081356001600160401b0381111561249c57600080fd5b6020830191508360208285010111156124b457600080fd5b9250929050565b80356001600160401b038116811461246e57600080fd5b600080600080600080608087890312156124eb57600080fd5b6124f48761245c565b955060208701356001600160401b038082111561251057600080fd5b61251c8a838b01612473565b909750955085915061253060408a016124bb565b9450606089013591508082111561254657600080fd5b5061255389828a01612473565b979a9699509497509295939492505050565b60006020828403121561257757600080fd5b81356001600160e01b031981168114610f3957600080fd5b6000602082840312156125a157600080fd5b610f398261245c565b600080604083850312156125bd57600080fd5b6125c68361245c565b946020939093013593505050565b6000806000604084860312156125e957600080fd5b6125f28461245c565b925060208401356001600160401b0381111561260d57600080fd5b61261986828701612473565b9497909650939450505050565b6001600160a01b03811681146115cd57600080fd5b803561246e81612626565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561268457612684612646565b604052919050565b60006001600160401b038211156126a5576126a5612646565b50601f01601f191660200190565b600082601f8301126126c457600080fd5b81356126d76126d28261268c565b61265c565b8181528460208386010111156126ec57600080fd5b816020850160208301376000918101602001919091529392505050565b60006001600160401b0382111561272257612722612646565b5060051b60200190565b600082601f83011261273d57600080fd5b8135602061274d6126d283612709565b82815260059290921b8401810191818101908684111561276c57600080fd5b8286015b848110156127875780358352918301918301612770565b509695505050505050565b600080600080600080600080610100898b0312156127af57600080fd5b6127b88961263b565b97506127c660208a0161245c565b965060408901356001600160401b03808211156127e257600080fd5b6127ee8c838d016126b3565b975060608b013591508082111561280457600080fd5b6128108c838d0161272c565b965060808b013591508082111561282657600080fd5b6128328c838d0161272c565b955061284060a08c0161263b565b945061284e60c08c0161263b565b935060e08b013591508082111561286457600080fd5b506128718b828c016126b3565b9150509295985092959890939650565b600080600080600080600080610100898b03121561289e57600080fd5b88356128a981612626565b97506128b760208a0161245c565b965060408901356001600160401b03808211156128d357600080fd5b6128df8c838d016126b3565b975060608b0135965060808b0135955060a08b013591506128ff82612626565b90935060c08a01359061291182612626565b90925060e08a0135908082111561286457600080fd5b60008060006060848603121561293c57600080fd5b6129458461245c565b925060208401356001600160401b0381111561296057600080fd5b61296c868287016126b3565b92505061297b604085016124bb565b90509250925092565b60005b8381101561299f578181015183820152602001612987565b838111156129ae576000848401525b50505050565b600081518084526129cc816020860160208601612984565b601f01601f19169290920160200192915050565b602081526000610f3960208301846129b4565b8035801515811461246e57600080fd5b60008060008060008060c08789031215612a1c57600080fd5b612a258761245c565b955060208701356001600160401b0380821115612a4157600080fd5b612a4d8a838b016126b3565b96506040890135955060608901359450612a6960808a016129f3565b935060a0890135915080821115612a7f57600080fd5b50612a8c89828a016126b3565b9150509295509295509295565b60008060408385031215612aac57600080fd5b612ab58361245c565b9150612ac36020840161245c565b90509250929050565b60008060008060008060c08789031215612ae557600080fd5b612aee8761245c565b955060208701356001600160401b0380821115612b0a57600080fd5b612b168a838b016126b3565b96506040890135915080821115612b2c57600080fd5b612b388a838b0161272c565b95506060890135915080821115612b4e57600080fd5b612b5a8a838b0161272c565b9450612a6960808a016129f3565b600060208284031215612b7a57600080fd5b8135610f3981612626565b600080600080600060a08688031215612b9d57600080fd5b8535612ba881612626565b94506020860135612bb881612626565b935060408601356001600160401b0380821115612bd457600080fd5b612be089838a0161272c565b94506060880135915080821115612bf657600080fd5b612c0289838a0161272c565b93506080880135915080821115612c1857600080fd5b50612c25888289016126b3565b9150509295509295909350565b600080600080600060808688031215612c4a57600080fd5b612c538661245c565b9450612c616020870161245c565b93506040860135925060608601356001600160401b03811115612c8357600080fd5b612c8f88828901612473565b969995985093965092949392505050565b600080600060608486031215612cb557600080fd5b612cbe8461245c565b9250612ccc6020850161245c565b9150604084013590509250925092565b600060208284031215612cee57600080fd5b610f39826129f3565b600080600080600060a08688031215612d0f57600080fd5b8535612d1a81612626565b94506020860135612d2a81612626565b9350604086013592506060860135915060808601356001600160401b03811115612d5357600080fd5b612c25888289016126b3565b60008060008060808587031215612d7557600080fd5b612d7e8561245c565b9350612d8c6020860161245c565b92506040850135612d9c81612626565b9396929550929360600135925050565b600181811c90821680612dc057607f821691505b60208210811415612de157634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611122604083018486612df7565b634e487b7160e01b600052601160045260246000fd5b600082821015612e6657612e66612e3e565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600081518084526020808501945080840160005b83811015612ec157815187529582019590820190600101612ea5565b509495945050505050565b606081526000612edf60608301866129b4565b8281036020840152612ef18186612e91565b90508281036040840152611d908185612e91565b61ffff861681526001600160a01b038516602082015260a060408201819052600090612f33908301866129b4565b84151560608401528281036080840152612f4d81856129b4565b98975050505050505050565b60008060408385031215612f6c57600080fd5b505080516020909101519092909150565b600061ffff808816835280871660208401525084604083015260806060830152612fab608083018486612df7565b979650505050505050565b61ffff86168152608060208201526000612fd4608083018688612df7565b6001600160401b0394909416604083015250606001529392505050565b600082601f83011261300257600080fd5b81516130106126d28261268c565b81815284602083860101111561302557600080fd5b613036826020830160208701612984565b949350505050565b60006020828403121561305057600080fd5b81516001600160401b0381111561306657600080fd5b61303684828501612ff1565b61ffff8516815260806020820152600061308f60808301866129b4565b6001600160401b03851660408401528281036060840152612fab81856129b4565b60208082526024908201527f4c7a4170703a205f61646170746572506172616d73206d75737420626520656d604082015263383a3c9760e11b606082015260800190565b60008251613106818460208701612984565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b6040815260006131396040830185612e91565b82810360208401526111228185612e91565b600082601f83011261315c57600080fd5b8151602061316c6126d283612709565b82815260059290921b8401810191818101908684111561318b57600080fd5b8286015b84811015612787578051835291830191830161318f565b6000806000606084860312156131bb57600080fd5b83516001600160401b03808211156131d257600080fd5b6131de87838801612ff1565b945060208601519150808211156131f457600080fd5b6132008783880161314b565b9350604086015191508082111561321657600080fd5b506132238682870161314b565b9150509250925092565b6000821982111561324057613240612e3e565b500190565b60006020828403121561325757600080fd5b5051919050565b61ffff8616815260a06020820152600061327b60a08301876129b4565b6001600160401b0386166040840152828103606084015261329c81866129b4565b90508281036080840152612f4d81856129b4565b6001600160a01b0385811682528416602082015260a0604082018190526000906132dc90830185612e91565b82810360608401526132ee8185612e91565b838103608090940193909352505060008152602001949350505050565b61ffff8716815260c06020820152600061332860c08301886129b4565b828103604084015261333a81886129b4565b6001600160a01b0387811660608601528616608085015283810360a0850152905061336581856129b4565b999850505050505050505056fea2646970667358221220a0a49260bb5fc7c5f83a96a58773b4acc6d4f6c8d72a3ce0a63e97d566d5ef2c64736f6c634300080c0033", + "deployedBytecode": "0x6080604052600436106102245760003560e01c8063950c8a7411610123578063cbed8b9c116100ab578063ed629c5c1161006f578063ed629c5c146106d9578063f23a6e61146106f3578063f2fde38b14610713578063f5ecbdbc14610733578063fc0c546a1461075357600080fd5b8063cbed8b9c14610646578063d1deba1f14610666578063df2a5b3b14610679578063eab45d9c14610699578063eb8d72b7146106b957600080fd5b8063b2535663116100f2578063b253566314610583578063b353aaa7146105a3578063baf3292d146105d7578063bc197c81146105f7578063c44618341461063057600080fd5b8063950c8a741461050e5780639f38369a1461052e578063a6c3d1651461054e578063af3fb21c1461056e57600080fd5b806344770515116101b1578063715018a611610175578063715018a61461042d5780637533d788146104425780638608e5f81461046f5780638cfd8f5c146104a45780638da5cb5b146104dc57600080fd5b806344770515146103835780634ab4e687146103985780634db8226a146103ab5780635b8c41e6146103be57806366ad5c8a1461040d57600080fd5b806310ddb137116101f857806310ddb137146102c0578063149e3e1f146102e05780633d8b38f6146103085780633f1f4fa41461032857806342d65a8d1461036357600080fd5b80621d35671461022957806301ffc9a71461024b57806307e0db17146102805780630df37483146102a0575b600080fd5b34801561023557600080fd5b506102496102443660046124d2565b610787565b005b34801561025757600080fd5b5061026b610266366004612565565b6109b8565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b5061024961029b36600461258f565b6109e3565b3480156102ac57600080fd5b506102496102bb3660046125aa565b610a6c565b3480156102cc57600080fd5b506102496102db36600461258f565b610a8b565b3480156102ec57600080fd5b506102f5600281565b60405161ffff9091168152602001610277565b34801561031457600080fd5b5061026b6103233660046125d4565b610ae3565b34801561033457600080fd5b5061035561034336600461258f565b60036020526000908152604090205481565b604051908152602001610277565b34801561036f57600080fd5b5061024961037e3660046125d4565b610baf565b34801561038f57600080fd5b50610355600081565b6102496103a6366004612792565b610c35565b6102496103b9366004612881565b610c4f565b3480156103ca57600080fd5b506103556103d9366004612927565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b34801561041957600080fd5b506102496104283660046124d2565b610c6f565b34801561043957600080fd5b50610249610d4b565b34801561044e57600080fd5b5061046261045d36600461258f565b610d5f565b60405161027791906129e0565b34801561047b57600080fd5b5061048f61048a366004612a03565b610df9565b60408051928352602083019190915201610277565b3480156104b057600080fd5b506103556104bf366004612a99565b600260209081526000928352604080842090915290825290205481565b3480156104e857600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610277565b34801561051a57600080fd5b506004546104f6906001600160a01b031681565b34801561053a57600080fd5b5061046261054936600461258f565b610e29565b34801561055a57600080fd5b506102496105693660046125d4565b610f40565b34801561057a57600080fd5b506102f5600181565b34801561058f57600080fd5b5061048f61059e366004612acc565b610fd3565b3480156105af57600080fd5b506104f67f000000000000000000000000000000000000000000000000000000000000000081565b3480156105e357600080fd5b506102496105f2366004612b68565b6110a1565b34801561060357600080fd5b50610617610612366004612b85565b6110fe565b6040516001600160e01b03199091168152602001610277565b34801561063c57600080fd5b5061035561271081565b34801561065257600080fd5b50610249610661366004612c32565b61112b565b6102496106743660046124d2565b6111c0565b34801561068557600080fd5b50610249610694366004612ca0565b6113d6565b3480156106a557600080fd5b506102496106b4366004612cdc565b611488565b3480156106c557600080fd5b506102496106d43660046125d4565b6114d1565b3480156106e557600080fd5b5060065461026b9060ff1681565b3480156106ff57600080fd5b5061061761070e366004612cf7565b61152b565b34801561071f57600080fd5b5061024961072e366004612b68565b611557565b34801561073f57600080fd5b5061046261074e366004612d5f565b6115d0565b34801561075f57600080fd5b506104f67f000000000000000000000000000000000000000000000000000000000000000081565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146108045760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461082290612dac565b80601f016020809104026020016040519081016040528092919081815260200182805461084e90612dac565b801561089b5780601f106108705761010080835404028352916020019161089b565b820191906000526020600020905b81548152906001019060200180831161087e57829003601f168201915b505050505090508051868690501480156108b6575060008151115b80156108de5750805160208201206040516108d49088908890612de7565b6040518091039020145b6109395760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b60648201526084016107fb565b6109af8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061169492505050565b50505050505050565b60006001600160e01b03198216630271189760e51b14806109dd57506109dd8261170d565b92915050565b6109eb611742565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610a5157600080fd5b505af1158015610a65573d6000803e3d6000fd5b5050505050565b610a74611742565b61ffff909116600090815260036020526040902055565b610a93611742565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610a37565b61ffff831660009081526001602052604081208054829190610b0490612dac565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3090612dac565b8015610b7d5780601f10610b5257610100808354040283529160200191610b7d565b820191906000526020600020905b815481529060010190602001808311610b6057829003601f168201915b505050505090508383604051610b94929190612de7565b60405180910390208180519060200120149150509392505050565b610bb7611742565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610c0790869086908690600401612e20565b600060405180830381600087803b158015610c2157600080fd5b505af11580156109af573d6000803e3d6000fd5b610c45888888888888888861179c565b5050505050505050565b610c45888888610c5e89611984565b610c6789611984565b88888861179c565b333014610ccd5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b60648201526084016107fb565b610d438686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8901819004810282018101909252878152899350915087908790819084018382808284376000920191909152506119cf92505050565b505050505050565b610d53611742565b610d5d6000611b1d565b565b60016020526000908152604090208054610d7890612dac565b80601f0160208091040260200160405190810160405280929190818152602001828054610da490612dac565b8015610df15780601f10610dc657610100808354040283529160200191610df1565b820191906000526020600020905b815481529060010190602001808311610dd457829003601f168201915b505050505081565b600080610e1a8888610e0a89611984565b610e1389611984565b8888610fd3565b91509150965096945050505050565b61ffff8116600090815260016020526040812080546060929190610e4c90612dac565b80601f0160208091040260200160405190810160405280929190818152602001828054610e7890612dac565b8015610ec55780601f10610e9a57610100808354040283529160200191610ec5565b820191906000526020600020905b815481529060010190602001808311610ea857829003601f168201915b50505050509050805160001415610f1e5760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f726400000060448201526064016107fb565b610f39600060148351610f319190612e54565b839190611b6d565b9392505050565b610f48611742565b818130604051602001610f5d93929190612e6b565b60408051601f1981840301815291815261ffff85166000908152600160209081529190208251610f929391929091019061234f565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051610fc693929190612e20565b60405180910390a1505050565b6000806000878787604051602001610fed93929190612ecc565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090611051908c90309086908b908b90600401612f05565b6040805180830381865afa15801561106d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110919190612f59565b9250925050965096945050505050565b6110a9611742565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b906020015b60405180910390a150565b60006001600160a01b038616301461111857506000611122565b5063bc197c8160e01b5b95945050505050565b611133611742565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c906111879088908890889088908890600401612f7d565b600060405180830381600087803b1580156111a157600080fd5b505af11580156111b5573d6000803e3d6000fd5b505050505050505050565b61ffff861660009081526005602052604080822090516111e39088908890612de7565b90815260408051602092819003830190206001600160401b038716600090815292529020549050806112635760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b60648201526084016107fb565b808383604051611274929190612de7565b6040518091039020146112d35760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b60648201526084016107fb565b61ffff871660009081526005602052604080822090516112f69089908990612de7565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f8801829004820283018201905286825261138e918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a9350915088908890819084018382808284376000920191909152506119cf92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e587878787856040516113c5959493929190612fb6565b60405180910390a150505050505050565b6113de611742565b600081116114265760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b60448201526064016107fb565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac090606001610fc6565b611490611742565b6006805460ff19168215159081179091556040519081527f1584ad594a70cbe1e6515592e1272a987d922b097ead875069cebe8b40c004a4906020016110f3565b6114d9611742565b61ffff831660009081526001602052604090206114f79083836123d3565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051610fc693929190612e20565b60006001600160a01b038616301461154557506000611122565b5063f23a6e6160e01b95945050505050565b61155f611742565b6001600160a01b0381166115c45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107fb565b6115cd81611b1d565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611650573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611122919081019061303e565b600061168383611c7a565b8015610f395750610f398383611cad565b6000806116f75a60966366ad5c8a60e01b898989896040516024016116bc9493929190613072565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190611d9a565b9150915081610d4357610d438686868685611e24565b60006001600160e01b031982166319abbbbb60e11b14806109dd57506301ffc9a760e01b6001600160e01b03198316146109dd565b6000546001600160a01b03163314610d5d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107fb565b6117a98888888888611ec1565b60008686866040516020016117c093929190612ecc565b60405160208183030381529060405290508551600114156118c65760065460ff16156117f9576117f4886001846000611f7b565b611818565b8151156118185760405162461bcd60e51b81526004016107fb906130b0565b61182688828686863461205a565b8660405161183491906130f4565b6040518091039020896001600160a01b03168961ffff167f968b0d61ebcf43e5d76ed87bd2c4ee2f22b4969b9f4ca49e3373c025eddd5eeb8960008151811061187f5761187f613110565b60200260200101518960008151811061189a5761189a613110565b60200260200101516040516118b9929190918252602082015260400190565b60405180910390a46111b5565b6001865111156111b55760065460ff16156118ee576118e9886002846000611f7b565b61190d565b81511561190d5760405162461bcd60e51b81526004016107fb906130b0565b61191b88828686863461205a565b8660405161192991906130f4565b6040518091039020896001600160a01b03168961ffff167fddd15f7cfbd674ac2096d598f1650367f8a8bd72b4e3abd85591099ea3b57e338989604051611971929190613126565b60405180910390a4505050505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106119be576119be613110565b602090810291909101015292915050565b6000806000838060200190518101906119e891906131a6565b60148301519295509093509150611a0188828585612200565b825160011415611aab57806001600160a01b031687604051611a2391906130f4565b60405180910390208961ffff167f1bf64e58d19fc43de4c44b3d1bb1fae313979af831a7a39f3297564294329f0f86600081518110611a6457611a64613110565b602002602001015186600081518110611a7f57611a7f613110565b6020026020010151604051611a9e929190918252602082015260400190565b60405180910390a4610c45565b600183511115610c4557806001600160a01b031687604051611acd91906130f4565b60405180910390208961ffff167f1ae08edbbcd7baa8d064835de8593ce16b313414525ac89534e349f4da7926e48686604051611b0b929190613126565b60405180910390a45050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606081611b7b81601f61322d565b1015611bba5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016107fb565b611bc4828461322d565b84511015611c085760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016107fb565b606082158015611c275760405191506000825260208201604052611c71565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611c60578051835260209283019201611c48565b5050858452601f01601f1916604052505b50949350505050565b6000611c8d826301ffc9a760e01b611cad565b80156109dd5750611ca6826001600160e01b0319611cad565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090611d149086906130f4565b6000604051808303818686fa925050503d8060008114611d50576040519150601f19603f3d011682016040523d82523d6000602084013e611d55565b606091505b5091509150602081511015611d7057600093505050506109dd565b818015611d905750600081806020019051810190611d8e9190613245565b115b9695505050505050565b6000606060008060008661ffff166001600160401b03811115611dbf57611dbf612646565b6040519080825280601f01601f191660200182016040528015611de9576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115611e0b578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051611e5591906130f4565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90611eb2908790879087908790879061325e565b60405180910390a15050505050565b6001600160a01b0385163314611f295760405162461bcd60e51b815260206004820152602760248201527f50726f78794f4e4654313135353a206f776e6572206973206e6f742073656e646044820152661031b0b63632b960c91b60648201526084016107fb565b604051631759616b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632eb2c2d6906111879088903090879087906004016132b0565b6000611f8683612280565b61ffff808716600090815260026020908152604080832093891683529290529081205491925090611fb890849061322d565b90506000811161200a5760405162461bcd60e51b815260206004820152601a60248201527f4c7a4170703a206d696e4761734c696d6974206e6f742073657400000000000060448201526064016107fb565b80821015610d435760405162461bcd60e51b815260206004820152601b60248201527f4c7a4170703a20676173206c696d697420697320746f6f206c6f77000000000060448201526064016107fb565b61ffff86166000908152600160205260408120805461207890612dac565b80601f01602080910402602001604051908101604052809291908181526020018280546120a490612dac565b80156120f15780601f106120c6576101008083540402835291602001916120f1565b820191906000526020600020905b8154815290600101906020018083116120d457829003601f168201915b505050505090508051600014156121635760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b60648201526084016107fb565b61216e8787516122dc565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c58031009084906121c5908b9086908c908c908c908c9060040161330b565b6000604051808303818588803b1580156121de57600080fd5b505af11580156121f2573d6000803e3d6000fd5b505050505050505050505050565b604051631759616b60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632eb2c2d6906122529030908790879087906004016132b0565b600060405180830381600087803b15801561226c57600080fd5b505af1158015610c45573d6000803e3d6000fd5b60006022825110156122d45760405162461bcd60e51b815260206004820152601c60248201527f4c7a4170703a20696e76616c69642061646170746572506172616d730000000060448201526064016107fb565b506022015190565b61ffff8216600090815260036020526040902054806122fa57506127105b8082111561234a5760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c6172676560448201526064016107fb565b505050565b82805461235b90612dac565b90600052602060002090601f01602090048101928261237d57600085556123c3565b82601f1061239657805160ff19168380011785556123c3565b828001600101855582156123c3579182015b828111156123c35782518255916020019190600101906123a8565b506123cf929150612447565b5090565b8280546123df90612dac565b90600052602060002090601f01602090048101928261240157600085556123c3565b82601f1061241a5782800160ff198235161785556123c3565b828001600101855582156123c3579182015b828111156123c357823582559160200191906001019061242c565b5b808211156123cf5760008155600101612448565b803561ffff8116811461246e57600080fd5b919050565b60008083601f84011261248557600080fd5b5081356001600160401b0381111561249c57600080fd5b6020830191508360208285010111156124b457600080fd5b9250929050565b80356001600160401b038116811461246e57600080fd5b600080600080600080608087890312156124eb57600080fd5b6124f48761245c565b955060208701356001600160401b038082111561251057600080fd5b61251c8a838b01612473565b909750955085915061253060408a016124bb565b9450606089013591508082111561254657600080fd5b5061255389828a01612473565b979a9699509497509295939492505050565b60006020828403121561257757600080fd5b81356001600160e01b031981168114610f3957600080fd5b6000602082840312156125a157600080fd5b610f398261245c565b600080604083850312156125bd57600080fd5b6125c68361245c565b946020939093013593505050565b6000806000604084860312156125e957600080fd5b6125f28461245c565b925060208401356001600160401b0381111561260d57600080fd5b61261986828701612473565b9497909650939450505050565b6001600160a01b03811681146115cd57600080fd5b803561246e81612626565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561268457612684612646565b604052919050565b60006001600160401b038211156126a5576126a5612646565b50601f01601f191660200190565b600082601f8301126126c457600080fd5b81356126d76126d28261268c565b61265c565b8181528460208386010111156126ec57600080fd5b816020850160208301376000918101602001919091529392505050565b60006001600160401b0382111561272257612722612646565b5060051b60200190565b600082601f83011261273d57600080fd5b8135602061274d6126d283612709565b82815260059290921b8401810191818101908684111561276c57600080fd5b8286015b848110156127875780358352918301918301612770565b509695505050505050565b600080600080600080600080610100898b0312156127af57600080fd5b6127b88961263b565b97506127c660208a0161245c565b965060408901356001600160401b03808211156127e257600080fd5b6127ee8c838d016126b3565b975060608b013591508082111561280457600080fd5b6128108c838d0161272c565b965060808b013591508082111561282657600080fd5b6128328c838d0161272c565b955061284060a08c0161263b565b945061284e60c08c0161263b565b935060e08b013591508082111561286457600080fd5b506128718b828c016126b3565b9150509295985092959890939650565b600080600080600080600080610100898b03121561289e57600080fd5b88356128a981612626565b97506128b760208a0161245c565b965060408901356001600160401b03808211156128d357600080fd5b6128df8c838d016126b3565b975060608b0135965060808b0135955060a08b013591506128ff82612626565b90935060c08a01359061291182612626565b90925060e08a0135908082111561286457600080fd5b60008060006060848603121561293c57600080fd5b6129458461245c565b925060208401356001600160401b0381111561296057600080fd5b61296c868287016126b3565b92505061297b604085016124bb565b90509250925092565b60005b8381101561299f578181015183820152602001612987565b838111156129ae576000848401525b50505050565b600081518084526129cc816020860160208601612984565b601f01601f19169290920160200192915050565b602081526000610f3960208301846129b4565b8035801515811461246e57600080fd5b60008060008060008060c08789031215612a1c57600080fd5b612a258761245c565b955060208701356001600160401b0380821115612a4157600080fd5b612a4d8a838b016126b3565b96506040890135955060608901359450612a6960808a016129f3565b935060a0890135915080821115612a7f57600080fd5b50612a8c89828a016126b3565b9150509295509295509295565b60008060408385031215612aac57600080fd5b612ab58361245c565b9150612ac36020840161245c565b90509250929050565b60008060008060008060c08789031215612ae557600080fd5b612aee8761245c565b955060208701356001600160401b0380821115612b0a57600080fd5b612b168a838b016126b3565b96506040890135915080821115612b2c57600080fd5b612b388a838b0161272c565b95506060890135915080821115612b4e57600080fd5b612b5a8a838b0161272c565b9450612a6960808a016129f3565b600060208284031215612b7a57600080fd5b8135610f3981612626565b600080600080600060a08688031215612b9d57600080fd5b8535612ba881612626565b94506020860135612bb881612626565b935060408601356001600160401b0380821115612bd457600080fd5b612be089838a0161272c565b94506060880135915080821115612bf657600080fd5b612c0289838a0161272c565b93506080880135915080821115612c1857600080fd5b50612c25888289016126b3565b9150509295509295909350565b600080600080600060808688031215612c4a57600080fd5b612c538661245c565b9450612c616020870161245c565b93506040860135925060608601356001600160401b03811115612c8357600080fd5b612c8f88828901612473565b969995985093965092949392505050565b600080600060608486031215612cb557600080fd5b612cbe8461245c565b9250612ccc6020850161245c565b9150604084013590509250925092565b600060208284031215612cee57600080fd5b610f39826129f3565b600080600080600060a08688031215612d0f57600080fd5b8535612d1a81612626565b94506020860135612d2a81612626565b9350604086013592506060860135915060808601356001600160401b03811115612d5357600080fd5b612c25888289016126b3565b60008060008060808587031215612d7557600080fd5b612d7e8561245c565b9350612d8c6020860161245c565b92506040850135612d9c81612626565b9396929550929360600135925050565b600181811c90821680612dc057607f821691505b60208210811415612de157634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611122604083018486612df7565b634e487b7160e01b600052601160045260246000fd5b600082821015612e6657612e66612e3e565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600081518084526020808501945080840160005b83811015612ec157815187529582019590820190600101612ea5565b509495945050505050565b606081526000612edf60608301866129b4565b8281036020840152612ef18186612e91565b90508281036040840152611d908185612e91565b61ffff861681526001600160a01b038516602082015260a060408201819052600090612f33908301866129b4565b84151560608401528281036080840152612f4d81856129b4565b98975050505050505050565b60008060408385031215612f6c57600080fd5b505080516020909101519092909150565b600061ffff808816835280871660208401525084604083015260806060830152612fab608083018486612df7565b979650505050505050565b61ffff86168152608060208201526000612fd4608083018688612df7565b6001600160401b0394909416604083015250606001529392505050565b600082601f83011261300257600080fd5b81516130106126d28261268c565b81815284602083860101111561302557600080fd5b613036826020830160208701612984565b949350505050565b60006020828403121561305057600080fd5b81516001600160401b0381111561306657600080fd5b61303684828501612ff1565b61ffff8516815260806020820152600061308f60808301866129b4565b6001600160401b03851660408401528281036060840152612fab81856129b4565b60208082526024908201527f4c7a4170703a205f61646170746572506172616d73206d75737420626520656d604082015263383a3c9760e11b606082015260800190565b60008251613106818460208701612984565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b6040815260006131396040830185612e91565b82810360208401526111228185612e91565b600082601f83011261315c57600080fd5b8151602061316c6126d283612709565b82815260059290921b8401810191818101908684111561318b57600080fd5b8286015b84811015612787578051835291830191830161318f565b6000806000606084860312156131bb57600080fd5b83516001600160401b03808211156131d257600080fd5b6131de87838801612ff1565b945060208601519150808211156131f457600080fd5b6132008783880161314b565b9350604086015191508082111561321657600080fd5b506132238682870161314b565b9150509250925092565b6000821982111561324057613240612e3e565b500190565b60006020828403121561325757600080fd5b5051919050565b61ffff8616815260a06020820152600061327b60a08301876129b4565b6001600160401b0386166040840152828103606084015261329c81866129b4565b90508281036080840152612f4d81856129b4565b6001600160a01b0385811682528416602082015260a0604082018190526000906132dc90830185612e91565b82810360608401526132ee8185612e91565b838103608090940193909352505060008152602001949350505050565b61ffff8716815260c06020820152600061332860c08301886129b4565b828103604084015261333a81886129b4565b6001600160a01b0387811660608601528616608085015283810360a0850152905061336581856129b4565b999850505050505050505056fea2646970667358221220a0a49260bb5fc7c5f83a96a58773b4acc6d4f6c8d72a3ce0a63e97d566d5ef2c64736f6c634300080c0033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "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." + }, + "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": 4047, + "contract": "contracts/token/onft/extension/ProxyONFT1155.sol:ProxyONFT1155", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 14693, + "contract": "contracts/token/onft/extension/ProxyONFT1155.sol:ProxyONFT1155", + "label": "trustedRemoteLookup", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint16,t_bytes_storage)" + }, + { + "astId": 14699, + "contract": "contracts/token/onft/extension/ProxyONFT1155.sol:ProxyONFT1155", + "label": "minDstGasLookup", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))" + }, + { + "astId": 14703, + "contract": "contracts/token/onft/extension/ProxyONFT1155.sol:ProxyONFT1155", + "label": "payloadSizeLimitLookup", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 14705, + "contract": "contracts/token/onft/extension/ProxyONFT1155.sol:ProxyONFT1155", + "label": "precrime", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 15242, + "contract": "contracts/token/onft/extension/ProxyONFT1155.sol:ProxyONFT1155", + "label": "failedMessages", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" + }, + { + "astId": 23858, + "contract": "contracts/token/onft/extension/ProxyONFT1155.sol:ProxyONFT1155", + "label": "useCustomAdapterParams", + "offset": 0, + "slot": "6", + "type": "t_bool" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bytes32))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bytes32)" + }, + "t_mapping(t_uint16,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))" + }, + "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(uint16 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint16,t_uint256)" + }, + "t_mapping(t_uint16,t_uint256)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint64,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/packages/verify-contract/test/__data__/deployments/fuji/StargateComposed.json b/packages/verify-contract/test/__data__/deployments/fuji/StargateComposed.json new file mode 100644 index 000000000..544f3a84b --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/fuji/StargateComposed.json @@ -0,0 +1,152 @@ +{ + "address": "0xcaDf84f934F0d0Cdb3d6A48A25565e0087072c31", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_stargateRouter", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "OUT_TO_NATIVE", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountLD", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "sgReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stargateRouter", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "dstChainId", + "type": "uint16" + } + ], + "name": "swap", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } + ], + "transactionHash": "0xee511cc1288afc767d13d4d7daecb38de74fa4dcf224ee45362f3614ae8eeb12", + "receipt": { + "to": null, + "from": "0x28921b09dB1C7add63265e5ec79B008F0851D5DC", + "contractAddress": "0xcaDf84f934F0d0Cdb3d6A48A25565e0087072c31", + "transactionIndex": 0, + "gasUsed": "439669", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x27370a9c9836f6db3bd17e2681b410307bfe7ebc7cd7b8a805f5dd84802ed561", + "transactionHash": "0xee511cc1288afc767d13d4d7daecb38de74fa4dcf224ee45362f3614ae8eeb12", + "logs": [], + "blockNumber": 18376803, + "cumulativeGasUsed": "439669", + "status": 1, + "byzantium": true + }, + "args": ["0x13093E05Eb890dfA6DacecBdE51d24DabAb2Faa1"], + "numDeployments": 1, + "solcInputHash": "291fb1b6849d8af5953da2fec783b765", + "metadata": "{\"compiler\":{\"version\":\"0.8.12+commit.f00d7308\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stargateRouter\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"OUT_TO_NATIVE\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountLD\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"}],\"name\":\"sgReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stargateRouter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"dstChainId\",\"type\":\"uint16\"}],\"name\":\"swap\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/StargateComposed.sol\":\"StargateComposed\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@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/utils/math/SafeMath.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 SafeMath {\\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\":\"0x0f633a0223d9a1dcccfcf38a64c9de0874dfcbfac0c6941ccf074d63a2ce0e1e\",\"license\":\"MIT\"},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol\":{\"content\":\"pragma solidity >=0.6.2;\\n\\ninterface IUniswapV2Router01 {\\n function factory() external pure returns (address);\\n function WETH() external pure returns (address);\\n\\n function addLiquidity(\\n address tokenA,\\n address tokenB,\\n uint amountADesired,\\n uint amountBDesired,\\n uint amountAMin,\\n uint amountBMin,\\n address to,\\n uint deadline\\n ) external returns (uint amountA, uint amountB, uint liquidity);\\n function addLiquidityETH(\\n address token,\\n uint amountTokenDesired,\\n uint amountTokenMin,\\n uint amountETHMin,\\n address to,\\n uint deadline\\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\\n function removeLiquidity(\\n address tokenA,\\n address tokenB,\\n uint liquidity,\\n uint amountAMin,\\n uint amountBMin,\\n address to,\\n uint deadline\\n ) external returns (uint amountA, uint amountB);\\n function removeLiquidityETH(\\n address token,\\n uint liquidity,\\n uint amountTokenMin,\\n uint amountETHMin,\\n address to,\\n uint deadline\\n ) external returns (uint amountToken, uint amountETH);\\n function removeLiquidityWithPermit(\\n address tokenA,\\n address tokenB,\\n uint liquidity,\\n uint amountAMin,\\n uint amountBMin,\\n address to,\\n uint deadline,\\n bool approveMax, uint8 v, bytes32 r, bytes32 s\\n ) external returns (uint amountA, uint amountB);\\n function removeLiquidityETHWithPermit(\\n address token,\\n uint liquidity,\\n uint amountTokenMin,\\n uint amountETHMin,\\n address to,\\n uint deadline,\\n bool approveMax, uint8 v, bytes32 r, bytes32 s\\n ) external returns (uint amountToken, uint amountETH);\\n function swapExactTokensForTokens(\\n uint amountIn,\\n uint amountOutMin,\\n address[] calldata path,\\n address to,\\n uint deadline\\n ) external returns (uint[] memory amounts);\\n function swapTokensForExactTokens(\\n uint amountOut,\\n uint amountInMax,\\n address[] calldata path,\\n address to,\\n uint deadline\\n ) external returns (uint[] memory amounts);\\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\\n external\\n payable\\n returns (uint[] memory amounts);\\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\\n external\\n returns (uint[] memory amounts);\\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\\n external\\n returns (uint[] memory amounts);\\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\\n external\\n payable\\n returns (uint[] memory amounts);\\n\\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\\n}\\n\",\"keccak256\":\"0x8a3c5c449d4b7cd76513ed6995f4b86e4a86f222c770f8442f5fc128ce29b4d2\"},\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\":{\"content\":\"pragma solidity >=0.6.2;\\n\\nimport './IUniswapV2Router01.sol';\\n\\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\\n function removeLiquidityETHSupportingFeeOnTransferTokens(\\n address token,\\n uint liquidity,\\n uint amountTokenMin,\\n uint amountETHMin,\\n address to,\\n uint deadline\\n ) external returns (uint amountETH);\\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\\n address token,\\n uint liquidity,\\n uint amountTokenMin,\\n uint amountETHMin,\\n address to,\\n uint deadline,\\n bool approveMax, uint8 v, bytes32 r, bytes32 s\\n ) external returns (uint amountETH);\\n\\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\\n uint amountIn,\\n uint amountOutMin,\\n address[] calldata path,\\n address to,\\n uint deadline\\n ) external;\\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\\n uint amountOutMin,\\n address[] calldata path,\\n address to,\\n uint deadline\\n ) external payable;\\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\\n uint amountIn,\\n uint amountOutMin,\\n address[] calldata path,\\n address to,\\n uint deadline\\n ) external;\\n}\\n\",\"keccak256\":\"0x744e30c133bd0f7ca9e7163433cf6d72f45c6bb1508c2c9c02f1a6db796ae59d\"},\"contracts/StargateComposed.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.4;\\npragma abicoder v2;\\n\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n//import \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\\\";\\nimport \\\"./interfaces/IStargateRouter.sol\\\";\\nimport \\\"./interfaces/IStargateReceiver.sol\\\";\\n\\ncontract StargateComposed is IStargateReceiver {\\n using SafeMath for uint;\\n address public stargateRouter; // an IStargateRouter instance\\n\\n // special token value that indicates the sgReceive() should swap OUT native asset\\n address public OUT_TO_NATIVE = 0x0000000000000000000000000000000000000000;\\n\\n constructor(address _stargateRouter) {\\n stargateRouter = _stargateRouter;\\n }\\n\\n //-----------------------------------------------------------------------------------------------------------------------\\n // 1. swap native on source chain to native on destination chain (!)\\n function swap(\\n uint16 dstChainId\\n ) external payable {\\n\\n IERC20(address(0x4A0D1092E9df255cf95D72834Ea9255132782318)).transferFrom(msg.sender, address(this), 1000000);\\n IERC20(address(0x4A0D1092E9df255cf95D72834Ea9255132782318)).approve(address(stargateRouter), 1000000);\\n\\n // Stargate's Router.swap() function sends the tokens to the destination chain.\\n IStargateRouter(stargateRouter).swap{value:msg.value}(\\n dstChainId, // the destination chain id\\n 1, // the source Stargate poolId\\n 1, // the destination Stargate poolId\\n payable(msg.sender), // refund adddress. if msg.sender pays too much gas, return extra eth\\n 1000000, // total tokens to send to destination chain\\n 0, // minimum\\n IStargateRouter.lzTxObj(500000, 0, \\\"0x\\\"), // 500,000 for the sgReceive()\\n abi.encodePacked(address(0x9d39Ac97cA405c80c8D8d2eF705E21ABC8fB6B6E)), // destination address, the sgReceive() implementer\\n bytes(\\\"0x01612ef87bfcd858687160294b0effaca0cba342e2000000000000000000000000612ef87bfcd858687160294b0effaca0cba342e2\\\") // bytes payload\\n );\\n }\\n\\n //-----------------------------------------------------------------------------------------------------------------------\\n // sgReceive() - the destination contract must implement this function to receive the tokens and payload\\n function sgReceive(uint16 /*_chainId*/, bytes memory /*_srcAddress*/, uint /*_nonce*/, address _token, uint amountLD, bytes memory payload) override external {\\n require(msg.sender == address(stargateRouter), \\\"only stargate router can call sgReceive!\\\");\\n\\n }\\n\\n}\",\"keccak256\":\"0x6156bbacb22e1b259bb69e5d37a04079ad8bd5d43b89aa8cd98f70cb07dab907\",\"license\":\"MIT\"},\"contracts/interfaces/IStargateReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.4;\\n\\ninterface IStargateReceiver {\\n function sgReceive(\\n uint16 _chainId,\\n bytes memory _srcAddress,\\n uint256 _nonce,\\n address _token,\\n uint256 amountLD,\\n bytes memory payload\\n ) external;\\n}\\n\",\"keccak256\":\"0x14fb888e3e73a90a0a7ea6da0bd8edc081350cf253aa84318ba0783e07c64397\",\"license\":\"MIT\"},\"contracts/interfaces/IStargateRouter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.4;\\npragma abicoder v2;\\n\\ninterface IStargateRouter {\\n struct lzTxObj {\\n uint256 dstGasForCall;\\n uint256 dstNativeAmount;\\n bytes dstNativeAddr;\\n }\\n\\n function addLiquidity(\\n uint256 _poolId,\\n uint256 _amountLD,\\n address _to\\n ) external;\\n\\n function swap(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLD,\\n uint256 _minAmountLD,\\n lzTxObj memory _lzTxParams,\\n bytes calldata _to,\\n bytes calldata _payload\\n ) external payable;\\n\\n function redeemRemote(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n uint256 _minAmountLD,\\n bytes calldata _to,\\n lzTxObj memory _lzTxParams\\n ) external payable;\\n\\n function instantRedeemLocal(\\n uint16 _srcPoolId,\\n uint256 _amountLP,\\n address _to\\n ) external returns (uint256);\\n\\n function redeemLocal(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress,\\n uint256 _amountLP,\\n bytes calldata _to,\\n lzTxObj memory _lzTxParams\\n ) external payable;\\n\\n function sendCredits(\\n uint16 _dstChainId,\\n uint256 _srcPoolId,\\n uint256 _dstPoolId,\\n address payable _refundAddress\\n ) external payable;\\n\\n function quoteLayerZeroFee(\\n uint16 _dstChainId,\\n uint8 _functionType,\\n bytes calldata _toAddress,\\n bytes calldata _transferAndCallPayload,\\n lzTxObj memory _lzTxParams\\n ) external view returns (uint256, uint256);\\n}\\n\",\"keccak256\":\"0x68a2773e7853ba51d5bb136e9447c9e5b31ec27c38e46861a5956b34e0612c1d\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6080604052600180546001600160a01b031916905534801561002057600080fd5b5060405161072438038061072483398101604081905261003f91610064565b600080546001600160a01b0319166001600160a01b0392909216919091179055610094565b60006020828403121561007657600080fd5b81516001600160a01b038116811461008d57600080fd5b9392505050565b610681806100a36000396000f3fe60806040526004361061003f5760003560e01c80637b4ad01a14610044578063a9e56f3c14610080578063ab8236f3146100a0578063df9b788b146100c2575b600080fd5b34801561005057600080fd5b50600154610064906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b34801561008c57600080fd5b50600054610064906001600160a01b031681565b3480156100ac57600080fd5b506100c06100bb366004610409565b6100d5565b005b6100c06100d03660046104b0565b61014c565b6000546001600160a01b031633146101445760405162461bcd60e51b815260206004820152602860248201527f6f6e6c7920737461726761746520726f757465722063616e2063616c6c207367604482015267526563656976652160c01b606482015260840160405180910390fd5b505050505050565b6040516323b872dd60e01b8152336004820152306024820152620f42406044820152734a0d1092e9df255cf95d72834ea9255132782318906323b872dd906064016020604051808303816000875af11580156101ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d091906104d2565b5060005460405163095ea7b360e01b81526001600160a01b039091166004820152620f42406024820152734a0d1092e9df255cf95d72834ea92551327823189063095ea7b3906044016020604051808303816000875af1158015610238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025c91906104d2565b5060008054604080516060810182526207a12081526020808201859052825180840184526002815261060f60f31b81830152828401529151734e9cd64be5202e40646c6977b82f10d5e47db5b760611b928101929092526001600160a01b0390921692639fbf10fc923492869260019283923392620f424092909160340160408051601f1981840301815260a08301909152606c8083529091906105e060208301396040518b63ffffffff1660e01b815260040161032299989796959493929190610541565b6000604051808303818588803b15801561033b57600080fd5b505af1158015610144573d6000803e3d6000fd5b803561ffff8116811461036157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261038d57600080fd5b813567ffffffffffffffff808211156103a8576103a8610366565b604051601f8301601f19908116603f011681019082821181831017156103d0576103d0610366565b816040528381528660208588010111156103e957600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c0878903121561042257600080fd5b61042b8761034f565b9550602087013567ffffffffffffffff8082111561044857600080fd5b6104548a838b0161037c565b965060408901359550606089013591506001600160a01b038216821461047957600080fd5b9093506080880135925060a0880135908082111561049657600080fd5b506104a389828a0161037c565b9150509295509295509295565b6000602082840312156104c257600080fd5b6104cb8261034f565b9392505050565b6000602082840312156104e457600080fd5b815180151581146104cb57600080fd5b6000815180845260005b8181101561051a576020818501810151868301820152016104fe565b8181111561052c576000602083870101525b50601f01601f19169290920160200192915050565b600061012061ffff8c1683528a602084015289604084015260018060a01b03891660608401528760808401528660a08401528060c0840152855181840152506020850151610140830152604085015160606101608401526105a66101808401826104f4565b905082810360e08401526105ba81866104f4565b90508281036101008401526105cf81856104f4565b9c9b50505050505050505050505056fe307830313631326566383762666364383538363837313630323934623065666661636130636261333432653230303030303030303030303030303030303030303030303036313265663837626663643835383638373136303239346230656666616361306362613334326532a2646970667358221220c49294847b5751605063c8bc9364403a652343887ad17dfe1fcecebc93e7b93f64736f6c634300080c0033", + "deployedBytecode": "0x60806040526004361061003f5760003560e01c80637b4ad01a14610044578063a9e56f3c14610080578063ab8236f3146100a0578063df9b788b146100c2575b600080fd5b34801561005057600080fd5b50600154610064906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b34801561008c57600080fd5b50600054610064906001600160a01b031681565b3480156100ac57600080fd5b506100c06100bb366004610409565b6100d5565b005b6100c06100d03660046104b0565b61014c565b6000546001600160a01b031633146101445760405162461bcd60e51b815260206004820152602860248201527f6f6e6c7920737461726761746520726f757465722063616e2063616c6c207367604482015267526563656976652160c01b606482015260840160405180910390fd5b505050505050565b6040516323b872dd60e01b8152336004820152306024820152620f42406044820152734a0d1092e9df255cf95d72834ea9255132782318906323b872dd906064016020604051808303816000875af11580156101ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d091906104d2565b5060005460405163095ea7b360e01b81526001600160a01b039091166004820152620f42406024820152734a0d1092e9df255cf95d72834ea92551327823189063095ea7b3906044016020604051808303816000875af1158015610238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025c91906104d2565b5060008054604080516060810182526207a12081526020808201859052825180840184526002815261060f60f31b81830152828401529151734e9cd64be5202e40646c6977b82f10d5e47db5b760611b928101929092526001600160a01b0390921692639fbf10fc923492869260019283923392620f424092909160340160408051601f1981840301815260a08301909152606c8083529091906105e060208301396040518b63ffffffff1660e01b815260040161032299989796959493929190610541565b6000604051808303818588803b15801561033b57600080fd5b505af1158015610144573d6000803e3d6000fd5b803561ffff8116811461036157600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261038d57600080fd5b813567ffffffffffffffff808211156103a8576103a8610366565b604051601f8301601f19908116603f011681019082821181831017156103d0576103d0610366565b816040528381528660208588010111156103e957600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c0878903121561042257600080fd5b61042b8761034f565b9550602087013567ffffffffffffffff8082111561044857600080fd5b6104548a838b0161037c565b965060408901359550606089013591506001600160a01b038216821461047957600080fd5b9093506080880135925060a0880135908082111561049657600080fd5b506104a389828a0161037c565b9150509295509295509295565b6000602082840312156104c257600080fd5b6104cb8261034f565b9392505050565b6000602082840312156104e457600080fd5b815180151581146104cb57600080fd5b6000815180845260005b8181101561051a576020818501810151868301820152016104fe565b8181111561052c576000602083870101525b50601f01601f19169290920160200192915050565b600061012061ffff8c1683528a602084015289604084015260018060a01b03891660608401528760808401528660a08401528060c0840152855181840152506020850151610140830152604085015160606101608401526105a66101808401826104f4565b905082810360e08401526105ba81866104f4565b90508281036101008401526105cf81856104f4565b9c9b50505050505050505050505056fe307830313631326566383762666364383538363837313630323934623065666661636130636261333432653230303030303030303030303030303030303030303030303036313265663837626663643835383638373136303239346230656666616361306362613334326532a2646970667358221220c49294847b5751605063c8bc9364403a652343887ad17dfe1fcecebc93e7b93f64736f6c634300080c0033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 7883, + "contract": "contracts/StargateComposed.sol:StargateComposed", + "label": "stargateRouter", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7886, + "contract": "contracts/StargateComposed.sol:StargateComposed", + "label": "OUT_TO_NATIVE", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} diff --git a/packages/verify-contract/test/__data__/deployments/renamed-testnet/GasDropRenamed.json b/packages/verify-contract/test/__data__/deployments/renamed-testnet/GasDropRenamed.json new file mode 100644 index 000000000..cb27b75f6 --- /dev/null +++ b/packages/verify-contract/test/__data__/deployments/renamed-testnet/GasDropRenamed.json @@ -0,0 +1,1110 @@ +{ + "address": "0xf0D195bAc3BFEE439d1d8e6dCfC038e7a3ce5896", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_endpoint", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_reason", + "type": "bytes" + } + ], + "name": "MessageFailed", + "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": true, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "ReceiveGasDrop", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "_payloadHash", + "type": "bytes32" + } + ], + "name": "RetryMessageSuccess", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": true, + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "SendGasDrop", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "_type", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_minDstGas", + "type": "uint256" + } + ], + "name": "SetMinDstGas", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "precrime", + "type": "address" + } + ], + "name": "SetPrecrime", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "SetTrustedRemote", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "SetTrustedRemoteAddress", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_PAYLOAD_SIZE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dstGas", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16[]", + "name": "_dstChainId", + "type": "uint16[]" + }, + { + "internalType": "bytes[]", + "name": "_toAddress", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_amount", + "type": "uint256[]" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_useZro", + "type": "bool" + } + ], + "name": "estimateSendFee", + "outputs": [ + { + "internalType": "uint256", + "name": "nativeFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "zroFee", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "name": "failedMessages", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "forceResumeReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_toAddress", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + } + ], + "name": "gasDrop", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16[]", + "name": "_dstChainId", + "type": "uint16[]" + }, + { + "internalType": "bytes[]", + "name": "_toAddress", + "type": "bytes[]" + }, + { + "internalType": "uint256[]", + "name": "_amount", + "type": "uint256[]" + }, + { + "internalType": "address payable", + "name": "_refundAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_zroPaymentAddress", + "type": "address" + } + ], + "name": "gasDrop", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + } + ], + "name": "getConfig", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + } + ], + "name": "getTrustedRemoteAddress", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + } + ], + "name": "isTrustedRemote", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lzEndpoint", + "outputs": [ + { + "internalType": "contract ILayerZeroEndpoint", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "lzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "minDstGasLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "nonblockingLzReceive", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "payloadSizeLimitLookup", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "precrime", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_srcChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_srcAddress", + "type": "bytes" + }, + { + "internalType": "uint64", + "name": "_nonce", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "_payload", + "type": "bytes" + } + ], + "name": "retryMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_chainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_configType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_config", + "type": "bytes" + } + ], + "name": "setConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_dstGas", + "type": "uint256" + } + ], + "name": "setDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint16", + "name": "_packetType", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_minGas", + "type": "uint256" + } + ], + "name": "setMinDstGas", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_dstChainId", + "type": "uint16" + }, + { + "internalType": "uint256", + "name": "_size", + "type": "uint256" + } + ], + "name": "setPayloadSizeLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_precrime", + "type": "address" + } + ], + "name": "setPrecrime", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setReceiveVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_version", + "type": "uint16" + } + ], + "name": "setSendVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_path", + "type": "bytes" + } + ], + "name": "setTrustedRemote", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_remoteChainId", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_remoteAddress", + "type": "bytes" + } + ], + "name": "setTrustedRemoteAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "name": "trustedRemoteLookup", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xca0971a5bed3df821b2a97e966b63ada6749ff930cc4c5301d17fa12c8335c22", + "receipt": { + "to": null, + "from": "0x28921b09dB1C7add63265e5ec79B008F0851D5DC", + "contractAddress": "0xf0D195bAc3BFEE439d1d8e6dCfC038e7a3ce5896", + "transactionIndex": 1, + "gasUsed": "2599447", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000004000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000200000000000000400000000000000040000000000", + "blockHash": "0x15cbc07325827efa76b958e7b38f27580d73513e86f57147db15d25fdf24710e", + "transactionHash": "0xca0971a5bed3df821b2a97e966b63ada6749ff930cc4c5301d17fa12c8335c22", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 19452088, + "transactionHash": "0xca0971a5bed3df821b2a97e966b63ada6749ff930cc4c5301d17fa12c8335c22", + "address": "0xf0D195bAc3BFEE439d1d8e6dCfC038e7a3ce5896", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000028921b09db1c7add63265e5ec79b008f0851d5dc" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x15cbc07325827efa76b958e7b38f27580d73513e86f57147db15d25fdf24710e" + } + ], + "blockNumber": 19452088, + "cumulativeGasUsed": "2599447", + "status": 1, + "byzantium": true + }, + "args": ["0x6aB5Ae6822647046626e83ee6dB8187151E1d5ab"], + "numDeployments": 1, + "solcInputHash": "0b9d032c4641d4c04b36f0f0f21200c2", + "metadata": "{\"compiler\":{\"version\":\"0.8.12+commit.f00d7308\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_endpoint\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_reason\",\"type\":\"bytes\"}],\"name\":\"MessageFailed\",\"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\":true,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"ReceiveGasDrop\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"_payloadHash\",\"type\":\"bytes32\"}],\"name\":\"RetryMessageSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"SendGasDrop\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_type\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_minDstGas\",\"type\":\"uint256\"}],\"name\":\"SetMinDstGas\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"precrime\",\"type\":\"address\"}],\"name\":\"SetPrecrime\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemote\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"SetTrustedRemoteAddress\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_PAYLOAD_SIZE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VERSION\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dstGas\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16[]\",\"name\":\"_dstChainId\",\"type\":\"uint16[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_toAddress\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amount\",\"type\":\"uint256[]\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_useZro\",\"type\":\"bool\"}],\"name\":\"estimateSendFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"nativeFee\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"zroFee\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"name\":\"failedMessages\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"forceResumeReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_toAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"}],\"name\":\"gasDrop\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16[]\",\"name\":\"_dstChainId\",\"type\":\"uint16[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_toAddress\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amount\",\"type\":\"uint256[]\"},{\"internalType\":\"address payable\",\"name\":\"_refundAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_zroPaymentAddress\",\"type\":\"address\"}],\"name\":\"gasDrop\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"}],\"name\":\"getConfig\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"}],\"name\":\"getTrustedRemoteAddress\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"}],\"name\":\"isTrustedRemote\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lzEndpoint\",\"outputs\":[{\"internalType\":\"contract ILayerZeroEndpoint\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"lzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"minDstGasLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"nonblockingLzReceive\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"payloadSizeLimitLookup\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"precrime\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_srcChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_srcAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"_nonce\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"_payload\",\"type\":\"bytes\"}],\"name\":\"retryMessage\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_chainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_configType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_config\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dstGas\",\"type\":\"uint256\"}],\"name\":\"setDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint16\",\"name\":\"_packetType\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_minGas\",\"type\":\"uint256\"}],\"name\":\"setMinDstGas\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_dstChainId\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"}],\"name\":\"setPayloadSizeLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_precrime\",\"type\":\"address\"}],\"name\":\"setPrecrime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setReceiveVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_version\",\"type\":\"uint16\"}],\"name\":\"setSendVersion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_path\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemote\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_remoteChainId\",\"type\":\"uint16\"},{\"internalType\":\"bytes\",\"name\":\"_remoteAddress\",\"type\":\"bytes\"}],\"name\":\"setTrustedRemoteAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"trustedRemoteLookup\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"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.\"},\"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/examples/GasDrop.sol\":\"GasDrop\"},\"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/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\"},\"contracts/examples/GasDrop.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../lzApp/NonblockingLzApp.sol\\\";\\n\\ncontract GasDrop is NonblockingLzApp {\\n uint16 public constant VERSION = 2;\\n uint public dstGas = 25000;\\n\\n event SendGasDrop(uint16 indexed _dstChainId, address indexed _from, bytes indexed _toAddress, uint _amount);\\n event ReceiveGasDrop(uint16 indexed _srcChainId, address indexed _from, bytes indexed _toAddress, uint _amount);\\n\\n constructor(address _endpoint) NonblockingLzApp(_endpoint) {}\\n\\n function estimateSendFee(uint16 _dstChainId, bytes memory _toAddress, uint _amount, bool _useZro) external view virtual returns (uint nativeFee, uint zroFee) {\\n bytes memory adapterParams = abi.encodePacked(VERSION, dstGas, _amount, _toAddress);\\n bytes memory payload = abi.encode(_amount, msg.sender, _toAddress);\\n return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, adapterParams);\\n }\\n\\n function estimateSendFee(uint16[] memory _dstChainId, bytes[] memory _toAddress, uint[] memory _amount, bool _useZro) external view virtual returns (uint nativeFee, uint zroFee) {\\n require(_dstChainId.length == _toAddress.length, \\\"_dstChainId and _toAddress must be same size\\\");\\n require(_toAddress.length == _amount.length, \\\"_dstChainId and _toAddress must be same size\\\");\\n for(uint i = 0; i < _dstChainId.length; i++) {\\n bytes memory adapterParams = abi.encodePacked(VERSION, dstGas, _amount[i], _toAddress[i]);\\n bytes memory payload = abi.encode(_amount[i], msg.sender, _toAddress[i]);\\n (uint native, uint zro) = lzEndpoint.estimateFees(_dstChainId[i], address(this), payload, _useZro, adapterParams);\\n nativeFee += native;\\n zroFee += zro;\\n }\\n }\\n\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory, uint64, bytes memory _payload) internal virtual override {\\n (uint amount, address fromAddress, bytes memory toAddress) = abi.decode(_payload, (uint, address, bytes));\\n emit ReceiveGasDrop(_srcChainId, fromAddress, toAddress, amount);\\n }\\n\\n function gasDrop(uint16 _dstChainId, bytes memory _toAddress, uint _amount, address payable _refundAddress, address _zroPaymentAddress) external payable virtual {\\n bytes memory adapterParams = abi.encodePacked(VERSION, dstGas, _amount, _toAddress);\\n bytes memory payload = abi.encode(_amount, msg.sender, _toAddress);\\n _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, adapterParams, msg.value);\\n emit SendGasDrop(_dstChainId, msg.sender, _toAddress, _amount);\\n }\\n\\n function gasDrop(uint16[] memory _dstChainId, bytes[] memory _toAddress, uint[] memory _amount, address payable _refundAddress, address _zroPaymentAddress) external payable virtual {\\n require(_dstChainId.length == _toAddress.length, \\\"_dstChainId and _toAddress must be same size\\\");\\n require(_toAddress.length == _amount.length, \\\"_dstChainId and _toAddress must be same size\\\");\\n for(uint i = 0; i < _dstChainId.length; i++) {\\n bytes memory adapterParams = abi.encodePacked(VERSION, dstGas, _amount[i], _toAddress[i]);\\n bytes memory payload = abi.encode(_amount[i], msg.sender, _toAddress[i]);\\n address payable refundAddress = (i == _dstChainId.length - 1) ? _refundAddress : payable(address(this));\\n _lzSend(_dstChainId[i], payload, refundAddress, _zroPaymentAddress, adapterParams, address(this).balance);\\n emit SendGasDrop(_dstChainId[i], msg.sender, _toAddress[i], _amount[i]);\\n }\\n }\\n\\n function setDstGas(uint _dstGas) external onlyOwner {\\n dstGas = _dstGas;\\n }\\n\\n // Needed for contract to accept ETH\\n receive() external payable {}\\n}\",\"keccak256\":\"0xeb6a6fb2a55f3ce7e5569d98a01d33d87e466223aa8a249208693d48b56fa4b1\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroEndpoint.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\nimport \\\"./ILayerZeroUserApplicationConfig.sol\\\";\\n\\ninterface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {\\n // @notice send a LayerZero message to the specified address at a LayerZero endpoint.\\n // @param _dstChainId - the destination chain identifier\\n // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains\\n // @param _payload - a custom bytes payload to send to the destination contract\\n // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address\\n // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction\\n // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination\\n function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;\\n\\n // @notice used by the messaging library to publish verified payload\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source contract (as bytes) at the source chain\\n // @param _dstAddress - the address on destination chain\\n // @param _nonce - the unbound message ordering nonce\\n // @param _gasLimit - the gas limit for external contract execution\\n // @param _payload - verified payload to send to the destination contract\\n function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;\\n\\n // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);\\n\\n // @notice get the outboundNonce from this source chain which, consequently, is always an EVM\\n // @param _srcAddress - the source chain contract address\\n function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);\\n\\n // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery\\n // @param _dstChainId - the destination chain identifier\\n // @param _userApplication - the user app address on this EVM chain\\n // @param _payload - the custom message to send over LayerZero\\n // @param _payInZRO - if false, user app pays the protocol fee in native token\\n // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain\\n function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);\\n\\n // @notice get this Endpoint's immutable source identifier\\n function getChainId() external view returns (uint16);\\n\\n // @notice the interface to retry failed message on this Endpoint destination\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n // @param _payload - the payload to be retried\\n function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;\\n\\n // @notice query if any STORED payload (message blocking) at the endpoint.\\n // @param _srcChainId - the source chain identifier\\n // @param _srcAddress - the source chain contract address\\n function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);\\n\\n // @notice query if the _libraryAddress is valid for sending msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getSendLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the _libraryAddress is valid for receiving msgs.\\n // @param _userApplication - the user app address on this EVM chain\\n function getReceiveLibraryAddress(address _userApplication) external view returns (address);\\n\\n // @notice query if the non-reentrancy guard for send() is on\\n // @return true if the guard is on. false otherwise\\n function isSendingPayload() external view returns (bool);\\n\\n // @notice query if the non-reentrancy guard for receive() is on\\n // @return true if the guard is on. false otherwise\\n function isReceivingPayload() external view returns (bool);\\n\\n // @notice get the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _userApplication - the contract address of the user application\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);\\n\\n // @notice get the send() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getSendVersion(address _userApplication) external view returns (uint16);\\n\\n // @notice get the lzReceive() LayerZero messaging library version\\n // @param _userApplication - the contract address of the user application\\n function getReceiveVersion(address _userApplication) external view returns (uint16);\\n}\\n\",\"keccak256\":\"0xe9617a9f6db351b6ac4c9d5b1097798af59ad7f813e370e8cf69bb44addd8548\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroReceiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroReceiver {\\n // @notice LayerZero endpoint will invoke this function to deliver the message on the destination\\n // @param _srcChainId - the source endpoint identifier\\n // @param _srcAddress - the source sending contract address from the source chain\\n // @param _nonce - the ordered message nonce\\n // @param _payload - the signed payload is the UA bytes has encoded to be sent\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;\\n}\\n\",\"keccak256\":\"0x909bf72002c91806f39a64172c12b4188219e8649deefbe8d862604d4f9d3faf\",\"license\":\"MIT\"},\"contracts/interfaces/ILayerZeroUserApplicationConfig.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity >=0.5.0;\\n\\ninterface ILayerZeroUserApplicationConfig {\\n // @notice set the configuration of the LayerZero messaging library of the specified version\\n // @param _version - messaging library version\\n // @param _chainId - the chainId for the pending config change\\n // @param _configType - type of configuration. every messaging library has its own convention.\\n // @param _config - configuration in the bytes. can encode arbitrary content.\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;\\n\\n // @notice set the send() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setSendVersion(uint16 _version) external;\\n\\n // @notice set the lzReceive() LayerZero messaging library version to _version\\n // @param _version - new messaging library version\\n function setReceiveVersion(uint16 _version) external;\\n\\n // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload\\n // @param _srcChainId - the chainId of the source chain\\n // @param _srcAddress - the contract address of the source contract at the source chain\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;\\n}\\n\",\"keccak256\":\"0xe3e50134e39aa3c0f916447d36367970c6e4df972d488b794227e0b052ce80d5\",\"license\":\"MIT\"},\"contracts/lzApp/LzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"../interfaces/ILayerZeroReceiver.sol\\\";\\nimport \\\"../interfaces/ILayerZeroUserApplicationConfig.sol\\\";\\nimport \\\"../interfaces/ILayerZeroEndpoint.sol\\\";\\nimport \\\"../util/BytesLib.sol\\\";\\n\\n/*\\n * a generic LzReceiver implementation\\n */\\nabstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {\\n using BytesLib for bytes;\\n\\n // ua can not send payload larger than this by default, but it can be changed by the ua owner\\n uint constant public DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;\\n\\n ILayerZeroEndpoint public immutable lzEndpoint;\\n mapping(uint16 => bytes) public trustedRemoteLookup;\\n mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;\\n mapping(uint16 => uint) public payloadSizeLimitLookup;\\n address public precrime;\\n\\n event SetPrecrime(address precrime);\\n event SetTrustedRemote(uint16 _remoteChainId, bytes _path);\\n event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);\\n event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);\\n\\n constructor(address _endpoint) {\\n lzEndpoint = ILayerZeroEndpoint(_endpoint);\\n }\\n\\n function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual override {\\n // lzReceive must be called by the endpoint for security\\n require(_msgSender() == address(lzEndpoint), \\\"LzApp: invalid endpoint caller\\\");\\n\\n bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];\\n // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.\\n require(_srcAddress.length == trustedRemote.length && trustedRemote.length > 0 && keccak256(_srcAddress) == keccak256(trustedRemote), \\\"LzApp: invalid source sending contract\\\");\\n\\n _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams, uint _nativeFee) internal virtual {\\n bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];\\n require(trustedRemote.length != 0, \\\"LzApp: destination chain is not a trusted source\\\");\\n _checkPayloadSize(_dstChainId, _payload.length);\\n lzEndpoint.send{value: _nativeFee}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);\\n }\\n\\n function _checkGasLimit(uint16 _dstChainId, uint16 _type, bytes memory _adapterParams, uint _extraGas) internal view virtual {\\n uint providedGasLimit = _getGasLimit(_adapterParams);\\n uint minGasLimit = minDstGasLookup[_dstChainId][_type] + _extraGas;\\n require(minGasLimit > 0, \\\"LzApp: minGasLimit not set\\\");\\n require(providedGasLimit >= minGasLimit, \\\"LzApp: gas limit is too low\\\");\\n }\\n\\n function _getGasLimit(bytes memory _adapterParams) internal pure virtual returns (uint gasLimit) {\\n require(_adapterParams.length >= 34, \\\"LzApp: invalid adapterParams\\\");\\n assembly {\\n gasLimit := mload(add(_adapterParams, 34))\\n }\\n }\\n\\n function _checkPayloadSize(uint16 _dstChainId, uint _payloadSize) internal view virtual {\\n uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];\\n if (payloadSizeLimit == 0) { // use default if not set\\n payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;\\n }\\n require(_payloadSize <= payloadSizeLimit, \\\"LzApp: payload size is too large\\\");\\n }\\n\\n //---------------------------UserApplication config----------------------------------------\\n function getConfig(uint16 _version, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {\\n return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);\\n }\\n\\n // generic config for LayerZero user Application\\n function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {\\n lzEndpoint.setConfig(_version, _chainId, _configType, _config);\\n }\\n\\n function setSendVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setSendVersion(_version);\\n }\\n\\n function setReceiveVersion(uint16 _version) external override onlyOwner {\\n lzEndpoint.setReceiveVersion(_version);\\n }\\n\\n function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {\\n lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);\\n }\\n\\n // _path = abi.encodePacked(remoteAddress, localAddress)\\n // this function set the trusted path for the cross-chain communication\\n function setTrustedRemote(uint16 _remoteChainId, bytes calldata _path) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = _path;\\n emit SetTrustedRemote(_remoteChainId, _path);\\n }\\n\\n function setTrustedRemoteAddress(uint16 _remoteChainId, bytes calldata _remoteAddress) external onlyOwner {\\n trustedRemoteLookup[_remoteChainId] = abi.encodePacked(_remoteAddress, address(this));\\n emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);\\n }\\n\\n function getTrustedRemoteAddress(uint16 _remoteChainId) external view returns (bytes memory) {\\n bytes memory path = trustedRemoteLookup[_remoteChainId];\\n require(path.length != 0, \\\"LzApp: no trusted path record\\\");\\n return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)\\n }\\n\\n function setPrecrime(address _precrime) external onlyOwner {\\n precrime = _precrime;\\n emit SetPrecrime(_precrime);\\n }\\n\\n function setMinDstGas(uint16 _dstChainId, uint16 _packetType, uint _minGas) external onlyOwner {\\n require(_minGas > 0, \\\"LzApp: invalid minGas\\\");\\n minDstGasLookup[_dstChainId][_packetType] = _minGas;\\n emit SetMinDstGas(_dstChainId, _packetType, _minGas);\\n }\\n\\n // if the size is 0, it means default size limit\\n function setPayloadSizeLimit(uint16 _dstChainId, uint _size) external onlyOwner {\\n payloadSizeLimitLookup[_dstChainId] = _size;\\n }\\n\\n //--------------------------- VIEW FUNCTION ----------------------------------------\\n function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {\\n bytes memory trustedSource = trustedRemoteLookup[_srcChainId];\\n return keccak256(trustedSource) == keccak256(_srcAddress);\\n }\\n}\\n\",\"keccak256\":\"0xdcf824e4bd747296fa38dbce9f8250514ce24e53cff79909a785e0923274de4a\",\"license\":\"MIT\"},\"contracts/lzApp/NonblockingLzApp.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./LzApp.sol\\\";\\nimport \\\"../util/ExcessivelySafeCall.sol\\\";\\n\\n/*\\n * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel\\n * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking\\n * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)\\n */\\nabstract contract NonblockingLzApp is LzApp {\\n using ExcessivelySafeCall for address;\\n\\n constructor(address _endpoint) LzApp(_endpoint) {}\\n\\n mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;\\n\\n event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload, bytes _reason);\\n event RetryMessageSuccess(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes32 _payloadHash);\\n\\n // overriding the virtual function in LzReceiver\\n function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {\\n (bool success, bytes memory reason) = address(this).excessivelySafeCall(gasleft(), 150, abi.encodeWithSelector(this.nonblockingLzReceive.selector, _srcChainId, _srcAddress, _nonce, _payload));\\n // try-catch all errors/exceptions\\n if (!success) {\\n _storeFailedMessage(_srcChainId, _srcAddress, _nonce, _payload, reason);\\n }\\n }\\n\\n function _storeFailedMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload, bytes memory _reason) internal virtual {\\n failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);\\n emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);\\n }\\n\\n function nonblockingLzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public virtual {\\n // only internal transaction\\n require(_msgSender() == address(this), \\\"NonblockingLzApp: caller must be LzApp\\\");\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n }\\n\\n //@notice override this function\\n function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;\\n\\n function retryMessage(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) public payable virtual {\\n // assert there is message to retry\\n bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];\\n require(payloadHash != bytes32(0), \\\"NonblockingLzApp: no stored message\\\");\\n require(keccak256(_payload) == payloadHash, \\\"NonblockingLzApp: invalid payload\\\");\\n // clear the stored message\\n failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);\\n // execute the message. revert if it fails again\\n _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);\\n emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);\\n }\\n}\\n\",\"keccak256\":\"0x2afd4980a5850f45f2c4d7ec44d77b292a51b80f847566479548f89572065311\",\"license\":\"MIT\"},\"contracts/util/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: Unlicense\\n/*\\n * @title Solidity Bytes Arrays Utils\\n * @author Gon\\u00e7alo S\\u00e1 \\n *\\n * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.\\n * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.\\n */\\npragma solidity >=0.8.0 <0.9.0;\\n\\n\\nlibrary BytesLib {\\n function concat(\\n bytes memory _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(0x40, and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n ))\\n }\\n\\n return tempBytes;\\n }\\n\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes) internal {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let mlengthmod := mod(mlength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n )\\n internal\\n pure\\n returns (bytes memory)\\n {\\n require(_length + 31 >= _length, \\\"slice_overflow\\\");\\n require(_bytes.length >= _start + _length, \\\"slice_outOfBounds\\\");\\n\\n bytes memory tempBytes;\\n\\n assembly {\\n switch iszero(_length)\\n case 0 {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // The first word of the slice result is potentially a partial\\n // word read from the original array. To read it, we calculate\\n // the length of that partial word and start copying that many\\n // bytes into the array. The first word we copy will start with\\n // data we don't care about, but the last `lengthmod` bytes will\\n // land at the beginning of the contents of the new array. When\\n // we're done copying, we overwrite the full first word with\\n // the actual length of the slice.\\n let lengthmod := and(_length, 31)\\n\\n // The multiplication in the next line is necessary\\n // because when slicing multiples of 32 bytes (lengthmod == 0)\\n // the following copy loop was copying the origin's length\\n // and then ending prematurely not copying everything it should.\\n let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))\\n let end := add(mc, _length)\\n\\n for {\\n // The multiplication in the next line has the same exact purpose\\n // as the one above.\\n let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n mstore(tempBytes, _length)\\n\\n //update free-memory pointer\\n //allocating the array padded to 32 bytes like the compiler does now\\n mstore(0x40, and(add(mc, 31), not(31)))\\n }\\n //if we want a zero-length slice let's just return a zero-length array\\n default {\\n tempBytes := mload(0x40)\\n //zero out the 32 bytes slice we are about to return\\n //we need to do it because Solidity does not garbage collect\\n mstore(tempBytes, 0)\\n\\n mstore(0x40, add(tempBytes, 0x20))\\n }\\n }\\n\\n return tempBytes;\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {\\n require(_bytes.length >= _start + 20, \\\"toAddress_outOfBounds\\\");\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start) internal pure returns (uint8) {\\n require(_bytes.length >= _start + 1 , \\\"toUint8_outOfBounds\\\");\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint16(bytes memory _bytes, uint256 _start) internal pure returns (uint16) {\\n require(_bytes.length >= _start + 2, \\\"toUint16_outOfBounds\\\");\\n uint16 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x2), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint32(bytes memory _bytes, uint256 _start) internal pure returns (uint32) {\\n require(_bytes.length >= _start + 4, \\\"toUint32_outOfBounds\\\");\\n uint32 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x4), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint64(bytes memory _bytes, uint256 _start) internal pure returns (uint64) {\\n require(_bytes.length >= _start + 8, \\\"toUint64_outOfBounds\\\");\\n uint64 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x8), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint96(bytes memory _bytes, uint256 _start) internal pure returns (uint96) {\\n require(_bytes.length >= _start + 12, \\\"toUint96_outOfBounds\\\");\\n uint96 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0xc), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint128(bytes memory _bytes, uint256 _start) internal pure returns (uint128) {\\n require(_bytes.length >= _start + 16, \\\"toUint128_outOfBounds\\\");\\n uint128 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x10), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint256(bytes memory _bytes, uint256 _start) internal pure returns (uint256) {\\n require(_bytes.length >= _start + 32, \\\"toUint256_outOfBounds\\\");\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32) {\\n require(_bytes.length >= _start + 32, \\\"toBytes32_outOfBounds\\\");\\n bytes32 tempBytes32;\\n\\n assembly {\\n tempBytes32 := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempBytes32;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes) internal pure returns (bool) {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function equalStorage(\\n bytes storage _preBytes,\\n bytes memory _postBytes\\n )\\n internal\\n view\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)), 2)\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint256(mc < end) + cb == 2)\\n for {} eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n}\\n\",\"keccak256\":\"0x2255aadad70e87ed42b158776330175644b07fbbc7e77ed32cd6330974abbcee\",\"license\":\"Unlicense\"},\"contracts/util/ExcessivelySafeCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT OR Apache-2.0\\npragma solidity >=0.7.6;\\n\\nlibrary ExcessivelySafeCall {\\n uint256 constant LOW_28_MASK =\\n 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := call(\\n _gas, // gas\\n _target, // recipient\\n 0, // ether value\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /// @notice Use when you _really_ really _really_ don't trust the called\\n /// contract. This prevents the called contract from causing reversion of\\n /// the caller in as many ways as we can.\\n /// @dev The main difference between this and a solidity low-level call is\\n /// that we limit the number of bytes that the callee can cause to be\\n /// copied to caller memory. This prevents stupid things like malicious\\n /// contracts returning 10,000,000 bytes causing a local OOG when copying\\n /// to memory.\\n /// @param _target The address to call\\n /// @param _gas The amount of gas to forward to the remote contract\\n /// @param _maxCopy The maximum number of bytes of returndata to copy\\n /// to memory.\\n /// @param _calldata The data to send to the remote contract\\n /// @return success and returndata, as `.call()`. Returndata is capped to\\n /// `_maxCopy` bytes.\\n function excessivelySafeStaticCall(\\n address _target,\\n uint256 _gas,\\n uint16 _maxCopy,\\n bytes memory _calldata\\n ) internal view returns (bool, bytes memory) {\\n // set up for assembly call\\n uint256 _toCopy;\\n bool _success;\\n bytes memory _returnData = new bytes(_maxCopy);\\n // dispatch message to recipient\\n // by assembly calling \\\"handle\\\" function\\n // we call via assembly to avoid memcopying a very large returndata\\n // returned by a malicious contract\\n assembly {\\n _success := staticcall(\\n _gas, // gas\\n _target, // recipient\\n add(_calldata, 0x20), // inloc\\n mload(_calldata), // inlen\\n 0, // outloc\\n 0 // outlen\\n )\\n // limit our copy to 256 bytes\\n _toCopy := returndatasize()\\n if gt(_toCopy, _maxCopy) {\\n _toCopy := _maxCopy\\n }\\n // Store the length of the copied bytes\\n mstore(_returnData, _toCopy)\\n // copy the bytes from returndata[0:_toCopy]\\n returndatacopy(add(_returnData, 0x20), 0, _toCopy)\\n }\\n return (_success, _returnData);\\n }\\n\\n /**\\n * @notice Swaps function selectors in encoded contract calls\\n * @dev Allows reuse of encoded calldata for functions with identical\\n * argument types but different names. It simply swaps out the first 4 bytes\\n * for the new selector. This function modifies memory in place, and should\\n * only be used with caution.\\n * @param _newSelector The new 4-byte selector\\n * @param _buf The encoded contract args\\n */\\n function swapSelector(bytes4 _newSelector, bytes memory _buf)\\n internal\\n pure\\n {\\n require(_buf.length >= 4);\\n uint256 _mask = LOW_28_MASK;\\n assembly {\\n // load the first word of\\n let _word := mload(add(_buf, 0x20))\\n // mask out the top 4 bytes\\n // /x\\n _word := and(_word, _mask)\\n _word := or(_newSelector, _word)\\n mstore(add(_buf, 0x20), _word)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x23942250ddd277c443fa27c6b4ab51e6b3b5e654548b6b9e8d785a88ebec4dfe\",\"license\":\"MIT OR Apache-2.0\"}},\"version\":1}", + "bytecode": "0x60a06040526161a86006553480156200001757600080fd5b5060405162002e6f38038062002e6f8339810160408190526200003a91620000ac565b808062000047336200005c565b6001600160a01b031660805250620000de9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000bf57600080fd5b81516001600160a01b0381168114620000d757600080fd5b9392505050565b608051612d36620001396000396000818161052201528181610678015281816108c70152818161096f01528181610a9e01528181610e5b0152818161137601528181611722015281816118b20152611b2f0152612d366000f3fe6080604052600436106101e65760003560e01c80638cfd8f5c11610102578063cbed8b9c11610095578063eb8d72b711610064578063eb8d72b7146105ed578063f2fde38b1461060d578063f5ecbdbc1461062d578063ffa1ad741461064d57600080fd5b8063cbed8b9c1461057a578063d1deba1f1461059a578063df2a5b3b146105ad578063e3ee7ed7146105cd57600080fd5b8063a6c3d165116100d1578063a6c3d165146104f0578063b353aaa714610510578063baf3292d14610544578063c44618341461056457600080fd5b80638cfd8f5c146104465780638da5cb5b1461047e578063950c8a74146104b05780639f38369a146104d057600080fd5b806342d65a8d1161017a578063715018a611610149578063715018a6146103bc5780637533d788146103d15780637eec463b146103fe57806389be3eb61461043357600080fd5b806342d65a8d1461031a5780634915937e1461033a5780635b8c41e61461034d57806366ad5c8a1461039c57600080fd5b80633b4592f2116101b65780633b4592f2146102745780633d8b38f6146102945780633e1be1f8146102c95780633f1f4fa4146102ed57600080fd5b80621d3567146101f257806307e0db17146102145780630df374831461023457806310ddb1371461025457600080fd5b366101ed57005b600080fd5b3480156101fe57600080fd5b5061021261020d36600461209a565b610675565b005b34801561022057600080fd5b5061021261022f36600461212d565b6108a6565b34801561024057600080fd5b5061021261024f366004612148565b61092f565b34801561026057600080fd5b5061021261026f36600461212d565b61094e565b34801561028057600080fd5b5061021261028f366004612172565b6109a6565b3480156102a057600080fd5b506102b46102af36600461218b565b6109b3565b60405190151581526020015b60405180910390f35b3480156102d557600080fd5b506102df60065481565b6040519081526020016102c0565b3480156102f957600080fd5b506102df61030836600461212d565b60036020526000908152604090205481565b34801561032657600080fd5b5061021261033536600461218b565b610a7f565b6102126103483660046122b5565b610b05565b34801561035957600080fd5b506102df610368366004612333565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156103a857600080fd5b506102126103b736600461209a565b610bc2565b3480156103c857600080fd5b50610212610c9e565b3480156103dd57600080fd5b506103f16103ec36600461212d565b610cb2565b6040516102c091906123ec565b34801561040a57600080fd5b5061041e610419366004612579565b610d4c565b604080519283526020830191909152016102c0565b610212610441366004612611565b610f44565b34801561045257600080fd5b506102df6104613660046126a2565b600260209081526000928352604080842090915290825290205481565b34801561048a57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016102c0565b3480156104bc57600080fd5b50600454610498906001600160a01b031681565b3480156104dc57600080fd5b506103f16104eb36600461212d565b611151565b3480156104fc57600080fd5b5061021261050b36600461218b565b611268565b34801561051c57600080fd5b506104987f000000000000000000000000000000000000000000000000000000000000000081565b34801561055057600080fd5b5061021261055f3660046126d5565b6112fb565b34801561057057600080fd5b506102df61271081565b34801561058657600080fd5b506102126105953660046126f2565b611357565b6102126105a836600461209a565b6113ec565b3480156105b957600080fd5b506102126105c8366004612760565b611602565b3480156105d957600080fd5b5061041e6105e836600461279c565b6116b4565b3480156105f957600080fd5b5061021261060836600461218b565b6117ae565b34801561061957600080fd5b506102126106283660046126d5565b611808565b34801561063957600080fd5b506103f16106483660046127f8565b611881565b34801561065957600080fd5b50610662600281565b60405161ffff90911681526020016102c0565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146106f25760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461071090612845565b80601f016020809104026020016040519081016040528092919081815260200182805461073c90612845565b80156107895780601f1061075e57610100808354040283529160200191610789565b820191906000526020600020905b81548152906001019060200180831161076c57829003601f168201915b505050505090508051868690501480156107a4575060008151115b80156107cc5750805160208201206040516107c29088908890612880565b6040518091039020145b6108275760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b60648201526084016106e9565b61089d8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061193292505050565b50505050505050565b6108ae6119ab565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b15801561091457600080fd5b505af1158015610928573d6000803e3d6000fd5b5050505050565b6109376119ab565b61ffff909116600090815260036020526040902055565b6109566119ab565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb137906024016108fa565b6109ae6119ab565b600655565b61ffff8316600090815260016020526040812080548291906109d490612845565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0090612845565b8015610a4d5780601f10610a2257610100808354040283529160200191610a4d565b820191906000526020600020905b815481529060010190602001808311610a3057829003601f168201915b505050505090508383604051610a64929190612880565b60405180910390208180519060200120149150509392505050565b610a876119ab565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610ad7908690869086906004016128b9565b600060405180830381600087803b158015610af157600080fd5b505af115801561089d573d6000803e3d6000fd5b600060026006548587604051602001610b2194939291906128d7565b60405160208183030381529060405290506000843387604051602001610b4993929190612915565b6040516020818303038152906040529050610b68878286868634611a05565b85604051610b76919061293f565b60405190819003812086825290339061ffff8a16907f61f260f3550ed2f4f577ac21fb33baf5257f44da023d19ce285b7139a65f239a906020015b60405180910390a450505050505050565b333014610c205760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b60648201526084016106e9565b610c968686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f890181900481028201810190925287815289935091508790879081908401838280828437600092019190915250611bab92505050565b505050505050565b610ca66119ab565b610cb06000611c20565b565b60016020526000908152604090208054610ccb90612845565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf790612845565b8015610d445780601f10610d1957610100808354040283529160200191610d44565b820191906000526020600020905b815481529060010190602001808311610d2757829003601f168201915b505050505081565b6000808451865114610d705760405162461bcd60e51b81526004016106e99061295b565b8351855114610d915760405162461bcd60e51b81526004016106e99061295b565b60005b8651811015610f3a5760006002600654878481518110610db657610db66129a7565b6020026020010151898581518110610dd057610dd06129a7565b6020026020010151604051602001610deb94939291906128d7565b60405160208183030381529060405290506000868381518110610e1057610e106129a7565b602002602001015133898581518110610e2b57610e2b6129a7565b6020026020010151604051602001610e4593929190612915565b60405160208183030381529060405290506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340a7bb108c8781518110610e9a57610e9a6129a7565b602002602001015130868c896040518663ffffffff1660e01b8152600401610ec69594939291906129bd565b6040805180830381865afa158015610ee2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f069190612a11565b9092509050610f158288612a4b565b9650610f218187612a4b565b9550505050508080610f3290612a63565b915050610d94565b5094509492505050565b8351855114610f655760405162461bcd60e51b81526004016106e99061295b565b8251845114610f865760405162461bcd60e51b81526004016106e99061295b565b60005b8551811015610c965760006002600654868481518110610fab57610fab6129a7565b6020026020010151888581518110610fc557610fc56129a7565b6020026020010151604051602001610fe094939291906128d7565b60405160208183030381529060405290506000858381518110611005576110056129a7565b602002602001015133888581518110611020576110206129a7565b602002602001015160405160200161103a93929190612915565b604051602081830303815290604052905060006001895161105b9190612a7e565b84146110675730611069565b855b9050611092898581518110611080576110806129a7565b60200260200101518383888747611a05565b8784815181106110a4576110a46129a7565b60200260200101516040516110b9919061293f565b6040518091039020336001600160a01b03168a86815181106110dd576110dd6129a7565b602002602001015161ffff167f61f260f3550ed2f4f577ac21fb33baf5257f44da023d19ce285b7139a65f239a8a888151811061111c5761111c6129a7565b602002602001015160405161113391815260200190565b60405180910390a4505050808061114990612a63565b915050610f89565b61ffff811660009081526001602052604081208054606092919061117490612845565b80601f01602080910402602001604051908101604052809291908181526020018280546111a090612845565b80156111ed5780601f106111c2576101008083540402835291602001916111ed565b820191906000526020600020905b8154815290600101906020018083116111d057829003601f168201915b505050505090508051600014156112465760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f726400000060448201526064016106e9565b6112616000601483516112599190612a7e565b839190611c70565b9392505050565b6112706119ab565b81813060405160200161128593929190612a95565b60408051601f1981840301815291815261ffff851660009081526001602090815291902082516112ba93919290910190611f17565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce8383836040516112ee939291906128b9565b60405180910390a1505050565b6113036119ab565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b61135f6119ab565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c906113b39088908890889088908890600401612abb565b600060405180830381600087803b1580156113cd57600080fd5b505af11580156113e1573d6000803e3d6000fd5b505050505050505050565b61ffff8616600090815260056020526040808220905161140f9088908890612880565b90815260408051602092819003830190206001600160401b0387166000908152925290205490508061148f5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b60648201526084016106e9565b8083836040516114a0929190612880565b6040518091039020146114ff5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b60648201526084016106e9565b61ffff871660009081526005602052604080822090516115229089908990612880565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f880182900482028301820190528682526115ba918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a935091508890889081908401838280828437600092019190915250611bab92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e587878787856040516115f1959493929190612af4565b60405180910390a150505050505050565b61160a6119ab565b600081116116525760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b60448201526064016106e9565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac0906060016112ee565b6000806000600260065486886040516020016116d394939291906128d7565b604051602081830303815290604052905060008533886040516020016116fb93929190612915565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb109061175f908b90309086908b9089906004016129bd565b6040805180830381865afa15801561177b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179f9190612a11565b93509350505094509492505050565b6117b66119ab565b61ffff831660009081526001602052604090206117d4908383611f9b565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab8383836040516112ee939291906128b9565b6118106119ab565b6001600160a01b0381166118755760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e9565b61187e81611c20565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611901573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119299190810190612b7c565b95945050505050565b6000806119955a60966366ad5c8a60e01b8989898960405160240161195a9493929190612bb0565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190611d7d565b9150915081610c9657610c968686868685611e07565b6000546001600160a01b03163314610cb05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e9565b61ffff861660009081526001602052604081208054611a2390612845565b80601f0160208091040260200160405190810160405280929190818152602001828054611a4f90612845565b8015611a9c5780601f10611a7157610100808354040283529160200191611a9c565b820191906000526020600020905b815481529060010190602001808311611a7f57829003601f168201915b50505050509050805160001415611b0e5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b60648201526084016106e9565b611b19878751611ea4565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490611b70908b9086908c908c908c908c90600401612bee565b6000604051808303818588803b158015611b8957600080fd5b505af1158015611b9d573d6000803e3d6000fd5b505050505050505050505050565b600080600083806020019051810190611bc49190612c55565b92509250925080604051611bd8919061293f565b6040518091039020826001600160a01b03168861ffff167f72b2a62c1045e48221f301d9352d5773acbb1f5e6d6e7657b2622fef3f00446b86604051610bb191815260200190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606081611c7e81601f612a4b565b1015611cbd5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016106e9565b611cc78284612a4b565b84511015611d0b5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016106e9565b606082158015611d2a5760405191506000825260208201604052611d74565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611d63578051835260209283019201611d4b565b5050858452601f01601f1916604052505b50949350505050565b6000606060008060008661ffff166001600160401b03811115611da257611da26121dd565b6040519080825280601f01601f191660200182016040528015611dcc576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115611dee578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051611e38919061293f565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90611e959087908790879087908790612cae565b60405180910390a15050505050565b61ffff821660009081526003602052604090205480611ec257506127105b80821115611f125760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c6172676560448201526064016106e9565b505050565b828054611f2390612845565b90600052602060002090601f016020900481019282611f455760008555611f8b565b82601f10611f5e57805160ff1916838001178555611f8b565b82800160010185558215611f8b579182015b82811115611f8b578251825591602001919060010190611f70565b50611f9792915061200f565b5090565b828054611fa790612845565b90600052602060002090601f016020900481019282611fc95760008555611f8b565b82601f10611fe25782800160ff19823516178555611f8b565b82800160010185558215611f8b579182015b82811115611f8b578235825591602001919060010190611ff4565b5b80821115611f975760008155600101612010565b803561ffff8116811461203657600080fd5b919050565b60008083601f84011261204d57600080fd5b5081356001600160401b0381111561206457600080fd5b60208301915083602082850101111561207c57600080fd5b9250929050565b80356001600160401b038116811461203657600080fd5b600080600080600080608087890312156120b357600080fd5b6120bc87612024565b955060208701356001600160401b03808211156120d857600080fd5b6120e48a838b0161203b565b90975095508591506120f860408a01612083565b9450606089013591508082111561210e57600080fd5b5061211b89828a0161203b565b979a9699509497509295939492505050565b60006020828403121561213f57600080fd5b61126182612024565b6000806040838503121561215b57600080fd5b61216483612024565b946020939093013593505050565b60006020828403121561218457600080fd5b5035919050565b6000806000604084860312156121a057600080fd5b6121a984612024565b925060208401356001600160401b038111156121c457600080fd5b6121d08682870161203b565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561221b5761221b6121dd565b604052919050565b60006001600160401b0382111561223c5761223c6121dd565b50601f01601f191660200190565b600082601f83011261225b57600080fd5b813561226e61226982612223565b6121f3565b81815284602083860101111561228357600080fd5b816020850160208301376000918101602001919091529392505050565b6001600160a01b038116811461187e57600080fd5b600080600080600060a086880312156122cd57600080fd5b6122d686612024565b945060208601356001600160401b038111156122f157600080fd5b6122fd8882890161224a565b945050604086013592506060860135612315816122a0565b91506080860135612325816122a0565b809150509295509295909350565b60008060006060848603121561234857600080fd5b61235184612024565b925060208401356001600160401b0381111561236c57600080fd5b6123788682870161224a565b92505061238760408501612083565b90509250925092565b60005b838110156123ab578181015183820152602001612393565b838111156123ba576000848401525b50505050565b600081518084526123d8816020860160208601612390565b601f01601f19169290920160200192915050565b60208152600061126160208301846123c0565b60006001600160401b03821115612418576124186121dd565b5060051b60200190565b600082601f83011261243357600080fd5b81356020612443612269836123ff565b82815260059290921b8401810191818101908684111561246257600080fd5b8286015b848110156124845761247781612024565b8352918301918301612466565b509695505050505050565b600082601f8301126124a057600080fd5b813560206124b0612269836123ff565b82815260059290921b840181019181810190868411156124cf57600080fd5b8286015b848110156124845780356001600160401b038111156124f25760008081fd5b6125008986838b010161224a565b8452509183019183016124d3565b600082601f83011261251f57600080fd5b8135602061252f612269836123ff565b82815260059290921b8401810191818101908684111561254e57600080fd5b8286015b848110156124845780358352918301918301612552565b8035801515811461203657600080fd5b6000806000806080858703121561258f57600080fd5b84356001600160401b03808211156125a657600080fd5b6125b288838901612422565b955060208701359150808211156125c857600080fd5b6125d48883890161248f565b945060408701359150808211156125ea57600080fd5b506125f78782880161250e565b92505061260660608601612569565b905092959194509250565b600080600080600060a0868803121561262957600080fd5b85356001600160401b038082111561264057600080fd5b61264c89838a01612422565b9650602088013591508082111561266257600080fd5b61266e89838a0161248f565b9550604088013591508082111561268457600080fd5b506126918882890161250e565b9350506060860135612315816122a0565b600080604083850312156126b557600080fd5b6126be83612024565b91506126cc60208401612024565b90509250929050565b6000602082840312156126e757600080fd5b8135611261816122a0565b60008060008060006080868803121561270a57600080fd5b61271386612024565b945061272160208701612024565b93506040860135925060608601356001600160401b0381111561274357600080fd5b61274f8882890161203b565b969995985093965092949392505050565b60008060006060848603121561277557600080fd5b61277e84612024565b925061278c60208501612024565b9150604084013590509250925092565b600080600080608085870312156127b257600080fd5b6127bb85612024565b935060208501356001600160401b038111156127d657600080fd5b6127e28782880161224a565b9350506040850135915061260660608601612569565b6000806000806080858703121561280e57600080fd5b61281785612024565b935061282560208601612024565b92506040850135612835816122a0565b9396929550929360600135925050565b600181811c9082168061285957607f821691505b6020821081141561287a57634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611929604083018486612890565b61ffff60f01b8560f01b16815283600282015282602282015260008251612905816042850160208701612390565b9190910160420195945050505050565b8381526001600160a01b0383166020820152606060408201819052600090611929908301846123c0565b60008251612951818460208701612390565b9190910192915050565b6020808252602c908201527f5f647374436861696e496420616e64205f746f41646472657373206d7573742060408201526b62652073616d652073697a6560a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b61ffff861681526001600160a01b038516602082015260a0604082018190526000906129eb908301866123c0565b84151560608401528281036080840152612a0581856123c0565b98975050505050505050565b60008060408385031215612a2457600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b60008219821115612a5e57612a5e612a35565b500190565b6000600019821415612a7757612a77612a35565b5060010190565b600082821015612a9057612a90612a35565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152612ae9608083018486612890565b979650505050505050565b61ffff86168152608060208201526000612b12608083018688612890565b6001600160401b0394909416604083015250606001529392505050565b600082601f830112612b4057600080fd5b8151612b4e61226982612223565b818152846020838601011115612b6357600080fd5b612b74826020830160208701612390565b949350505050565b600060208284031215612b8e57600080fd5b81516001600160401b03811115612ba457600080fd5b612b7484828501612b2f565b61ffff85168152608060208201526000612bcd60808301866123c0565b6001600160401b03851660408401528281036060840152612ae981856123c0565b61ffff8716815260c060208201526000612c0b60c08301886123c0565b8281036040840152612c1d81886123c0565b6001600160a01b0387811660608601528616608085015283810360a08501529050612c4881856123c0565b9998505050505050505050565b600080600060608486031215612c6a57600080fd5b835192506020840151612c7c816122a0565b60408501519092506001600160401b03811115612c9857600080fd5b612ca486828701612b2f565b9150509250925092565b61ffff8616815260a060208201526000612ccb60a08301876123c0565b6001600160401b03861660408401528281036060840152612cec81866123c0565b90508281036080840152612a0581856123c056fea264697066735822122026d37d6d6a3a14102000d267854dc055fac27a8ea3c87c2b01f711fcd1c86d4664736f6c634300080c0033", + "deployedBytecode": "0x6080604052600436106101e65760003560e01c80638cfd8f5c11610102578063cbed8b9c11610095578063eb8d72b711610064578063eb8d72b7146105ed578063f2fde38b1461060d578063f5ecbdbc1461062d578063ffa1ad741461064d57600080fd5b8063cbed8b9c1461057a578063d1deba1f1461059a578063df2a5b3b146105ad578063e3ee7ed7146105cd57600080fd5b8063a6c3d165116100d1578063a6c3d165146104f0578063b353aaa714610510578063baf3292d14610544578063c44618341461056457600080fd5b80638cfd8f5c146104465780638da5cb5b1461047e578063950c8a74146104b05780639f38369a146104d057600080fd5b806342d65a8d1161017a578063715018a611610149578063715018a6146103bc5780637533d788146103d15780637eec463b146103fe57806389be3eb61461043357600080fd5b806342d65a8d1461031a5780634915937e1461033a5780635b8c41e61461034d57806366ad5c8a1461039c57600080fd5b80633b4592f2116101b65780633b4592f2146102745780633d8b38f6146102945780633e1be1f8146102c95780633f1f4fa4146102ed57600080fd5b80621d3567146101f257806307e0db17146102145780630df374831461023457806310ddb1371461025457600080fd5b366101ed57005b600080fd5b3480156101fe57600080fd5b5061021261020d36600461209a565b610675565b005b34801561022057600080fd5b5061021261022f36600461212d565b6108a6565b34801561024057600080fd5b5061021261024f366004612148565b61092f565b34801561026057600080fd5b5061021261026f36600461212d565b61094e565b34801561028057600080fd5b5061021261028f366004612172565b6109a6565b3480156102a057600080fd5b506102b46102af36600461218b565b6109b3565b60405190151581526020015b60405180910390f35b3480156102d557600080fd5b506102df60065481565b6040519081526020016102c0565b3480156102f957600080fd5b506102df61030836600461212d565b60036020526000908152604090205481565b34801561032657600080fd5b5061021261033536600461218b565b610a7f565b6102126103483660046122b5565b610b05565b34801561035957600080fd5b506102df610368366004612333565b6005602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156103a857600080fd5b506102126103b736600461209a565b610bc2565b3480156103c857600080fd5b50610212610c9e565b3480156103dd57600080fd5b506103f16103ec36600461212d565b610cb2565b6040516102c091906123ec565b34801561040a57600080fd5b5061041e610419366004612579565b610d4c565b604080519283526020830191909152016102c0565b610212610441366004612611565b610f44565b34801561045257600080fd5b506102df6104613660046126a2565b600260209081526000928352604080842090915290825290205481565b34801561048a57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020016102c0565b3480156104bc57600080fd5b50600454610498906001600160a01b031681565b3480156104dc57600080fd5b506103f16104eb36600461212d565b611151565b3480156104fc57600080fd5b5061021261050b36600461218b565b611268565b34801561051c57600080fd5b506104987f000000000000000000000000000000000000000000000000000000000000000081565b34801561055057600080fd5b5061021261055f3660046126d5565b6112fb565b34801561057057600080fd5b506102df61271081565b34801561058657600080fd5b506102126105953660046126f2565b611357565b6102126105a836600461209a565b6113ec565b3480156105b957600080fd5b506102126105c8366004612760565b611602565b3480156105d957600080fd5b5061041e6105e836600461279c565b6116b4565b3480156105f957600080fd5b5061021261060836600461218b565b6117ae565b34801561061957600080fd5b506102126106283660046126d5565b611808565b34801561063957600080fd5b506103f16106483660046127f8565b611881565b34801561065957600080fd5b50610662600281565b60405161ffff90911681526020016102c0565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146106f25760405162461bcd60e51b815260206004820152601e60248201527f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c6572000060448201526064015b60405180910390fd5b61ffff86166000908152600160205260408120805461071090612845565b80601f016020809104026020016040519081016040528092919081815260200182805461073c90612845565b80156107895780601f1061075e57610100808354040283529160200191610789565b820191906000526020600020905b81548152906001019060200180831161076c57829003601f168201915b505050505090508051868690501480156107a4575060008151115b80156107cc5750805160208201206040516107c29088908890612880565b6040518091039020145b6108275760405162461bcd60e51b815260206004820152602660248201527f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f6044820152651b9d1c9858dd60d21b60648201526084016106e9565b61089d8787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8a018190048102820181019092528881528a93509150889088908190840183828082843760009201919091525061193292505050565b50505050505050565b6108ae6119ab565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b15801561091457600080fd5b505af1158015610928573d6000803e3d6000fd5b5050505050565b6109376119ab565b61ffff909116600090815260036020526040902055565b6109566119ab565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb137906024016108fa565b6109ae6119ab565b600655565b61ffff8316600090815260016020526040812080548291906109d490612845565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0090612845565b8015610a4d5780601f10610a2257610100808354040283529160200191610a4d565b820191906000526020600020905b815481529060010190602001808311610a3057829003601f168201915b505050505090508383604051610a64929190612880565b60405180910390208180519060200120149150509392505050565b610a876119ab565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d90610ad7908690869086906004016128b9565b600060405180830381600087803b158015610af157600080fd5b505af115801561089d573d6000803e3d6000fd5b600060026006548587604051602001610b2194939291906128d7565b60405160208183030381529060405290506000843387604051602001610b4993929190612915565b6040516020818303038152906040529050610b68878286868634611a05565b85604051610b76919061293f565b60405190819003812086825290339061ffff8a16907f61f260f3550ed2f4f577ac21fb33baf5257f44da023d19ce285b7139a65f239a906020015b60405180910390a450505050505050565b333014610c205760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d7573742062656044820152650204c7a4170760d41b60648201526084016106e9565b610c968686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f890181900481028201810190925287815289935091508790879081908401838280828437600092019190915250611bab92505050565b505050505050565b610ca66119ab565b610cb06000611c20565b565b60016020526000908152604090208054610ccb90612845565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf790612845565b8015610d445780601f10610d1957610100808354040283529160200191610d44565b820191906000526020600020905b815481529060010190602001808311610d2757829003601f168201915b505050505081565b6000808451865114610d705760405162461bcd60e51b81526004016106e99061295b565b8351855114610d915760405162461bcd60e51b81526004016106e99061295b565b60005b8651811015610f3a5760006002600654878481518110610db657610db66129a7565b6020026020010151898581518110610dd057610dd06129a7565b6020026020010151604051602001610deb94939291906128d7565b60405160208183030381529060405290506000868381518110610e1057610e106129a7565b602002602001015133898581518110610e2b57610e2b6129a7565b6020026020010151604051602001610e4593929190612915565b60405160208183030381529060405290506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166340a7bb108c8781518110610e9a57610e9a6129a7565b602002602001015130868c896040518663ffffffff1660e01b8152600401610ec69594939291906129bd565b6040805180830381865afa158015610ee2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f069190612a11565b9092509050610f158288612a4b565b9650610f218187612a4b565b9550505050508080610f3290612a63565b915050610d94565b5094509492505050565b8351855114610f655760405162461bcd60e51b81526004016106e99061295b565b8251845114610f865760405162461bcd60e51b81526004016106e99061295b565b60005b8551811015610c965760006002600654868481518110610fab57610fab6129a7565b6020026020010151888581518110610fc557610fc56129a7565b6020026020010151604051602001610fe094939291906128d7565b60405160208183030381529060405290506000858381518110611005576110056129a7565b602002602001015133888581518110611020576110206129a7565b602002602001015160405160200161103a93929190612915565b604051602081830303815290604052905060006001895161105b9190612a7e565b84146110675730611069565b855b9050611092898581518110611080576110806129a7565b60200260200101518383888747611a05565b8784815181106110a4576110a46129a7565b60200260200101516040516110b9919061293f565b6040518091039020336001600160a01b03168a86815181106110dd576110dd6129a7565b602002602001015161ffff167f61f260f3550ed2f4f577ac21fb33baf5257f44da023d19ce285b7139a65f239a8a888151811061111c5761111c6129a7565b602002602001015160405161113391815260200190565b60405180910390a4505050808061114990612a63565b915050610f89565b61ffff811660009081526001602052604081208054606092919061117490612845565b80601f01602080910402602001604051908101604052809291908181526020018280546111a090612845565b80156111ed5780601f106111c2576101008083540402835291602001916111ed565b820191906000526020600020905b8154815290600101906020018083116111d057829003601f168201915b505050505090508051600014156112465760405162461bcd60e51b815260206004820152601d60248201527f4c7a4170703a206e6f20747275737465642070617468207265636f726400000060448201526064016106e9565b6112616000601483516112599190612a7e565b839190611c70565b9392505050565b6112706119ab565b81813060405160200161128593929190612a95565b60408051601f1981840301815291815261ffff851660009081526001602090815291902082516112ba93919290910190611f17565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce8383836040516112ee939291906128b9565b60405180910390a1505050565b6113036119ab565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b9060200160405180910390a150565b61135f6119ab565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c906113b39088908890889088908890600401612abb565b600060405180830381600087803b1580156113cd57600080fd5b505af11580156113e1573d6000803e3d6000fd5b505050505050505050565b61ffff8616600090815260056020526040808220905161140f9088908890612880565b90815260408051602092819003830190206001600160401b0387166000908152925290205490508061148f5760405162461bcd60e51b815260206004820152602360248201527f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360448201526261676560e81b60648201526084016106e9565b8083836040516114a0929190612880565b6040518091039020146114ff5760405162461bcd60e51b815260206004820152602160248201527f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f616044820152601960fa1b60648201526084016106e9565b61ffff871660009081526005602052604080822090516115229089908990612880565b90815260408051602092819003830181206001600160401b038916600090815290845282902093909355601f880182900482028301820190528682526115ba918991899089908190840183828082843760009201919091525050604080516020601f8a018190048102820181019092528881528a935091508890889081908401838280828437600092019190915250611bab92505050565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e587878787856040516115f1959493929190612af4565b60405180910390a150505050505050565b61160a6119ab565b600081116116525760405162461bcd60e51b81526020600482015260156024820152744c7a4170703a20696e76616c6964206d696e47617360581b60448201526064016106e9565b61ffff83811660008181526002602090815260408083209487168084529482529182902085905581519283528201929092529081018290527f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac0906060016112ee565b6000806000600260065486886040516020016116d394939291906128d7565b604051602081830303815290604052905060008533886040516020016116fb93929190612915565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb109061175f908b90309086908b9089906004016129bd565b6040805180830381865afa15801561177b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179f9190612a11565b93509350505094509492505050565b6117b66119ab565b61ffff831660009081526001602052604090206117d4908383611f9b565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab8383836040516112ee939291906128b9565b6118106119ab565b6001600160a01b0381166118755760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e9565b61187e81611c20565b50565b604051633d7b2f6f60e21b815261ffff808616600483015284166024820152306044820152606481018290526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90608401600060405180830381865afa158015611901573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119299190810190612b7c565b95945050505050565b6000806119955a60966366ad5c8a60e01b8989898960405160240161195a9493929190612bb0565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915230929190611d7d565b9150915081610c9657610c968686868685611e07565b6000546001600160a01b03163314610cb05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e9565b61ffff861660009081526001602052604081208054611a2390612845565b80601f0160208091040260200160405190810160405280929190818152602001828054611a4f90612845565b8015611a9c5780601f10611a7157610100808354040283529160200191611a9c565b820191906000526020600020905b815481529060010190602001808311611a7f57829003601f168201915b50505050509050805160001415611b0e5760405162461bcd60e51b815260206004820152603060248201527f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060448201526f61207472757374656420736f7572636560801b60648201526084016106e9565b611b19878751611ea4565b60405162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c5803100908490611b70908b9086908c908c908c908c90600401612bee565b6000604051808303818588803b158015611b8957600080fd5b505af1158015611b9d573d6000803e3d6000fd5b505050505050505050505050565b600080600083806020019051810190611bc49190612c55565b92509250925080604051611bd8919061293f565b6040518091039020826001600160a01b03168861ffff167f72b2a62c1045e48221f301d9352d5773acbb1f5e6d6e7657b2622fef3f00446b86604051610bb191815260200190565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606081611c7e81601f612a4b565b1015611cbd5760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b60448201526064016106e9565b611cc78284612a4b565b84511015611d0b5760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b60448201526064016106e9565b606082158015611d2a5760405191506000825260208201604052611d74565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611d63578051835260209283019201611d4b565b5050858452601f01601f1916604052505b50949350505050565b6000606060008060008661ffff166001600160401b03811115611da257611da26121dd565b6040519080825280601f01601f191660200182016040528015611dcc576020820181803683370190505b50905060008087516020890160008d8df191503d925086831115611dee578692505b828152826000602083013e909890975095505050505050565b8180519060200120600560008761ffff1661ffff16815260200190815260200160002085604051611e38919061293f565b9081526040805191829003602090810183206001600160401b0388166000908152915220919091557fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c90611e959087908790879087908790612cae565b60405180910390a15050505050565b61ffff821660009081526003602052604090205480611ec257506127105b80821115611f125760405162461bcd60e51b815260206004820181905260248201527f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c6172676560448201526064016106e9565b505050565b828054611f2390612845565b90600052602060002090601f016020900481019282611f455760008555611f8b565b82601f10611f5e57805160ff1916838001178555611f8b565b82800160010185558215611f8b579182015b82811115611f8b578251825591602001919060010190611f70565b50611f9792915061200f565b5090565b828054611fa790612845565b90600052602060002090601f016020900481019282611fc95760008555611f8b565b82601f10611fe25782800160ff19823516178555611f8b565b82800160010185558215611f8b579182015b82811115611f8b578235825591602001919060010190611ff4565b5b80821115611f975760008155600101612010565b803561ffff8116811461203657600080fd5b919050565b60008083601f84011261204d57600080fd5b5081356001600160401b0381111561206457600080fd5b60208301915083602082850101111561207c57600080fd5b9250929050565b80356001600160401b038116811461203657600080fd5b600080600080600080608087890312156120b357600080fd5b6120bc87612024565b955060208701356001600160401b03808211156120d857600080fd5b6120e48a838b0161203b565b90975095508591506120f860408a01612083565b9450606089013591508082111561210e57600080fd5b5061211b89828a0161203b565b979a9699509497509295939492505050565b60006020828403121561213f57600080fd5b61126182612024565b6000806040838503121561215b57600080fd5b61216483612024565b946020939093013593505050565b60006020828403121561218457600080fd5b5035919050565b6000806000604084860312156121a057600080fd5b6121a984612024565b925060208401356001600160401b038111156121c457600080fd5b6121d08682870161203b565b9497909650939450505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561221b5761221b6121dd565b604052919050565b60006001600160401b0382111561223c5761223c6121dd565b50601f01601f191660200190565b600082601f83011261225b57600080fd5b813561226e61226982612223565b6121f3565b81815284602083860101111561228357600080fd5b816020850160208301376000918101602001919091529392505050565b6001600160a01b038116811461187e57600080fd5b600080600080600060a086880312156122cd57600080fd5b6122d686612024565b945060208601356001600160401b038111156122f157600080fd5b6122fd8882890161224a565b945050604086013592506060860135612315816122a0565b91506080860135612325816122a0565b809150509295509295909350565b60008060006060848603121561234857600080fd5b61235184612024565b925060208401356001600160401b0381111561236c57600080fd5b6123788682870161224a565b92505061238760408501612083565b90509250925092565b60005b838110156123ab578181015183820152602001612393565b838111156123ba576000848401525b50505050565b600081518084526123d8816020860160208601612390565b601f01601f19169290920160200192915050565b60208152600061126160208301846123c0565b60006001600160401b03821115612418576124186121dd565b5060051b60200190565b600082601f83011261243357600080fd5b81356020612443612269836123ff565b82815260059290921b8401810191818101908684111561246257600080fd5b8286015b848110156124845761247781612024565b8352918301918301612466565b509695505050505050565b600082601f8301126124a057600080fd5b813560206124b0612269836123ff565b82815260059290921b840181019181810190868411156124cf57600080fd5b8286015b848110156124845780356001600160401b038111156124f25760008081fd5b6125008986838b010161224a565b8452509183019183016124d3565b600082601f83011261251f57600080fd5b8135602061252f612269836123ff565b82815260059290921b8401810191818101908684111561254e57600080fd5b8286015b848110156124845780358352918301918301612552565b8035801515811461203657600080fd5b6000806000806080858703121561258f57600080fd5b84356001600160401b03808211156125a657600080fd5b6125b288838901612422565b955060208701359150808211156125c857600080fd5b6125d48883890161248f565b945060408701359150808211156125ea57600080fd5b506125f78782880161250e565b92505061260660608601612569565b905092959194509250565b600080600080600060a0868803121561262957600080fd5b85356001600160401b038082111561264057600080fd5b61264c89838a01612422565b9650602088013591508082111561266257600080fd5b61266e89838a0161248f565b9550604088013591508082111561268457600080fd5b506126918882890161250e565b9350506060860135612315816122a0565b600080604083850312156126b557600080fd5b6126be83612024565b91506126cc60208401612024565b90509250929050565b6000602082840312156126e757600080fd5b8135611261816122a0565b60008060008060006080868803121561270a57600080fd5b61271386612024565b945061272160208701612024565b93506040860135925060608601356001600160401b0381111561274357600080fd5b61274f8882890161203b565b969995985093965092949392505050565b60008060006060848603121561277557600080fd5b61277e84612024565b925061278c60208501612024565b9150604084013590509250925092565b600080600080608085870312156127b257600080fd5b6127bb85612024565b935060208501356001600160401b038111156127d657600080fd5b6127e28782880161224a565b9350506040850135915061260660608601612569565b6000806000806080858703121561280e57600080fd5b61281785612024565b935061282560208601612024565b92506040850135612835816122a0565b9396929550929360600135925050565b600181811c9082168061285957607f821691505b6020821081141561287a57634e487b7160e01b600052602260045260246000fd5b50919050565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61ffff84168152604060208201526000611929604083018486612890565b61ffff60f01b8560f01b16815283600282015282602282015260008251612905816042850160208701612390565b9190910160420195945050505050565b8381526001600160a01b0383166020820152606060408201819052600090611929908301846123c0565b60008251612951818460208701612390565b9190910192915050565b6020808252602c908201527f5f647374436861696e496420616e64205f746f41646472657373206d7573742060408201526b62652073616d652073697a6560a01b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b61ffff861681526001600160a01b038516602082015260a0604082018190526000906129eb908301866123c0565b84151560608401528281036080840152612a0581856123c0565b98975050505050505050565b60008060408385031215612a2457600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b60008219821115612a5e57612a5e612a35565b500190565b6000600019821415612a7757612a77612a35565b5060010190565b600082821015612a9057612a90612a35565b500390565b8284823760609190911b6bffffffffffffffffffffffff19169101908152601401919050565b600061ffff808816835280871660208401525084604083015260806060830152612ae9608083018486612890565b979650505050505050565b61ffff86168152608060208201526000612b12608083018688612890565b6001600160401b0394909416604083015250606001529392505050565b600082601f830112612b4057600080fd5b8151612b4e61226982612223565b818152846020838601011115612b6357600080fd5b612b74826020830160208701612390565b949350505050565b600060208284031215612b8e57600080fd5b81516001600160401b03811115612ba457600080fd5b612b7484828501612b2f565b61ffff85168152608060208201526000612bcd60808301866123c0565b6001600160401b03851660408401528281036060840152612ae981856123c0565b61ffff8716815260c060208201526000612c0b60c08301886123c0565b8281036040840152612c1d81886123c0565b6001600160a01b0387811660608601528616608085015283810360a08501529050612c4881856123c0565b9998505050505050505050565b600080600060608486031215612c6a57600080fd5b835192506020840151612c7c816122a0565b60408501519092506001600160401b03811115612c9857600080fd5b612ca486828701612b2f565b9150509250925092565b61ffff8616815260a060208201526000612ccb60a08301876123c0565b6001600160401b03861660408401528281036060840152612cec81866123c0565b90508281036080840152612a0581856123c056fea264697066735822122026d37d6d6a3a14102000d267854dc055fac27a8ea3c87c2b01f711fcd1c86d4664736f6c634300080c0033", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "details": "Returns the address of the current owner." + }, + "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." + }, + "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": 4047, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 15104, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "trustedRemoteLookup", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint16,t_bytes_storage)" + }, + { + "astId": 15110, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "minDstGasLookup", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))" + }, + { + "astId": 15114, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "payloadSizeLimitLookup", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint16,t_uint256)" + }, + { + "astId": 15116, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "precrime", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 15653, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "failedMessages", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))" + }, + { + "astId": 13713, + "contract": "contracts/examples/GasDrop.sol:GasDrop", + "label": "dstGas", + "offset": 0, + "slot": "6", + "type": "t_uint256" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_memory_ptr": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))": { + "encoding": "mapping", + "key": "t_bytes_memory_ptr", + "label": "mapping(bytes => mapping(uint64 => bytes32))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint64,t_bytes32)" + }, + "t_mapping(t_uint16,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint16,t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32)))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes_memory_ptr,t_mapping(t_uint64,t_bytes32))" + }, + "t_mapping(t_uint16,t_mapping(t_uint16,t_uint256))": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => mapping(uint16 => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint16,t_uint256)" + }, + "t_mapping(t_uint16,t_uint256)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_uint64,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} diff --git a/packages/verify-contract/test/abi.test.ts b/packages/verify-contract/test/abi.test.ts new file mode 100644 index 000000000..fdb1a6c3b --- /dev/null +++ b/packages/verify-contract/test/abi.test.ts @@ -0,0 +1,56 @@ +import { encodeContructorArguments } from '@/common/abi' + +describe('abi', () => { + describe('encodeContructorArguments', () => { + it('should return undefined if args are nullish', () => { + expect(encodeContructorArguments([], undefined)).toBeUndefined() + }) + + it('should return undefined if args are empty', () => { + expect(encodeContructorArguments([], [])).toBeUndefined() + }) + + it('should throw an error if there is no constructor fragment', () => { + expect(() => encodeContructorArguments([{}], [1])).toThrow('invalid fragment object') + }) + + it.each([ + [ + '0000000000000000000000006ab5ae6822647046626e83ee6db8187151e1d5ab', + ['0x6aB5Ae6822647046626e83ee6dB8187151E1d5ab'], + [ + { + inputs: [ + { + internalType: 'address', + name: '_endpoint', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + ], + ], + [ + '0000000000000000000000004d73adb72bc3dd368966edd0f0b2148401a178e2', + ['0x4D73AdB72bC3DD368966edD0f0b2148401A178E2'], + [ + { + inputs: [ + { + internalType: 'address', + name: '_ulnv2', + type: 'address', + }, + ], + stateMutability: 'nonpayable', + type: 'constructor', + }, + ], + ], + ])('should return %s for arguments %j and ABI %j', (encoded, args, abi) => { + expect(encodeContructorArguments(abi, args)).toBe(encoded) + }) + }) +}) diff --git a/packages/verify-contract/test/logger.test.ts b/packages/verify-contract/test/logger.test.ts new file mode 100644 index 000000000..e37484877 --- /dev/null +++ b/packages/verify-contract/test/logger.test.ts @@ -0,0 +1,17 @@ +import { anonymizeValue } from '@/common/logger' + +describe('logger', () => { + describe('anonymizeValue', () => { + it.each([ + ['', ''], + ['a**', 'abc'], + ['ab**', 'abcd'], + ['abc**', 'abcde'], + ['abcd**', 'abcdef'], + ['abcd***', 'abcdefg'], + ['abcd****', 'abcdefgh'], + ])('should return "%s" when passed "%s"', (output, input) => { + expect(anonymizeValue(input)).toBe(output) + }) + }) +}) diff --git a/packages/verify-contract/test/url.test.ts b/packages/verify-contract/test/url.test.ts new file mode 100644 index 000000000..96bb5cebb --- /dev/null +++ b/packages/verify-contract/test/url.test.ts @@ -0,0 +1,34 @@ +import { tryCreateScanContractUrl, tryGetScanBrowserUrlFromScanUrl } from '@/common/url' + +describe('url', () => { + describe('tryGetScanBrowserUrlFromScanUrl', () => { + it.each([[''], ['borken url'], ['https://'], ['https:///'], ['scan.api']])( + 'should return undefined when passed "%s"', + (invalidUrl) => { + expect(tryGetScanBrowserUrlFromScanUrl(invalidUrl)).toBeUndefined() + } + ) + + it.each([ + ['https://com/', 'https://api.com/api'], + ['http://scan.io/', 'http://api.scan.io/some-path'], + ['http://scan.io/', 'http://api.scan.io'], + ['http://scan.io/', 'http://api-scan.io'], + ])('should return "%s" when passed "%s"', (output, validUrl) => { + expect(tryGetScanBrowserUrlFromScanUrl(validUrl)).toBe(output) + }) + }) + + describe('tryCreateScanContractUrl', () => { + it.each([['scan.io', 'oh no']])('should return undefined when passed "%s"', (invalidUrl) => { + expect(tryCreateScanContractUrl(invalidUrl, '0x0')).toBeUndefined() + }) + + it.each([ + ['https://scan.io/address/0x0', 'https://scan.io', '0x0'], + ['http://scan.io/address/0x0', 'http://scan.io', '0x0'], + ])('should return "%s" when passed "%s" and address is "%s"', (output, validUrl, address) => { + expect(tryCreateScanContractUrl(validUrl, address)).toBe(output) + }) + }) +}) diff --git a/packages/verify-contract/test/verify-hardhat-deploy.test.ts b/packages/verify-contract/test/verify-hardhat-deploy.test.ts new file mode 100644 index 000000000..43f57038a --- /dev/null +++ b/packages/verify-contract/test/verify-hardhat-deploy.test.ts @@ -0,0 +1,128 @@ +import path from 'path' +import { createLogger } from '@layerzerolabs/io-devtools' +import { verifyTarget, verifyNonTarget } from '@/hardhat-deploy/verify' +import got from 'got' + +jest.mock('got', () => jest.fn()) + +const mockFetch = got as unknown as jest.Mock + +describe('verifyTarget', () => { + const logger = createLogger('error') + + beforeEach(() => { + mockFetch.mockReset() + }) + + it('should fail if the path to the deployments does not exist', async () => { + await expect(() => + verifyTarget( + { + paths: { + deployments: '/i/dont/exists/but/i/might', + }, + }, + logger + ) + ).rejects.toThrow('is not a directory') + }) + + it('should call the filter function with correct arguments', async () => { + const mockFilter = jest.fn() + + await verifyTarget( + { + paths: { + deployments: path.resolve(__dirname, '__data__', 'deployments'), + }, + networks: { + fuji: { + apiUrl: 'https://fuji.com/api', + }, + }, + filter: mockFilter, + }, + logger + ) + + expect(mockFilter).toHaveBeenCalledTimes(8) + + expect(mockFilter).toHaveBeenCalledWith('GasDrop', 'contracts/examples/GasDrop.sol', 'fuji') + expect(mockFilter).toHaveBeenCalledWith( + 'DistributeONFT721', + 'contracts/token/onft/extension/DistributeONFT721.sol', + 'fuji' + ) + expect(mockFilter).toHaveBeenCalledWith('ExampleOFTV2', 'contracts/examples/ExampleOFTV2.sol', 'fuji') + expect(mockFilter).toHaveBeenCalledWith( + 'ExampleUniversalONFT721', + 'contracts/examples/ExampleUniversalONFT721.sol', + 'fuji' + ) + expect(mockFilter).toHaveBeenCalledWith( + 'LayerZeroExampleERC1155', + 'contracts/examples/LayerZeroExampleERC1155.sol', + 'fuji' + ) + + expect(mockFetch).toHaveBeenCalledTimes(0) + }) + + it('should be able to verify a renamed contract', async () => { + const mockFilter = jest.fn() + + await verifyTarget( + { + paths: { + deployments: path.resolve(__dirname, '__data__', 'deployments'), + }, + networks: { + 'renamed-testnet': { + apiUrl: 'https://renamed.com/api', + }, + }, + filter: mockFilter, + }, + logger + ) + + expect(mockFilter).toHaveBeenCalledTimes(1) + + // This contract comes from a file that has been deployed under a different name (GasDropRenamed.json) + expect(mockFilter).toHaveBeenCalledWith('GasDrop', 'contracts/examples/GasDrop.sol', 'renamed-testnet') + + expect(mockFetch).toHaveBeenCalledTimes(0) + }) +}) + +describe('verifyNonTarget', () => { + const logger = createLogger('error') + + beforeEach(() => { + mockFetch.mockReset() + }) + + it('should not fail if the path to the deployment does not exist', async () => { + await expect( + verifyNonTarget( + { + paths: { + deployments: path.resolve(__dirname, '__data__', 'deployments'), + }, + networks: { + fuji: {}, + }, + contracts: [ + { + network: 'fuji', + address: '0x3D268b216523f1BD7d8343171595E826C436a334', + deployment: 'i/do/not/exist/do/you/?', + contractName: 'contracts/Duskoin.sol', + }, + ], + }, + logger + ) + ).resolves.toEqual([]) + }) +}) diff --git a/packages/verify-contract/tsconfig.json b/packages/verify-contract/tsconfig.json new file mode 100644 index 000000000..e7d0f158d --- /dev/null +++ b/packages/verify-contract/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig", + "compilerOptions": { + "outDir": "dist", + "declaration": false, + "jsx": "react", + "lib": ["dom", "dom.Iterable", "es2022"], + "resolveJsonModule": true, + "types": ["jest", "node"], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["src", "test"] +} diff --git a/packages/verify-contract/tsup.config.ts b/packages/verify-contract/tsup.config.ts new file mode 100644 index 000000000..80d48fab8 --- /dev/null +++ b/packages/verify-contract/tsup.config.ts @@ -0,0 +1,33 @@ +import { defineConfig } from 'tsup' +import { copy } from 'esbuild-plugin-copy' + +export default defineConfig([ + { + entry: ['src/index.ts'], + outDir: './dist', + clean: true, + dts: true, + sourcemap: true, + splitting: false, + treeshake: true, + format: ['esm', 'cjs'], + }, + { + entry: ['src/cli.ts'], + outDir: './dist', + clean: true, + splitting: false, + treeshake: true, + minify: true, + format: ['cjs'], + esbuildPlugins: [ + copy({ + resolveFrom: 'cwd', + assets: { + from: ['./node_modules/@solidity-parser/parser/dist/antlr/*'], + to: ['./dist'], + }, + }), + ], + }, +]) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d9fccdd90..509de8126 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1349,6 +1349,51 @@ importers: specifier: ^3.22.4 version: 3.22.4 + packages/verify-contract: + devDependencies: + '@ethersproject/abi': + specifier: ^5.7.0 + version: 5.7.0 + '@layerzerolabs/io-devtools': + specifier: ~0.1.3 + version: link:../io-devtools + '@solidity-parser/parser': + specifier: ^0.16.1 + version: 0.16.2 + '@types/jest': + specifier: ^29.5.12 + version: 29.5.12 + '@types/node': + specifier: ^18.18.14 + version: 18.18.14 + chalk: + specifier: ^4.1.2 + version: 4.1.2 + commander: + specifier: ^11.1.0 + version: 11.1.0 + esbuild-plugin-copy: + specifier: ~2.1.1 + version: 2.1.1(esbuild@0.19.11) + got: + specifier: 12.6.1 + version: 12.6.1 + jest: + specifier: ^29.7.0 + version: 29.7.0(@types/node@18.18.14)(ts-node@10.9.2) + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@swc/core@1.4.0)(@types/node@18.18.14)(typescript@5.3.3) + tsup: + specifier: ^8.0.1 + version: 8.0.1(@swc/core@1.4.0)(ts-node@10.9.2)(typescript@5.3.3) + typescript: + specifier: ^5.3.3 + version: 5.3.3 + zod: + specifier: ^3.22.4 + version: 3.22.4 + tests/devtools-evm-hardhat-test: devDependencies: '@babel/core': @@ -6009,6 +6054,18 @@ packages: dependencies: es6-promise: 4.2.8 + /esbuild-plugin-copy@2.1.1(esbuild@0.19.11): + resolution: {integrity: sha512-Bk66jpevTcV8KMFzZI1P7MZKZ+uDcrZm2G2egZ2jNIvVnivDpodZI+/KnpL3Jnap0PBdIHU7HwFGB8r+vV5CVw==} + peerDependencies: + esbuild: '>= 0.14.0' + dependencies: + chalk: 4.1.2 + chokidar: 3.5.3 + esbuild: 0.19.11 + fs-extra: 10.1.0 + globby: 11.1.0 + dev: true + /esbuild@0.19.11: resolution: {integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==} engines: {node: '>=12'} @@ -6570,6 +6627,7 @@ packages: dependencies: is-hex-prefixed: 1.0.0 strip-hex-prefix: 1.0.0 + bundledDependencies: false /eventemitter3@4.0.7: resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} @@ -8271,7 +8329,7 @@ packages: jest-util: 29.7.0 natural-compare: 1.4.0 pretty-format: 29.7.0 - semver: 7.5.4 + semver: 7.6.0 transitivePeerDependencies: - supports-color dev: true @@ -8710,7 +8768,7 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} dependencies: - semver: 7.5.4 + semver: 7.6.0 dev: true /make-error@1.3.6: diff --git a/tests-user/tests/verify-contract.bats b/tests-user/tests/verify-contract.bats new file mode 100644 index 000000000..d7eaf9a16 --- /dev/null +++ b/tests-user/tests/verify-contract.bats @@ -0,0 +1,15 @@ +# This will be run at the start of this testing suite, +# similar to beforeAll() in jest +setup() { + # Load bats-assert and bats-support + load "../lib/bats-support/load.bash" + load "../lib/bats-assert/load.bash" +} + +@test "should output version" { + npx --yes @layerzerolabs/verify-contract --version +} + +@test "should output help" { + npx --yes @layerzerolabs/verify-contract --help +} \ No newline at end of file